User portrait generation method and device applied to healthy home

By clustering the measurement values ​​of the scale, user portraits are generated, and the problem of high cost of identifying home users and privacy leakage in the prior art is solved, achieving efficient and secure user identification.

CN120144841APending Publication Date: 2025-06-13QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311702684.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The scheme for identifying the number of home users in the prior art is expensive and prone to leak user privacy, resulting in poor user experience.

Method used

By obtaining the measured values ​​of the scale, performing cluster analysis, and generating user portraits, thereby quickly identifying the number of home users.

Benefits of technology

This method improves the efficiency of identifying the number of home users, reduces costs, and does not disclose user privacy and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144841A_ABST
    Figure CN120144841A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent electric appliances, and provides a user portrait generation method and device applied to healthy home furnishing, and the method comprises the steps: obtaining a measurement value of a weighing scale in a current period, taking the measurement value as a measurement element, and storing the measurement value as a first set according to a corresponding measurement time sequence; traversing the measurement elements in the first set based on a measurement time sequence, traversing all historical arrays in the second set, and performing clustering analysis on all historical array elements in the measurement and the second set to obtain a clustering result; determining a target array currently contained in the second set according to the clustering result, and generating one or more user portraits based on the target array currently contained in the second set; wherein the clustering result corresponds to one or more target arrays. According to the method provided by the invention, the household user can be identified by quickly analyzing the measurement data of the weighing scale, and the identification efficiency is effectively improved, so that personalized recommendation and service can be conveniently provided for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart appliances, and in particular to a method and device for generating user portraits applied to healthy homes. Additionally, it also relates to an electronic device and a non-transitory computer-readable storage medium. Background Art

[0002] In recent years, with the rapid development of the economic society, various smart appliances have been used more and more widely in people's daily lives. In particular, with the development of Internet of Things technology, the smart home industry has entered the fast lane of development, and various smart appliance products have gradually entered the family lives of ordinary people, making family life more convenient and comfortable. In order to provide a better product experience, enterprises analyze and mine the data collected by the terminals of smart appliance products to determine information such as the number of users and genders, and then build a family user portrait label system to better understand the living habits and needs of users, and achieve personalized recommendations and services for users. However, in the prior art, in order to obtain the number of users inside the home, it is generally necessary to install additional devices, such as installing infrared cameras and other devices to collect the number of users in the home, which has a relatively high actual cost and is prone to privacy leakage, resulting in a poor user experience. Therefore, how to provide a more secure and efficient solution for identifying the number of family users has become an urgent problem to be solved. Summary of the Invention

[0003] The present invention provides a method for generating user portraits applied to healthy homes to solve the defect that the existing solutions for identifying the number of family users have high limitations, are prone to privacy leakage of users, and result in a poor user experience.

[0004] The present invention provides a method for generating user portraits applied to healthy homes, including:

[0005] Obtain the measurement values of the weighing scale in the current period, use the measurement values as measurement elements and store them as a first set in the corresponding measurement time sequence;

[0006] Traverse the measurement elements in the first set based on the measurement time sequence, and traverse all the historical arrays in the second set to perform clustering analysis on the measurement elements and all the historical arrays in the second set to obtain a clustering result; wherein, the second set is obtained by performing clustering analysis on the measurement values of the weighing scale in the historical period, and each historical array contains one or more historical measurement values in the historical period;

[0007] Determine the target arrays currently included in the second set according to the clustering result, and generate one or more user portraits based on the target arrays currently included in the second set; wherein, the clustering result corresponds to one or more target arrays.

[0008] Further, traverse the measurement elements in the first set in the order of the measurement time, and traverse all the historical arrays in the second set to perform cluster analysis on the measurement elements and all the historical arrays in the second set to obtain a clustering result, which specifically includes:

[0009] Traverse the measurement elements in the first set in the order of the measurement time, and when the second set is not empty, traverse all the historical arrays in the second set to respectively determine the representation distance of the measurement value similarity between the measurement elements and all the historical arrays in the second set. When the representation distance of the measurement value similarity does not meet the set clustering strategy, encapsulate the measurement elements into a new array and store it in the second set, and output the new array as the clustering result.

[0010] Further, after determining the representation distance of the measurement value similarity between the measurement elements and all the historical arrays in the second set, it further includes:

[0011] When the representation distance of the measurement value similarity meets the set clustering strategy, encapsulate the measurement elements into the corresponding historical array in the second set to obtain a new historical array, and output the new historical array as the clustering result.

