User leaving time length prediction system and application verification system
By acquiring user lifestyle data through sensors and using neural network models to predict the length of time away from home, the problem of manual operation is solved in smart home systems when leaving home, realizing automated prediction of the length of time away from home and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-10
AI Technical Summary
In existing smart home systems, users need to manually operate smart home devices when they leave home, lacking automated functions to predict the duration of absence, resulting in unintelligent and inconvenient operation.
By acquiring data on whether a user's room is occupied by sensors, and using a neural network model to predict the duration of time away from home based on the user's lifestyle, a user away-from-home prediction system is established. This system relies on the user's historical lifestyle data and is suitable for new users without requiring a cold start.
It enables automated prediction of away time, improves the intelligence and user experience of smart home control, is suitable for new users, and avoids cold start issues.
Smart Images

Figure CN121644630A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home control, and in particular to a user away-from-home duration prediction system based on user living habits and an application verification system. BACKGROUND
[0002] With the rapid development of technology, smart home technology is gradually changing the way of life of users. As one of the core components of a smart home system, a smart sensor is a device that can sense measured information and convert it into a usable signal according to certain rules. In a smart home system, a smart sensor can not only sense and collect environmental data in real time, but also monitor various state information in a room (such as temperature, humidity, light, human activity, etc.). Through a smart sensor installed in the room, information about whether there is human activity in the room can be obtained in real time, and the information is transmitted to a central control system for processing to achieve intelligent control of the smart home.
[0003] When a user is away from home, the user may remotely control the smart home before returning home, for example, by setting a timing start time or starting immediately, and turning on the air conditioner in advance. However, this method requires the user to operate before returning home each time, which is not very smart. SUMMARY
[0004] To solve the problems pointed out in the background, the present application provides a user away-from-home duration prediction system, which can use user historical living habit data to predict the user away-from-home duration, assist in smart home control, and the prediction system does not depend on user individual data, has prediction universality, and solves the new user cold start problem.
[0005] To achieve the above-mentioned application purposes, some embodiments of the present application adopt the following technical solutions: Some embodiments of the present application relate to a user away-from-home duration prediction system, comprising: a sensor unit configured to obtain user room presence / absence data at each time point and upload the data to the cloud; a data acquisition unit configured to obtain a historical data sequence of user room presence / absence data at each time point from the cloud; a data processing unit configured to perform sliding window processing on the historical data sequence at a fixed time interval t to obtain a plurality of first data sets and a plurality of corresponding second data sets, each first data set comprising a plurality of consecutive presence / absence data within a continuous time T, and the corresponding second data set comprising a plurality of consecutive presence / absence data within a continuous time duration after the time T; wherein, at each time point within the fixed time interval t, there is no presence / absence data, corresponding to no presence / absence data within t, and at least one time point within the fixed time interval t has presence / absence data, corresponding to presence / absence data within t; The data filtering unit filters multiple sets of first data, and selects the data set in each set of first data where the last sliding window contains no data and the second to last sliding window contains data of people. The first modeling unit trains the neural network model based on multiple sets of first data after filtering and multiple sets of second data corresponding to the multiple sets of first data; Predict the duration of a user's absence from home using a trained neural network model; Among them, unmanned data is marked with one of 1 and 0, and manned data is marked with the other of 1 and 0.
[0006] Some embodiments of this application involve a user's away-from-home duration prediction system, which relies on the user's home-leaving and home-returning habits, obtains data on whether the user's room is occupied at various times, and predicts the duration of the user's away-from-home based on the occupancy data. This prediction system relies on the occupancy data of a certain user, realizes the universality of model prediction, does not impose restrictions on new users, and solves the cold start problem for new users.
[0007] Furthermore, the model's predictions rely on users' lifestyles, enabling personalized interactive control and improving the user experience.
[0008] In some embodiments of this application, the fixed time interval t is 5~30 min.
[0009] In some embodiments of this application, the number of data in each first data set is greater than the number of data in each second data set.
[0010] In some embodiments of this application, the neural network model is an MLP fully connected neural network, an LSTM long short memory network, or a CNN convolutional neural network.
[0011] Considering the characteristics of the input and output data when predicting the duration of users away from home, as well as the hidden temporal relationships in the data, this application uses a neural network model for prediction, and can choose any one of the following: MLP fully connected neural network, LSTM long short memory network, and CNN convolutional neural network.
[0012] In some embodiments of this application, the multiple sets of first data after filtering and the multiple sets of second data corresponding to the multiple sets of first data are divided into training sets and test sets; The neural network model is trained using a training set, and after the neural network model is trained, it is validated and tested using a test set.
[0013] Some embodiments of this application also relate to an application verification system based on the user's time away from home, including: The sensor unit is used to acquire data on whether the user's room is occupied at various times and upload it to the cloud; The data acquisition unit is used to acquire historical data sequences from the cloud, showing whether a user's room is occupied at various points in time. The data processing unit performs sliding window processing on the historical data sequence at fixed time intervals t to obtain multiple sets of first data sets and multiple sets of corresponding second data sets. Each set of first data sets includes multiple consecutive data sets of whether or not people are present within a continuous time period T, and the corresponding set of second data sets includes multiple consecutive data sets of whether or not people are present within a continuous time period after the time period T. Among them, each time point within a fixed time interval t is unmanned data, corresponding to unmanned data within t; at least one time point within a fixed time interval t is occupied data, corresponding to occupied data within t. The data filtering unit filters multiple sets of first data, and selects the data set in each set of first data where the last sliding window contains no data and the second to last sliding window contains data of people. The first modeling unit trains a neural network model based on multiple sets of first data after filtering and multiple sets of second data corresponding to the multiple sets of first data. The predictive data processing unit uses a trained neural network model to predict the duration of a user's absence from home, and processes the predicted value of whether there is a user or not within each fixed time interval t in the predicted data sequence to 0 or 1, so as to obtain multiple processed predicted data sequences. The labeling unit is based on the predicted values and their corresponding real values in multiple processed prediction data sequences. The effect labels that affect the user's actual control are manually labeled, and the effect labels are 0 or 1. The second modeling unit, corresponding to the manually labeled data, takes the predicted values and their corresponding real values from multiple processed prediction data sequences as input data and the manually labeled data as output data to train the ensemble learning model. The validation unit uses a trained ensemble learning model to validate the application effect of predicted values and their corresponding real values in multiple processed prediction data sequences that have not been manually labeled, and obtains the application validation effect label.
[0014] Some embodiments of this application involve an application verification system that uses manually labeled data to verify the user's actual control based on the prediction results obtained from the above prediction model. It can obtain the effect labels of actual control in batches and help measure the actual application accuracy of intelligent control after predicting the user's away time.
[0015] In some embodiments of this application, the application verification system further includes: The evaluation unit evaluates the accuracy of the actual application of user control based on the application verification effect label.
[0016] In some embodiments of this application, the ensemble learning model is gradient boosting decision or random forest.
[0017] In some embodiments of this application, the predicted values and their corresponding true values in multiple processed prediction data sequences, as well as the manually labeled data, are divided into training sets and test sets; The ensemble learning model is trained using the training set, and after the ensemble learning model is trained, it is validated and tested using the test set.
[0018] Other features and advantages of the present invention will become clearer after reading the detailed embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of an air conditioner. Figure 2 The flowchart below shows the user's away time prediction system based on this application. Figure 3 Here is a block diagram of the user's away-from-home time prediction system proposed in this application; Figure 4 A schematic diagram illustrating the number of the first and second data sets involved in the user away-from-home duration prediction system proposed in this application; Figure 5 This is a schematic diagram illustrating the relationship between the prediction model, input data, and output data in the user away-from-home duration prediction system proposed in this application; Figure 6 The structural framework of the application verification system proposed in this application Figure 1 ; Figure 7 This is a flowchart for verifying the effectiveness of the application verification system proposed in this application; Figure 8 This is a schematic diagram illustrating the relationship between the application effect verification model, input data, and output data in the application verification system proposed in this application. Figure 9The data consists of the processed predicted and actual values output by the prediction model in the household away-from-home time prediction system proposed in this application, as well as manually labeled effect data. Figure 10 The structural framework of the application verification system proposed in this application Figure 2 .
[0021] Figure label: 100. User away-from-home duration prediction system; 110. Sensor unit; 120. Data acquisition unit; 130. Data processing unit; 140. Data filtering unit; 150. First modeling unit; 200. Application verification system; 210. Predictive data processing unit; 220. Labeling unit; 230. Second modeling unit; 240. Verification unit; 250. Evaluation unit. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0024] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0025] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0026] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0027] The following disclosure provides many different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. In addition, examples of various specific processes and materials are provided in this invention, but those skilled in the art will recognize the application of other processes and / or the use of other materials.
[0028] With the continuous advancement of sensor technology and the widespread application of smart home systems, massive amounts of home environment data have been generated. This data includes not only environmental data inside and outside the room and equipment operation data, but also important information such as users' living habits and behavioral patterns.
[0029] Based on users' habits of leaving and returning home, smart home devices can be controlled, enhancing the interactive experience.
[0030] Some embodiments of this application involve smart home devices, not limited to air conditioners, smart speakers, air purifiers, smart lights, etc. Based on the collection, storage and analysis of big data information on users' home habits when leaving and returning home, the system can understand users' home behavior and better realize interactive control between users and home devices.
[0031] This explanation will use an air conditioner as an example of a smart home device. To facilitate understanding of how an air conditioner works, the basic working principle of an air conditioner will be introduced below.
[0032] See Figure 1 An air conditioner executes a refrigeration cycle using a compressor, condenser, expansion valve, and evaporator. The refrigeration cycle involves a series of processes, including compression, condensation, expansion, and evaporation, to cool or heat an indoor space.
[0033] Low-temperature, low-pressure refrigerant enters the compressor, which compresses it into a high-temperature, high-pressure refrigerant gas and discharges the compressed refrigerant gas. The discharged refrigerant gas flows into the condenser. The condenser condenses the compressed refrigerant into a liquid phase, and the heat is released to the surrounding environment through the condensation process.
[0034] The expansion valve expands the high-temperature, high-pressure liquid refrigerant that condenses in the condenser into a low-pressure liquid refrigerant. The evaporator evaporates the expanded refrigerant in the expansion valve and returns the low-temperature, low-pressure refrigerant gas to the compressor. The evaporator achieves its cooling effect by utilizing the latent heat of refrigerant evaporation to exchange heat with the material being cooled. Throughout the cycle, the air conditioner regulates the temperature of the indoor space.
[0035] The outdoor unit of an air conditioner refers to the part of the refrigeration cycle that includes the compressor and the outdoor heat exchanger. The indoor unit of an air conditioner includes the indoor heat exchanger, and an expansion valve can be provided in either the indoor or outdoor unit.
[0036] The indoor and outdoor heat exchangers function as either condensers or evaporators. When the indoor heat exchanger is used as a condenser, the air conditioner functions as a heater in heating mode; when the indoor heat exchanger is used as an evaporator, the air conditioner functions as a cooler in cooling mode.
[0037] Users can control the air conditioner by turning it on and setting it to cool or high fan speed; or by turning it on and setting it to heat or high fan speed.
[0038] In some embodiments of this application, smart home control generally occurs during user interaction after they leave home. Therefore, it is necessary to predict the duration of user absence. To this end, a user absence duration prediction system 100 based on user living habits is provided to predict the duration of user absence.
[0039] This user's away-from-home time prediction system mainly includes two aspects: creating a dataset and building a model. (See...) Figure 2 First, create the dataset, then build the model.
[0040] The user's lifestyle habits here refer to their behavior when they are away from home and when they return home.
[0041] In some embodiments of this application, see Figure 3 The user's time away from home prediction system 100 includes a sensor unit 110, a data acquisition unit 120, a data processing unit 130, and a data filtering unit 140, which are used to create a dataset.
[0042] In some embodiments of this application, the user away-from-home duration prediction system 100 further includes a first modeling unit 150, which is used to build a model.
[0043] Machine learning algorithms are used to train historical data, and a predictive model for the duration of users' absence from home is established using the first modeling unit 150. Machine learning is an important branch of artificial intelligence. By simulating the human learning process, the computer system can automatically acquire knowledge and experience from the data, thereby continuously optimizing its performance.
[0044] The following is a detailed description of the working process of each unit in the user away-from-home time prediction system 100.
[0045] The data on whether a user's room is occupied is detected by sensor unit 110, which can detect whether there are people in the room at various time points (e.g., 9:10 on August 31, 2023) and upload the data to the cloud server for storage on a regular basis.
[0046] The room here refers to the space where smart home devices need to be controlled, such as a living room or a bedroom.
[0047] For ease of use, data on whether someone is present or not is recorded as either 0 or 1, and data on whether someone is absent or not is recorded as either 0 or 1.
[0048] In some embodiments of this application, the data of whether there is a person or not is recorded as 1 when there is a person, and the data of whether there is a person or not is recorded as 0 when there is no person.
[0049] When data is needed, the data acquisition unit 120 exports data on whether the room is occupied at various points in time from the cloud database, forming a historical data sequence.
[0050] As mentioned above, although the upload times are specified as individual points in time, the uploads are not necessarily every minute. You can set an upload interval, such as every 5 or 10 minutes, to avoid uploading too much data and burdening cloud storage.
[0051] For example, uploads are made every 10 minutes. The upload times are: 9:00 AM on August 31, 2023 (i.e., 1 for "Is anyone here?"), 9:10 AM on August 31, 2023 (i.e., 1 for "Is anyone here?"), 9:20 AM on August 31, 2023 (i.e., 1 for "Is anyone here?"), 9:30 AM on August 31, 2023 (i.e., 1 for "Is anyone here?"), 9:40 AM on August 31, 2023 (i.e., 0 for "Is anyone here?"), 9:50 AM on August 31, 2023 (i.e., 0 for "Is anyone here?"), 10:00 AM on August 31, 2023 (i.e., 0 for "Is anyone here?"), etc.
[0052] The historical data sequence described above includes data on whether or not people were present at each point in time.
[0053] For example, the historical data sequence between 9:00 and 10:00 on August 31, 2023 is 1111000.
[0054] Because machine learning has the characteristic of a fixed number of input variables, while the number of times a user leaves and returns home each day is not fixed, we do not choose to use data on the time when the user leaves and returns home as input data. Instead, we choose to use data on whether the room is empty within a fixed time interval t as the dataset. The fixed time interval t can be any value between 5 and 30 minutes.
[0055] In some embodiments of this application, a fixed time interval t can be selected as 20 minutes.
[0056] For example, 9:01-9:20 on August 31, 2023, 9:21-9:40 on August 31, 2023, 9:41-10:00 on August 31, 2023, and so on.
[0057] Because the data reporting time to the cloud server is inconsistent with the specified fixed time interval, the raw data needs to be processed. This processing is performed by the data processing unit 130.
[0058] For historical data sequences, if no data is recorded at any time point within a fixed time interval t, that fixed time interval is recorded as unmanned data; if at least one time point within a fixed time interval t contains human data, that fixed time interval is recorded as human data.
[0059] For example, during the 20-minute time interval from 9:01 to 9:20 on August 31, 2023, since there were people getting off at 9:00, 9:10, and 9:20, the data for this period is considered to be occupied, and is recorded as 1.
[0060] During the 20-minute time interval from 9:30 to 9:50 on August 31, 2023, since there were people at 9:30, no one at 9:40, and no one at 9:50, the data for this period is considered to be occupied, and is recorded as 1.
[0061] During the 20-minute time interval from 9:40 to 10:00 on August 31, 2023, since there were no users at 9:40, 9:50, and 10:00, the data for this period is considered as 0 (no user data).
[0062] The data processing unit 130 performs sliding window processing on the historical data sequence at fixed time intervals t (e.g., 20 min) to obtain multiple sets of first data sets and corresponding sets of second data sets. Each set of first data sets includes multiple consecutive data on whether people are present or absent within a continuous time period T. The second data set corresponding to the first data set includes multiple consecutive data on whether people are present or absent within a continuous time period after time T.
[0063] For example, for the historical data sequence 1111000 between 9:00 and 10:00 on August 31, 2023, a sliding window process of 20 minutes can be performed 3 times to obtain data 110.
[0064] If the historical data sequence spans a long enough period, more data can be obtained through a sliding window.
[0065] In some embodiments of this application, the number of data in each first data set and the number of data in each second data set can be preset.
[0066] In some embodiments of this application, the number of data points in each first data set is greater than the number of data points in each second data set, ensuring that sufficient input data is used when training the model and improving model accuracy.
[0067] In some embodiments of this application, see Figure 4 The number of data points in each first data set can be set as the number of data points in a continuous time interval t, a = T / t, where T is in minutes.
[0068] For example, the number of 20-minute intervals over 7 days is a = 7 * 24 * 60 / 20.
[0069] In this way, continuous sliding window processing will produce multiple sets of first data.
[0070] Correspondingly, within a time period T' following the aforementioned continuous time T, multiple sets of second data are obtained, with the same number of sets as the first data set.
[0071] In some embodiments of this application, see Figure 4 The number of data points in each second data set can be set as the number of data points b = T' / t after a continuous time interval t following T, where T is in minutes.
[0072] In some embodiments of this application, T' is the n (e.g., n=3) consecutive hours after T, in which case b=n*60 / 20.
[0073] The specific time n can be determined based on the desired duration of the prediction. If the user wants to predict the duration within the next three hours, then n=3; if the user wants to predict the duration within the next five hours, then n=5.
[0074] After obtaining the multiple sets of first data and the corresponding multiple sets of second data as described above, in order to accurately estimate the duration of a user's absence from home, it is necessary to filter the first data sets.
[0075] The filtering of the first dataset is performed by the data filtering unit 140.
[0076] The data in the first dataset needs to be such that the last sliding window shows no one (i.e., 0), while the second to last sliding window shows no one (i.e., 1). In other words, the current input data indicates that the user has just left home.
[0077] For example, if the first set of filtered data is 11111100000111010, it means that the user has just left home. Using this as input data to predict the duration of the user's absence from home is relatively accurate.
[0078] After filtering the data as described above, multiple sets of first data and multiple sets of second data corresponding to the multiple sets of first data are obtained. Considering the characteristics of the input and output data and the hidden temporal relationships in the data, a neural network model is selected for prediction, and the neural network model is trained using these data sets.
[0079] In some embodiments of this application, the neural network model can be a fully connected MLP (Multilayer Perceptron), an LSTM (Long Short-Term Memory) network, or a CNN (Convolutional Neural Network).
[0080] First, the first modeling unit 150 trains the neural network model using the selected multiple sets of first data and the corresponding multiple sets of second data as data information for historical moments.
[0081] For example, see Figure 5 The first set of filtered data obtained at the current time t1 and the time 7*24*60 minutes before the current time t1 is used as the input data, and the second set of data obtained at the time t1+3*60 minutes is used as the corresponding output data. This set of corresponding input and output data is used as the input and output of the neural network model, respectively, to train the model.
[0082] The selected sets of first data and corresponding sets of second data are divided into training set I and test set I. The neural network model is then trained using training set I. After the model is trained, the model is validated using test set I. Once the validation is successful (e.g., the mean squared error is less than a small threshold), the neural network model can be used for prediction.
[0083] When using a trained neural network model for prediction, for example, if the input data is 11111110000010 and the output result is the predicted data within 3 hours, such as 111010, then based on the current time t1 and the data marked as 1 in the output data, the length of time the user has been away from home can be inferred.
[0084] For example, at the current time t1, the first three 1s in 111010 indicate that the user is at home within 1 hour after t1, leaves home between t1+60min and t1+80min, stays at home between t1+80min and t1+100min, and leaves home between t1+100min and t1+120min. This can be used to predict the duration of the user's absence from home.
[0085] The above-mentioned user away-from-home time prediction system 100 can download historical lifestyle data of multiple users from the cloud server for modeling. It has high accuracy and universality. When new users use it, there is no need to collect data from new users. The prediction can be made by using the data of new users' away-from-home habits, thus avoiding the cold start problem for new users.
[0086] Based on the predicted duration of time users are away from home, the smart home system can interact and control smart home devices, and specific user application controls can be implemented according to user needs.
[0087] In some embodiments of this application, when the above model is verified using test set I, it is found that a large number of data with prediction errors have no impact on the control effect when performing corresponding intelligent interactive control, resulting in the actual application accuracy of the model being much greater than the prediction accuracy.
[0088] Therefore, to measure accuracy in practical applications, see [reference needed]. Figure 6 It shows a structural diagram of the application verification system 200, and see alsoFigure 7 The flowchart shown is for the application verification system 200.
[0089] In some embodiments of this application, the application verification system 200 uses machine learning models to learn the annotation patterns in manually labeled data based on the effect labels that affect the actual control effect, and generates an application effect verification model. This model can batch verify the actual application effect for all test set I data, thereby more accurately measuring the actual application accuracy.
[0090] See Figure 6 and Figure 7 The application verification system 200 is based on the user away time prediction system 100 as described above. Therefore, in addition to the units in the user away time prediction system 100 as described above, the application verification system 200 also includes a prediction data processing unit 210, a labeling unit 220, a second modeling unit 230, and a verification unit 240.
[0091] Based on the prediction model, multiple predicted data sequences can be obtained from the data in the test set I above.
[0092] Each predicted data sequence includes multiple predicted values, and each predicted value represents whether there is human data within the corresponding time interval.
[0093] However, since the prediction algorithm involved in the prediction model described above is a regression problem, the presence or absence data of the predicted values are decimals between 0 and 1. Therefore, the prediction data processing unit 210 is used to convert the decimals into presence or absence data within each fixed time interval.
[0094] In some embodiments of this application, when the predicted value reaches the lower limit of the threshold, the predicted value is modified to 0 (i.e., no data), and when the predicted value reaches the upper limit of the threshold, the predicted value is modified to 1 (i.e., data with people).
[0095] The threshold can be set according to the specific needs of the actual application. It can be a specific value or a range of values, where 0 < x < 1.
[0096] For multiple sets of input data in test set I, there will be multiple sets of corresponding real output data. As described above, after the prediction model and prediction data are processed, multiple processed prediction data sequences will also be output, corresponding to the multiple sets of input data. That is, a set of input data, a set of real values, and a processed prediction data sequence correspond to each other.
[0097] For example, given a set of input data in test set I, we get a processed predicted data sequence of 111111111 (i.e., the predicted value) and a set of true output data 100111111 (i.e., the true value).
[0098] See Figure 9 This illustrates multiple sets of true values (denoted as 1_t, 2_t, 3_t, ..., 9_t) and multiple sets of predicted values (denoted as 1_p, 2_p, ..., 9_t) corresponding to the input data in multiple test sets I.
[0099] Use as many groups as possible (e.g., more than 2000) to ensure the accuracy of the model can be verified by applying the following methods.
[0100] In some embodiments of this application, based on each set of actual values and predicted values, and combined with the detailed control logic of the function to be implemented by the user (e.g., whether the user needs to turn on the air conditioner and adjust the air conditioner's cooling and high fan speed), the predicted value results are manually judged to determine whether they will affect the actual application effect of the user's control.
[0101] The effect labels that affect the user's actual control are manually labeled using labeling unit 220, with the effect label being 0 or 1.
[0102] In some embodiments of this application, for each set of true and predicted values, an effect label (denoted as is_true) is manually labeled.
[0103] When the effect label is 0, it means that the predicted value affects the application effect; when the effect label is 1, it means that the predicted value does not affect the application effect.
[0104] against Figure 9 After labeling the data, see [link / reference]. Figure 9 The last column in the middle.
[0105] In some embodiments of this application, see Figure 8 The actual and predicted values corresponding to the input data of multiple test sets I are used as input data, and manually labeled effect data are used as output data. Based on the ensemble learning model, the second modeling unit is used to model the application effect verification model.
[0106] Multiple sets of real values, predicted values, and manually labeled data are divided into training set II and test set II. The ensemble learning model is then trained using training set II. After the model is trained, it is validated using test set II. Once the validation is successful, the model can be used for prediction.
[0107] In some embodiments of this application, the ensemble learning model is gradient boosting decision or random forest.
[0108] After establishing the above application effect verification model, in order to evaluate the accuracy of actual application, the application effect of test set II is verified using verification unit 240.
[0109] For multiple sets of predicted and actual values in test set II that have not been manually labeled, input them into the application effect verification model. The output results are the application verification effect labels for each set of predicted values and the corresponding actual values. That is, 0 indicates that the predicted value affects the application effect, and 1 indicates that it does not affect the application effect.
[0110] It can perform batch verification on data in test set II that has not been manually labeled, and obtain application verification effect labels.
[0111] By analyzing the application verification effect labels, it can be determined whether the predicted values affect the actual control effect.
[0112] In some embodiments of this application, see Figure 10 The application verification system 200 also includes an evaluation unit 250, which is used to calculate the actual application accuracy of a certain actual control based on the predicted duration of the user's absence from home.
[0113] The actual application accuracy can be obtained by dividing the number of application effect labels that are 1 by the total number of all output application effect labels.
[0114] In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0115] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A user away-from-home duration prediction system, characterized by, The system comprises: a sensor unit for acquiring data on the presence or absence of a user in a room at each time point and uploading the data to the cloud; a data acquisition unit for acquiring a historical data sequence of the presence or absence of a user in a room at each time point from the cloud; a data processing unit for performing sliding window processing on the historical data sequence at a fixed time interval t to obtain a plurality of first data sets and a plurality of corresponding second data sets, each first data set comprising a plurality of consecutive presence or absence data within a continuous time T, and the corresponding second data set comprising a plurality of consecutive presence or absence data within a continuous time duration after the time T; wherein the data at each time point within the fixed time interval t is absence data, and the data within the fixed time interval t is absence data, and at least one time point within the fixed time interval t is presence data, and the data within the fixed time interval t is presence data; a data screening unit for screening the plurality of first data sets to screen out a data set in which the last sliding window is absence data and the second last sliding window is presence data in each first data set; a first modeling unit for training a neural network model based on the plurality of first data sets after screening and the plurality of second data sets corresponding to the plurality of first data sets; using the trained neural network model to predict the length of time a user is away from home; wherein the absence data is marked as one of 1 and 0, and the presence data is marked as the other of 1 and 0.
2. The system for predicting the length of time a user is away from home according to claim 1, wherein the fixed time interval t is 5-30 minutes.
3. The system for predicting the length of time a user is away from home according to claim 1 or 2, wherein the number of data in each first data set is greater than the number of data in each second data set.
4. The system for predicting the length of time a user is away from home according to claim 1, wherein the neural network model is an MLP fully connected neural network, an LSTM long short-term memory network, or a CNN convolutional neural network.
5. The system for predicting the length of time a user is away from home according to claim 1, wherein the plurality of first data sets after screening and the plurality of second data sets corresponding to the plurality of first data sets are divided into a training set and a test set; the neural network model is trained using the training set, and after the training of the neural network model is completed, the neural network model is tested using the test set.
6. An application verification system based on the length of time a user is away from home, characterized by, The system comprises: a sensor unit for acquiring data on the presence or absence of a user in a room at each time point and uploading the data to the cloud; a data acquisition unit for acquiring a historical data sequence of the presence or absence of a user in a room at each time point from the cloud; a data processing unit for performing sliding window processing on the historical data sequence at a fixed time interval t to obtain a plurality of first data sets and a plurality of corresponding second data sets, each first data set comprising a plurality of consecutive presence or absence data within a continuous time T, and the corresponding second data set comprising a plurality of consecutive presence or absence data within a continuous time duration after the time T; Wherein, the fixed time interval t is a person data, and the fixed time interval t is a person data. The data screening unit screens the multiple sets of first data sets, and screens out the data set in which the last sliding window is unmanned data and the second last sliding window is manned data in each set of first data sets. The first modeling unit trains the neural network model based on the multiple sets of first data sets after screening and the multiple sets of second data sets corresponding to the multiple sets of first data sets. The prediction data processing unit uses the trained neural network model to predict the user departure time, and processes the prediction value of the presence or absence of people data in each fixed time interval t in the prediction data sequence as 0 or 1 to obtain multiple processed prediction data sequences. The labeling unit manually labels the effect label affecting the actual control of the user based on the prediction value and the corresponding true value in the multiple processed prediction data sequences, and the effect label is 0 or 1. The second modeling unit corresponds to the manually labeled, and uses the prediction value and the corresponding true value in the multiple processed prediction data sequences as input data, and uses the manually labeled data as output data to train the ensemble learning model. The verification unit uses the trained ensemble learning model to verify the application effect of the prediction value and the corresponding true value in the multiple processed prediction data sequences which have not been manually labeled.
7. The application verification system of claim 6, wherein, The application verification system further comprises: The evaluation unit evaluates the actual application accuracy of the actual control of the user based on the user departure time prediction based on the application verification effect label.
8. The application verification system of claim 6, wherein The ensemble learning model is gradient boosting decision or random forest.
9. The application verification system of claim 6, wherein The prediction value and the corresponding true value in the multiple processed prediction data sequences, and the manually labeled data are divided into a training set and a test set. The ensemble learning model is trained using the training set, and after the training of the ensemble learning model is completed, the test set is used to verify the test of the ensemble learning model.
10. The application verification system of claim 6, wherein The fixed time interval t is 5-30 min.