[0012] Further, when the representation distance of the measurement value similarity meets the set clustering strategy, encapsulate the measurement elements into the corresponding historical array in the second set to obtain a new historical array, and output the new historical array as the clustering result, including:

[0013] Compare and analyze the representation distance of the measurement value similarity with the distance threshold in the clustering strategy. When it is determined that the representation distance of the measurement value similarity is less than the distance threshold, determine the historical array corresponding to the measurement elements from all the historical arrays, and use the measurement value corresponding to the measurement elements as the new measurement value of the historical array to replace the old measurement value in the historical array, and store the new measurement value corresponding to the historical array in the second set to obtain a new historical array, and output the new historical array as the clustering result.

[0014] Further, the measurement values include weight values and body mass index;

[0015] Traverse the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traverse all the historical arrays in the second set to respectively determine the representation distances of the measurement value similarities between the measurement elements and all the historical arrays in the second set, specifically including:

[0016] Traverse the measurement elements in the first set based on the measurement time sequence to obtain the weight values and body mass indices corresponding to the measurement elements arranged in time sequence;

[0017] When the second set is not empty, traverse all the historical arrays in the second set to obtain the weight values and body mass indices corresponding to the historical measurement values in the historical arrays;

[0018] Based on the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays, calculate the distances between the measurement elements and all the historical arrays respectively, and obtain the corresponding representation distances of multiple measurement value similarities.

[0019] Further, the calculating the distances between the measurement elements and all the historical arrays respectively based on the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays, and obtaining the corresponding representation distances of multiple measurement value similarities specifically includes:

[0020] Determine the corresponding similarity distance analysis model;

[0021] Input the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays into the similarity distance analysis model to calculate the distances between the measurement elements and all the historical arrays respectively, and obtain the representation distances of multiple measurement value similarities output by the similarity distance analysis model.

[0022] Further, when the representation distances of the measurement value similarities do not meet the set clustering strategy, encapsulate the measurement elements into new arrays and store them in the second set, specifically including: comparing and analyzing the representation distances of the measurement value similarities with the distance thresholds in the clustering strategy respectively, and when the representation distances of the measurement value similarities are all greater than or equal to the distance thresholds, encapsulate the measurement elements into new arrays and store them in the second set.

[0023] The present invention also provides a user portrait generation device applied to a healthy home, including:

[0024] A measurement value acquisition unit, configured to acquire the measurement value of the weighing scale in the current period, use the measurement value as a measurement element, and store it as a first set in the corresponding measurement time sequence;

[0025] A clustering analysis unit, configured to traverse the measurement elements in the first set based on the measurement time sequence, and traverse all historical arrays in the second set, so as to perform clustering analysis on the measurement elements and all historical arrays in the second set to obtain a clustering result; wherein, the second set is obtained by performing clustering analysis on the measurement values of the weighing scale in the historical period, and each historical array includes one or more historical measurement values in the historical period;

[0026] A household user number determination unit, configured to determine the target array currently included in the second set according to the clustering result, and generate one or more user portraits based on the target array currently included in the second set; wherein, the clustering result corresponds to one or more target arrays.

[0027] Further, the clustering analysis unit is specifically configured to:

[0028] Traverse the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traverse all historical arrays in the second set to respectively determine the representation distance of the measurement value similarity between the measurement element and all historical arrays in the second set. When the representation distance of the measurement value similarity does not meet the set clustering strategy, encapsulate the measurement element into a new array and store it in the second set, and output the new array as the clustering result.

[0029] Further, after determining the representation distance of the measurement value similarity between the measurement element and all historical arrays in the second set, it further includes:

[0030] A measurement element encapsulation unit, configured to encapsulate the measurement element into the corresponding historical array in the second set when the representation distance of the measurement value similarity meets the set clustering strategy, obtain a new historical array, and output the new historical array as the clustering result.

[0031] Further, the step of encapsulating the measurement element into the corresponding historical array in the second set when the representation distance of the measurement value similarity meets the set clustering strategy, obtaining a new historical array, and outputting the new historical array as the clustering result includes:

[0032] Compare and analyze the representation distance of the measurement value similarity with the distance threshold in the clustering strategy. When it is determined that the representation distance of the measurement value similarity is less than the distance threshold, determine the historical array corresponding to the measurement element from all historical arrays, and use the measurement value corresponding to the measurement element as the new measurement value of the historical array to replace the old measurement value in the historical array, and store the new measurement value corresponding to the historical array in the second set to obtain a new historical array, and output the new historical array as the clustering result.

[0033] Further, the measurement values include weight values and body mass indices;

[0034] Traverse the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traverse all historical arrays in the second set to respectively determine the representation distances of the measurement value similarities between the measurement elements and all historical arrays in the second set, which specifically includes:

[0035] Traverse the measurement elements in the first set based on the measurement time sequence to obtain the weight values and body mass indices corresponding to the measurement elements arranged in time sequence;

[0036] When the second set is not empty, traverse all historical arrays in the second set to obtain the weight values and body mass indices corresponding to the historical measurement values in the historical arrays;

[0037] Based on the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays, calculate the distances between the measurement elements and all historical arrays respectively, and obtain corresponding multiple representation distances of the measurement value similarities.

[0038] Further, the step of calculating the distances between the measurement elements and all historical arrays respectively based on the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays, and obtaining corresponding multiple representation distances of the measurement value similarities specifically includes:

[0039] Determine the corresponding similarity distance analysis model;

[0040] Input the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays into the similarity distance analysis model to calculate the distances between the measurement elements and all historical arrays respectively, and obtain multiple representation distances of the measurement value similarities output by the similarity distance analysis model.

[0041] Further, in the case where the representation distance of the measurement value similarity does not meet the set clustering strategy, encapsulating the measurement element into a new array and storing it in the second set, specifically including: comparing and analyzing the representation distance of the measurement value similarity with the distance threshold in the clustering strategy respectively. In the case where the representation distance of the measurement value similarity is greater than or equal to the distance threshold, encapsulating the measurement element into a new array and storing it in the second set.

[0042] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the user portrait generation method applied to a healthy home as described in any one of the above are implemented.

[0043] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the user portrait generation method applied to a healthy home as described in any one of the above are implemented.

[0044] The user portrait generation method applied to a healthy home provided by the present invention obtains the actual measurement values of a weighing scale, takes the actual measurement values as measurement elements and stores them in a preset first set according to the corresponding measurement time sequence. Traverse the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traverse all historical array elements in the second set to perform clustering analysis on the measurement elements and all historical array elements in the second set to obtain a clustering result. Then, determine the number of all array elements in the second set based on the clustering result, and determine the corresponding number of household users based on the number of all array elements in the second set. This method can quickly identify household users based on the analysis of weighing scale measurement data, effectively improving the identification efficiency, thereby facilitating the provision of personalized recommendations and services for users. Description of the Drawings

[0045] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0046] Figure 1 It is a schematic diagram of the hardware environment of the user portrait generation method applied to a healthy home according to an embodiment of the present application;

[0047] Figure 2 It is a flowchart of the user portrait generation method applied to a healthy home provided by the present invention;

[0048] Figure 3 It is a schematic diagram of the clustering result obtained by the user portrait generation method applied to a healthy home provided by the present invention;

[0049] Figure 4 It is a schematic structural diagram of a user portrait generation device applied to a healthy home provided by the present invention;

[0050] Figure 5 It is a schematic structural diagram of an electronic device provided by the present invention. Detailed implementation manners

[0051] In order to enable those skilled in the art of the present technology to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0053] According to one aspect of the embodiments of the present application, a user portrait generation method applied to a healthy home is provided. The user portrait generation method applied to a healthy home is widely applied to whole-house intelligent digital control application scenarios such as Smart Home, smart home, smart home appliance ecosystem, and Intelligence House ecosystem. Optionally, in this embodiment, the above-mentioned user portrait generation method applied to a healthy home can be applied to, for example, Figure 1 the hardware environment composed of the terminal device 102 and the server 104 as shown. As Figure 1As shown in the figure, the server 104 is connected to the terminal device 102 through a network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data operation services for the server 104.

[0054] The above network can include but is not limited to at least one of the following: wired network, wireless network. The above wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network. The above wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 is not limited to a PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projection device, smart TV, smart clothes hanger, smart curtain, smart audio and video, smart socket, smart speaker, smart sound box, smart fresh air device, smart kitchen and bathroom equipment, smart bathroom equipment, smart floor sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification device, smart steam box, smart microwave oven, smart kitchen water heater, smart purifier, smart water dispenser, smart door lock, etc.

[0055] Next, based on the user portrait generation method applied to a healthy home described in the present invention, its embodiments will be described in detail. As Figure 2 shown, it is a schematic flowchart of the user portrait generation method applied to a healthy home provided by the present invention. The specific implementation process includes the following steps:

[0056] Step 110: Obtain the measurement values of the weighing scale in the current period, use the measurement values as measurement elements and store them in a first set in the corresponding measurement time sequence; wherein, the measurement values include the measurement time of the weighing scale.

[0057] Specifically, the weighing scale can be a smart body fat scale, and its measurement data generally includes actual measurement values such as weight value, BMI (Body Mass Index) value, and the corresponding measurement time. In the embodiment of the present invention, the above actual measurement values can be used as measurement elements and stored in a preset first set in the corresponding measurement time sequence. For example: Select the measurement data of the weighing scale in the past six months. The actual measurement values include <weight value, BMI value, measurement time>. After removing abnormal measurement data, sort them by measurement time, and record the first set as A_set.

[0058] Step 120: Traverse the measurement elements in the first set based on the measurement time sequence, and traverse all the historical arrays in the second set to perform clustering analysis on the measurement elements and all the historical arrays in the second set to obtain a clustering result; wherein, the second set is obtained by performing clustering analysis on the measurement values of the weighing scale within a historical period, and each historical array contains one or more historical measurement values within the historical period.

[0059] In an embodiment of the present invention, the measurement elements in the first set can be traversed based on the measurement time sequence, and when the second set is not empty, all the historical array elements (i.e., historical arrays) in the second set are traversed to respectively determine the representation distance of the measurement value similarity between the measurement elements and all the historical array elements in the second set, compare the representation distance of the measurement value similarity with a preset distance threshold, and when the representation distances of the measurement value similarity are all greater than or equal to the distance threshold, encapsulate the corresponding measurement elements as new array elements and store them in the second set, and output the new array elements as the clustering result. The historical array elements are the array elements that were added to the second set after being encapsulated with the weighing scale measurement data before. The historical array elements are the historical arrays.

[0060] Among them, the actual measurement values also include weight values and body mass indices. Correspondingly, traversing the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traversing all historical array elements in the second set to respectively determine the representation distances of the measurement value similarities between the measurement elements and all historical array elements in the second set. The corresponding specific implementation process includes: traversing the measurement elements in the first set based on the measurement time sequence to obtain the weight values and body mass indices corresponding to the measurement elements arranged in chronological order; when the second set is not empty, traversing all historical array elements in the second set to obtain the weight values and body mass indices corresponding to the historical array elements; based on the weight values and body mass indices corresponding to the measurement elements and the weight values and body mass indices corresponding to the historical array elements, respectively calculating the distances between the measurement elements and all historical array elements to obtain the corresponding multiple representation distances of the measurement value similarities. Comparing the representation distances of the measurement value similarities with a preset distance threshold. When all the representation distances of the measurement value similarities are greater than or equal to the distance threshold, encapsulating the corresponding measurement elements into new array elements and storing them in the second set. The corresponding specific first process includes: comparing the multiple representation distances of the measurement value similarities with the distance threshold respectively. If all the multiple representation distances of the measurement value similarities are greater than or equal to the distance threshold, encapsulating the corresponding measurement elements into new array elements and storing them in the second set.

[0061] Further, the corresponding specific implementation process of calculating the distances between the measurement elements and all historical array elements respectively based on the weight values and body mass indices corresponding to the measurement elements and the weight values and body mass indices corresponding to the historical array elements to obtain the corresponding multiple representation distances of the measurement value similarities includes: first determining the corresponding similarity distance analysis model, and then inputting the weight values and body mass indices corresponding to the measurement elements and the weight values and body mass indices corresponding to the historical array elements into the similarity distance analysis model to respectively calculate the distances between the measurement elements and all historical array elements and obtain the multiple representation distances of the measurement value similarities output by the similarity distance analysis model. Specifically, the algorithm formula corresponding to the similarity distance analysis model can be:

[0062]

[0063] Among them, Z can be the calculated representation distance of the measurement value similarity; x1 can be the weight value corresponding to the historical array element; x2 can be the weight value corresponding to the current measurement element; y1 can be the body mass index corresponding to the historical array element; y2 can be the body mass index corresponding to the current measurement element.

[0064] In addition, after comparing the representation distance of the measurement value similarity with a preset distance threshold, the following steps are further included: when there is a case where the representation distance of the measurement value similarity is less than the distance threshold, a target array element corresponding to the measurement element is determined from the historical array elements, and the actual measurement value corresponding to the measurement element is used as the new measurement value of the target array element, so as to replace the old measurement value corresponding to the target array element with the new measurement value, store the new measurement value corresponding to the target array element into the second set, and output the target array element as the clustering result.

[0065] It should be noted that during the implementation of this step, after traversing the measurement elements in the first set based on the measurement time sequence, an initialization process of the second set is further included. That is, when the second set is empty, it is necessary to first encapsulate the measurement elements into initial array elements and store them in the second set. Each group of array elements corresponds to a household user, so that the number of household users can be accurately estimated through the actual measurement data of the weighing scale.

[0066] Step 130: Determine the target arrays currently included in the second set according to the clustering result, and generate one or more user portraits based on the target arrays currently included in the second set; wherein, the clustering result corresponds to one or more target arrays.

[0067] In the embodiment of the present invention, the number of all array elements in the second set can be determined according to the clustering result, and the corresponding number of household users can be determined based on the number of all array elements in the second set, and the number of household users is determined as the user portrait.

[0068] As Figure 3 shown, it is a display of the clustering result of the measurement data of a household user weighing scale. It can be seen that the measurement data of the household weighing scale is clustered into 5 categories, that is, the clustering result includes five groups, corresponding to five array elements in the second set. Therefore, the number of all array elements in the second set can be determined according to the clustering result, and the corresponding number of household users can be determined based on the number of all array elements in the second set. The number of array elements in the second set is equal to the number of household users.

[0069] Currently, the measurement data of a weighing scale (such as a smart body fat scale) generally includes three valid pieces of information: the weight value, the BMI (Body Mass Index) value, and the measurement time. How to estimate the number of household users based on the historical measurement data of the weighing scale. Currently, existing machine learning clustering models cannot perfectly solve this problem. One reason is that most clustering models do not consider the time dimension. For example, the dbscan model, while the measurement time of users is obviously an important dimension. For example, if two weight data both differ by 5 kg, but the measurement time differs by 1 day, it can be excluded that they are the same user. If the measurement time differs by 1 month, it is difficult to exclude. Another reason is that some clustering models require specifying the number of clusters (the K value) in advance, such as the Kmeans clustering and BIRCH clustering, while the number of clusters to be predicted in the present invention is exactly this, which obviously does not meet the requirements. The following is to solve this problem through the user portrait generation method of the present invention applied to a healthy home.

[0070] For example, in a specific embodiment of the present invention, Prepare: Select the measurement data of the weighing scale in the past six months. The actual measurement values include <weight value, BMI value>. After removing abnormal measurement data, sort them according to the measurement time, and record the first set (A_set or the first set A).

[0071] Begin:Initialization: d = n / / Initialize the second set (B_set or the second set B) corresponding to the elements of the household user's most recent scale array and the distance threshold d; for j from 0 to j < A_set.length do / / Traverse the measurement elements in the first set A_set in the order of measurement time. Assume the current traversed measurement element is the j-th one; if B_set is empty then / / If the second set B_set is empty; insert [A_set.j] into B_set / / Wrap the j-th measurement element in the first set A_set into an array and add it to the second set B; else / / If the second set B is not empty; for k from 0 to k < B_set.length do / / Traverse the historical array elements in the second set B. Assume the current traversed array element is the k-th one; calculate e_d = encluid_distance(A_set.j, B.k[0]) / / B.k[0] represents the latest measurement value of family member k, where 0 represents the latest measurement value; if e_d > n & k < B_set.length then / / If the distance representing the similarity of the measurement values is greater than the distance threshold and the array elements in the second set B have not been fully traversed; continue / / Then continue; elseif e_d > n & k == length[B] then / / If the distance is still greater than or equal to the distance threshold after traversing to the last array element in the second set B; insert [A_set.j] into B_set / / Consider this measurement value to represent a new member, wrap it into an array element and add it to the second set B; else / / There is a measurement value similar to the latest measurement value of a certain family member, and the corresponding distance representing the similarity of the measurement values <= the distance threshold n; insert A_set.j at the head of B_set.k / / Update the latest measurement value of this family member; end for Output: B_set.length f / / Output the number of array elements in the second set B; END.

[0072] The user portrait generation method for a healthy home provided by the present invention obtains the actual measurement values of a weighing scale, uses the actual measurement values as measurement elements and stores them in a preset first set in the corresponding measurement time sequence. Based on the measurement time sequence, it traverses the measurement elements in the first set, and when the second set is not empty, traverses all the historical array elements in the second set to perform cluster analysis on the measurement elements and all the historical array elements in the second set to obtain a clustering result. Furthermore, it determines the number of all array elements in the second set according to the clustering result, and determines the corresponding number of household users based on the number of all array elements in the second set. This method can quickly identify household users based on the analysis of the weighing scale measurement data, effectively improving the identification efficiency, thereby facilitating the provision of personalized recommendations and services for users.

[0073] The user portrait generation device for a healthy home provided by the present invention will be described below. The user portrait generation device for a healthy home described below can be correspondingly referred to the user portrait generation method for a healthy home described above. Refer to Figure 4 As shown, it is a schematic structural diagram of the user portrait generation device for a healthy home provided by the present invention. The user portrait generation device for a healthy home described in the present invention specifically includes the following parts:

[0074] The measurement value acquisition unit 401 is used to obtain the measurement values of the weighing scale in the current period, use the measurement values as measurement elements and store them as a first set in the corresponding measurement time sequence;

[0075] The cluster analysis unit 402 is used to traverse the measurement elements in the first set based on the measurement time sequence, and traverse all the historical arrays in the second set to perform cluster analysis on the measurement elements and all the historical arrays in the second set to obtain a clustering result; wherein, the second set is obtained by performing cluster analysis on the measurement values of the weighing scale in the historical period, and each historical array contains one or more historical measurement values in the historical period;

[0076] The household user number determination unit 403 is used to determine the target arrays currently included in the second set according to the clustering result, and generate one or more user portraits based on the target arrays currently included in the second set; wherein, the clustering result corresponds to one or more target arrays.

[0077] Furthermore, the cluster analysis unit is specifically used for:

[0078] Traverse the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traverse all the historical arrays in the second set to respectively determine the representation distances of the measurement value similarities between the measurement elements and all the historical arrays in the second set. When the representation distances of the measurement value similarities do not meet the set clustering strategy, encapsulate the measurement elements into new arrays and store them in the second set, and output the new arrays as the clustering results.

[0079] Further, after determining the representation distances of the measurement value similarities between the measurement elements and all the historical arrays in the second set, it further includes:

[0080] A measurement element encapsulation unit, configured to, when the representation distances of the measurement value similarities meet the set clustering strategy, encapsulate the measurement elements into the corresponding historical arrays in the second set to obtain new historical arrays, and output the new historical arrays as the clustering results.

[0081] Further, the step of, when the representation distances of the measurement value similarities meet the set clustering strategy, encapsulating the measurement elements into the corresponding historical arrays in the second set to obtain new historical arrays, and outputting the new historical arrays as the clustering results includes:

[0082] Compare and analyze the representation distances of the measurement value similarities with the distance threshold in the clustering strategy. When it is determined that the representation distances of the measurement value similarities are less than the distance threshold, determine the historical array corresponding to the measurement element from all the historical arrays, and use the measurement value corresponding to the measurement element as the new measurement value of the historical array, so as to replace the old measurement value in the historical array with the new measurement value, store the new measurement value corresponding to the historical array in the second set to obtain a new historical array, and output the new historical array as the clustering result.

[0083] Further, the measurement values include weight values and body mass indexes;

[0084] The step of traversing the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traversing all the historical arrays in the second set to respectively determine the representation distances of the measurement value similarities between the measurement elements and all the historical arrays in the second set specifically includes:

[0085] Traverse the measurement elements in the first set based on the measurement time sequence to obtain the weight values and body mass indexes corresponding to the measurement elements arranged in time sequence;

[0086] When the second set is not empty, traverse all the historical arrays in the second set to obtain the weight values and body mass indexes corresponding to the historical measurement values in the historical arrays;

[0087] Based on the weight values and body mass indexes corresponding to the measurement element, and the weight values and body mass indexes corresponding to the historical measurement values in the historical arrays, calculate the distances between the measurement element and all the historical arrays respectively, and obtain the corresponding multiple representation distances of the measurement value similarities.

[0088] Further, the step of calculating the distances between the measurement element and all the historical arrays respectively based on the weight values and body mass indexes corresponding to the measurement element, and the weight values and body mass indexes corresponding to the historical measurement values in the historical arrays, and obtaining the corresponding multiple representation distances of the measurement value similarities specifically includes:

[0089] Determine the corresponding similarity distance analysis model;

[0090] Input the weight values and body mass indexes corresponding to the measurement element, and the weight values and body mass indexes corresponding to the historical measurement values in the historical arrays into the similarity distance analysis model to calculate the distances between the measurement element and all the historical arrays respectively, and obtain the multiple representation distances of the measurement value similarities output by the similarity distance analysis model.

[0091] Further, when the representation distance of the measurement value similarity does not meet the set clustering strategy, encapsulate the measurement element into a new array and store it in the second set. Specifically, compare and analyze the representation distance of the measurement value similarity with the distance threshold in the clustering strategy respectively. When the representation distances of the measurement value similarity are all greater than or equal to the distance threshold, encapsulate the measurement element into a new array and store it in the second set.

[0092] The user portrait generation device applied to a smart home provided by the present invention obtains the actual measurement values of a weighing scale, takes the actual measurement values as measurement elements and stores them in a preset first set according to the corresponding measurement time sequence, traverses the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traverses all the historical array elements in the second set to perform clustering analysis on the measurement elements and all the historical array elements in the second set to obtain a clustering result, and then determines the number of all array elements in the second set according to the clustering result, and determines the corresponding number of household users based on the number of all array elements in the second set. This method can quickly identify household users based on the analysis of the weighing scale measurement data, effectively improving the identification efficiency, and thus facilitating the provision of personalized recommendations and services for users.

[0093] Figure 5Illustrates a schematic diagram of the physical structure of an electronic device, such as Figure 5 shown. The electronic device may include: a processor 501, a communications interface 504, a memory 502, and a communication bus 503. Among them, the processor 501, the communications interface 504, and the memory 502 communicate with each other through the communication bus 503. The processor 501 may call the logical instructions in the memory 502 to execute a method for generating a user profile for a healthy home. The method includes: obtaining the measured value of a weighing scale within the current period, using the measured value as a measurement element and storing it as a first set in the corresponding measurement time sequence; traversing the measurement elements in the first set based on the measurement time sequence, and traversing all historical arrays in a second set to perform clustering analysis on the measurement elements and all historical arrays in the second set to obtain a clustering result; where the second set is obtained by performing clustering analysis based on the measured values of the weighing scale within a historical period, and each historical array contains one or more historical measured values within the historical period; determining the target array currently included in the second set according to the clustering result, and generating one or more user profiles based on the target array currently included in the second set; where the clustering result corresponds to one or more target arrays.

[0094] In addition, when the logical instructions in the above-mentioned memory 502 can be implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.

[0095] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the user portrait generation method for a healthy home provided by each of the above methods. The method includes: obtaining the measurement value of a weighing scale in the current period, using the measurement value as a measurement element and storing it as a first set in the corresponding measurement time sequence; traversing the measurement elements in the first set based on the measurement time sequence, and traversing all historical arrays in a second set to perform cluster analysis on the measurement elements and all historical arrays in the second set to obtain a clustering result; wherein, the second set is obtained by performing cluster analysis based on the measurement values of the weighing scale in historical periods, and each historical array includes one or more historical measurement values in a historical period; determining the target array currently included in the second set according to the clustering result, and generating one or more user portraits based on the target array currently included in the second set; wherein, the clustering result corresponds to one or more target arrays.

[0096] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the user portrait generation method for a healthy home provided by each of the above. The method includes: obtaining the measurement value of a weighing scale in the current period, using the measurement value as a measurement element and storing it as a first set in the corresponding measurement time sequence; traversing the measurement elements in the first set based on the measurement time sequence, and traversing all historical arrays in a second set to perform cluster analysis on the measurement elements and all historical arrays in the second set to obtain a clustering result; wherein, the second set is obtained by performing cluster analysis based on the measurement values of the weighing scale in historical periods, and each historical array includes one or more historical measurement values in a historical period; determining the target array currently included in the second set according to the clustering result, and generating one or more user portraits based on the target array currently included in the second set; wherein, the clustering result corresponds to one or more target arrays.

[0097] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0098] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.

Claims

1. A method for generating a user profile applied to a healthy home, characterized in that, it includes: Obtain the measurement values of the weighing scale in the current period, use the measurement values as measurement elements and store them as a first set in the corresponding measurement time sequence; Traverse the measurement elements in the first set based on the measurement time sequence, and traverse all historical arrays in the second set to perform clustering analysis on the measurement elements and all historical arrays in the second set to obtain a clustering result; wherein, the second set is obtained by performing clustering analysis based on the measurement values of the weighing scale in the historical period, and each historical array contains one or more historical measurement values in the historical period; Determine the target arrays currently included in the second set according to the clustering result, and generate one or more user profiles based on the target arrays currently included in the second set; wherein, the clustering result corresponds to one or more target arrays.

2. The method for generating a user profile applied to a healthy home according to claim 1, characterized in that, The step of traversing the measurement elements in the first set based on the measurement time sequence, and traversing all historical arrays in the second set to perform clustering analysis on the measurement elements and all historical arrays in the second set to obtain a clustering result specifically includes: Traverse the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traverse all historical arrays in the second set to respectively determine the representation distance of the measurement value similarity between the measurement elements and all historical arrays in the second set. When the representation distance of the measurement value similarity does not meet the set clustering strategy, encapsulate the measurement elements into a new array and store it in the second set, and output the new array as the clustering result.

3. The method for generating a user profile applied to a healthy home according to claim 2, characterized in that, After determining the representation distance of the measurement value similarity between the measurement elements and all historical arrays in the second set, it further includes: When the representation distance of the measurement value similarity meets the set clustering strategy, encapsulate the measurement elements into the corresponding historical array in the second set to obtain a new historical array, and output the new historical array as the clustering result.

4. The method for generating a user profile applied to a healthy home according to claim 3, characterized in that, The step of when the representation distance of the measurement value similarity meets the set clustering strategy, encapsulating the measurement elements into the corresponding historical array in the second set to obtain a new historical array, and outputting the new historical array as the clustering result includes: Compare and analyze the representation distance of the measurement value similarity with the distance threshold in the clustering strategy. When it is determined that the representation distance of the measurement value similarity is less than the distance threshold, determine the historical array corresponding to the measurement element from all historical arrays, and use the measurement value corresponding to the measurement element as the new measurement value of the historical array, so as to replace the old measurement value in the historical array with the new measurement value, store the new measurement value corresponding to the historical array into the second set, obtain a new historical array, and output the new historical array as the clustering result.

5. The method for generating a user profile applied to a healthy home according to claim 2, wherein, the measurement values include weight values and body mass indices; Traverse the measurement elements in the first set based on the measurement time sequence, and when the second set is not empty, traverse all historical arrays in the second set to respectively determine the representation distances of the measurement value similarities between the measurement elements and all historical arrays in the second set, specifically including: Traverse the measurement elements in the first set based on the measurement time sequence to obtain the weight values and body mass indices corresponding to the measurement elements arranged in time sequence; When the second set is not empty, traverse all historical arrays in the second set to obtain the weight values and body mass indices corresponding to the historical measurement values in the historical arrays; Based on the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays, calculate the distances between the measurement elements and all historical arrays respectively, and obtain the corresponding multiple representation distances of the measurement value similarities.

6. The method for generating a user profile applied to a healthy home according to claim 5, wherein, The method for calculating the distances between the measurement elements and all historical arrays respectively based on the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays, and obtaining the corresponding multiple representation distances of the measurement value similarities, specifically includes: Determine the corresponding similarity distance analysis model; Input the weight values and body mass indices corresponding to the measurement elements, and the weight values and body mass indices corresponding to the historical measurement values in the historical arrays into the similarity distance analysis model to calculate the distances between the measurement elements and all historical arrays respectively, and obtain the multiple representation distances of the measurement value similarities output by the similarity distance analysis model.

7. The method for generating a user profile applied to a healthy home according to claim 2, wherein, When the representation distance of the measurement value similarity does not meet the set clustering strategy, encapsulate the measurement element into a new array and store it in the second set, specifically including: Compare and analyze the representation distance of the measurement value similarity and the distance threshold in the clustering strategy respectively. When the representation distances of the measurement value similarity are all greater than or equal to the distance threshold, encapsulate the measurement elements into a new array and store it in the second set.

8. A user portrait generation device applied to a healthy home, Characterized in that, Comprising: A measurement value acquisition unit, configured to acquire the measurement values of a weighing scale in the current period, use the measurement values as measurement elements, and store them in a first set in the corresponding measurement time sequence; A clustering analysis unit, configured to traverse the measurement elements in the first set based on the measurement time sequence, and traverse all historical arrays in the second set, so as to perform clustering analysis on the measurement elements and all historical arrays in the second set to obtain a clustering result; wherein, the second set is obtained by performing clustering analysis on the measurement values of the weighing scale in the historical period, and each historical array contains one or more historical measurement values in the historical period; A household user number determination unit, configured to determine the target arrays currently included in the second set according to the clustering result, and generate one or more user portraits based on the target arrays currently included in the second set; wherein, the clustering result corresponds to one or more target arrays.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, Characterized in that, When the processor executes the program, the steps of the user portrait generation method applied to a healthy home according to any one of claims 1 to 7 are implemented.

10. A non-transitory computer-readable storage medium, on which a computer program is stored, Characterized in that, When the computer program is executed by a processor, the steps of the user portrait generation method applied to a healthy home according to any one of claims 1 to 7 are implemented.