Intelligent home control method and system based on machine learning

Through the smart home control method based on machine learning, the shortcomings of the existing technology in multi-scene adaptation, user behavior prediction, device control strategy optimization and feedback mechanism improvement are solved, and efficient control and user experience improvement of smart home devices are achieved.

CN120195974AInactive Publication Date: 2025-06-24SHENZHEN RISHENGHUA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510152893.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing smart home control technology has shortcomings in adapting to multi-scenario applications, accurately predicting user behavior, optimizing device control strategies, and improving feedback mechanisms.

Method used

Using a smart home control method based on machine learning, we use smart home devices to select smart home devices, determine their status characteristics, generate status prediction models, conduct state trend prediction, generate candidate decision-making plans, conduct simulation exercises, and implement decision-making plans to achieve efficient control of smart home devices.

Benefits of technology

It realizes accurate prediction of user behavior in multiple scenarios, optimizes intelligent device control strategies, improves user experience, and adapts to real-time changing user needs and device operating environment through continuous training and updating models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120195974A_ABST
    Figure CN120195974A_ABST
Patent Text Reader

Abstract

The invention discloses a smart home control method and system based on machine learning, and the method comprises the steps: selecting a preset number of smart home devices, and obtaining a decision object; according to the decision-making object, determining a state feature of the decision-making object, obtaining a feature state set, and performing training to obtain a first state prediction model; according to the first state prediction model and related constraint conditions, generating a constraint feature set, and performing training to obtain a second state prediction model; performing state trend prediction according to a decision object and the second state prediction model to obtain a candidate state set; according to the candidate state set, generating a scheme to obtain a candidate decision scheme; performing simulation exercise according to the candidate decision scheme to obtain exercise feedback data; and implementing a decision scheme according to the exercise feedback data so as to realize control of the smart home equipment. According to the method, the user behavior can be accurately predicted in multiple scenes, and efficient smart home equipment control is carried out.
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 home, and particularly to a smart home control method and system based on machine learning. Background Art

[0002] With the rapid development of computer technology, information technology, and smart home technology, the number of smart devices and application scenarios in users' homes has shown a significant increase. Especially in the 5G era, the interaction ability between home smart devices has been greatly improved, enabling seamless connection in the same network. However, with the increase in devices and the complexity of functions, users are faced with the challenge of how to uniformly manage and efficiently control home smart devices.

[0003] The unified control of smart devices generally includes two parts: scenario management and status management. Current control and scheduling schemes are mainly designed for specific scenarios and cannot be applied to diverse scenarios. For example, when the user is resting, it is necessary to turn off or dim the lights to create a comfortable environment, but most existing schemes require manual operation by the user and cannot achieve automation through preset scenarios or voice control. This manual participation does not conform to the goal of smart home. In addition, existing schemes lack comprehensive consideration of the operating status of devices and their mutual influence, which may lead to unsatisfactory control effects. On the other hand, when the user's behavior pattern changes suddenly (such as temporarily adjusting the work and rest schedule or an emergency), existing technologies cannot accurately identify and adjust corresponding strategies. For example, the user's business trip behavior may cause changes in the work and rest time, and it is difficult for existing systems to quickly judge and respond through limited behavior data. In addition, existing smart home control schemes generally lack verification and feedback analysis of the implementation effects of control strategies, resulting in poor user experience and possible resource waste.

[0004] In summary, existing smart home control technologies have deficiencies in adapting to multi-scenario applications, accurately predicting user behavior, optimizing device control strategies, and the perfection of the feedback mechanism. Summary of the Invention

[0005] The present invention provides a smart home control method and system based on machine learning to accurately predict user behavior in multiple scenarios and perform efficient control of smart home devices.

[0006] In a first aspect, to solve the above technical problems, the present invention provides a smart home control method based on machine learning, including: Select a preset number of smart home devices to obtain decision-making objects; According to the decision-making objects, determine their state characteristics, obtain a feature state set, and perform training to obtain a first state prediction model; Generate a constraint feature set according to the first state prediction model and relevant constraint conditions, and perform training to obtain a second state prediction model; Perform state trend prediction according to the decision-making object and the second state prediction model to obtain a candidate state set; Generate candidate decision-making schemes according to the candidate state set; Conduct simulation drills according to the candidate decision-making schemes to obtain drill feedback data; Implement the decision-making scheme according to the drill feedback data to achieve the control of smart home devices.

[0007] As an alternative implementation, the step of determining the state characteristics of the decision-making object, obtaining a feature state set, and performing training to obtain a first state prediction model includes: Extract state characteristics according to the decision-making object to obtain state characteristic data; Perform data cleaning and preprocessing on the state characteristic data to obtain a training data set; Perform model training using a machine learning algorithm according to the training data set to obtain a first state prediction model.

[0008] As an alternative implementation, the step of generating a constraint feature set according to the first state prediction model and relevant constraint conditions, and performing training to obtain a second state prediction model includes: Obtain initial constraint data according to the first state prediction model and the relevant constraint conditions; Extract constraint condition characteristics from the initial constraint data to obtain a constraint feature set; Use a machine learning algorithm to perform training according to the constraint feature set to generate a second state prediction model.

[0009] As an alternative implementation, the step of performing state trend prediction according to the decision-making object and the second state prediction model to obtain a candidate state set includes: Predict the change trend of state characteristics according to the decision-making object and the second state prediction model to obtain state change data; Generate the change trend of state characteristics according to the state change data to obtain the change trend of state characteristics; Generate candidate states according to the change trend of state characteristics to obtain a candidate state set.

[0010] As an alternative implementation, the step of generating candidate decision-making schemes according to the candidate state set includes: Perform state combination calculation according to the candidate state set to obtain potential state combinations; Based on the potential state combinations, perform a feasibility analysis of different state combinations, and filter out a set of states that meet the preset conditions; Based on the set of states, generate random decision-making plans to obtain a candidate decision-making plan set.

[0011] As an optional implementation manner, perform a simulation exercise based on the candidate decision-making plan to obtain exercise feedback data, including: Based on the candidate decision-making plan, perform a random plan selection to obtain input data; Based on the input data, use the Monte Carlo method to perform a simulation exercise to obtain feedback data on the decision-making object and constraint conditions during the exercise; Based on the feedback data, calculate the credibility of the decision-making plan to obtain the plan credibility; Based on the plan credibility, evaluate the candidate decision-making plan to obtain the final exercise feedback data.

[0012] As an optional implementation manner, based on the feedback data, calculate the credibility of the decision-making plan to obtain the plan credibility. The calculation formula of the plan credibility is as follows: Wherein, is the number of feedback data samples corresponding to the selected th candidate decision-making plan, is the total number of feedback data samples of all candidate decision-making plans, is the th candidate decision-making plan's plan credibility.

[0013] As an optional implementation manner, the method further includes: Based on the exercise feedback data, perform data preprocessing and remove redundant values to obtain clean feedback data after preprocessing; Based on the clean feedback data, perform user behavior modeling to obtain a user behavior model; Based on the clean feedback data, re-perform state prediction modeling of the decision-making object to obtain a state prediction feedback model; When the user behavior model or the state prediction feedback model changes, based on the feedback data, calculate the decision result accuracy to obtain decision result accuracy data; Based on the decision result accuracy data, re-determine the model adjustment period to ensure that the model adapts to changes in the environment and user needs.

[0014] As an alternative implementation, when the user behavior model or the state prediction feedback model changes, based on the feedback data, decision result accuracy calculation is performed to obtain decision result accuracy data. The calculation formula for the decision result accuracy calculation is as follows: Wherein, represents the decision result accuracy, represents the th decision result, represents the th actual result, represents the number of decision results.

[0015] In a second aspect, the present invention provides a smart home control system based on machine learning, including: An object selection module, configured to select a preset number of smart home devices to obtain decision-making objects; A first state prediction module, configured to determine the state characteristics thereof according to the decision-making objects, obtain a feature state set, and perform training to obtain a first state prediction model; A second state prediction module, configured to generate a constraint feature set according to the first state prediction model and relevant constraint conditions, and perform training to obtain a second state prediction model; A trend prediction module, configured to perform state trend prediction according to the decision-making objects and the second state prediction model to obtain a candidate state set; A solution generation module, configured to generate a candidate decision-making solution according to the candidate state set; A simulation exercise module, configured to perform a simulation exercise according to the candidate decision-making solution to obtain exercise feedback data; An implementation decision module, configured to implement a decision-making solution according to the exercise feedback data to achieve the control of smart home devices.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a smart home control method based on machine learning, including: selecting a preset number of smart home devices to obtain decision-making objects; determining their state features according to the decision-making objects, obtaining a feature state set, and training to obtain a first state prediction model; generating a constraint feature set according to the first state prediction model and relevant constraint conditions, and training to obtain a second state prediction model; performing state trend prediction according to the decision-making objects and the second state prediction model to obtain a candidate state set; generating a candidate decision-making plan according to the candidate state set; performing a simulation exercise according to the candidate decision-making plan to obtain exercise feedback data; and implementing the decision-making plan according to the exercise feedback data to achieve the control of smart home devices.

[0017] In the present invention, by continuously collecting feedback data on the device operation status and user behavior, the state prediction model and the user behavior model are continuously trained and updated, so that the model can adapt to the real-time changing user needs and device operation environment, improve the accuracy and flexibility of prediction, and through the introduction of machine learning algorithms, accurate prediction of user behavior in multiple scenarios is achieved, thereby enabling efficient control of smart devices. Brief Description of the Drawings

[0018] Figure 1 is a schematic flowchart of a smart home control method based on machine learning provided by an embodiment of the present invention; Figure 2 is a schematic structural diagram of a smart home control system based on machine learning provided by an embodiment of the present invention. Detailed Embodiment

[0019] With the rapid development of computer technology, information technology, and smart home technology, the number of smart devices and application scenarios in users' homes has shown a significant increase. Especially in the 5G era, the interaction ability between home smart devices has been greatly improved, enabling seamless connection in the same network. However, with the increase in the number of devices and the complexity of functions, users are faced with the challenge of how to uniformly manage and efficiently control home smart devices.

[0020] The unified control of intelligent devices generally includes two parts: scenario management and status management. The current control and scheduling solutions are mainly designed for specific scenarios and cannot be applied to diverse scenarios. For example, when the user is resting, it is necessary to turn off or dim the lights to create a comfortable environment. However, most of the existing solutions require manual operation by the user and cannot achieve automation through preset scenarios or voice control. This manual participation does not conform to the goal of smart home. In addition, the existing solutions lack comprehensive consideration of the operating status of devices and their mutual influences, which may lead to unsatisfactory control effects. On the other hand, when the user's behavior pattern changes suddenly (such as temporarily adjusting the work and rest schedule or an unexpected event), the existing technologies cannot accurately identify and adjust the corresponding strategies. For example, the user's business trip behavior may lead to changes in the work and rest time, and it is difficult for the existing system to quickly judge and respond through limited behavior data. In addition, the existing smart home control solutions generally lack verification and feedback analysis of the implementation effects of control strategies, resulting in poor user experience and possible resource waste.

[0021] In summary, the existing smart home control technologies have deficiencies in aspects such as adapting to multi-scenario applications, accurately predicting user behavior, optimizing device control strategies, and the perfection of the feedback mechanism.

[0022] To solve the above existing problems, the present invention provides a smart home control method and system based on machine learning to accurately predict user behavior in multiple scenarios, so as to perform efficient intelligent device control.

[0023] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0024] Referring to Figure 1 , the first embodiment of the present invention provides a smart home control method based on machine learning, including the following steps: S11, select a preset number of smart home devices to obtain decision objects; S12, according to the decision objects, determine their state characteristics, obtain a feature state set, and perform training to obtain a first state prediction model; S13, according to the first state prediction model and relevant constraint conditions, generate a constraint feature set, and perform training to obtain a second state prediction model; S14, according to the decision objects and the second state prediction model, perform state trend prediction to obtain a candidate state set; S15, according to the candidate state set, generate a candidate decision plan; S16. Conduct a simulation exercise based on the candidate decision-making plan to obtain exercise feedback data; S17. Implement the decision-making plan based on the exercise feedback data to achieve the control of smart home devices.

[0025] In step S11, select a preset number of smart home devices to obtain decision-making objects.

[0026] It should be noted that the preset number here refers to a value or range preset according to specific application scenarios or system design requirements. This number can be fixed or dynamically adjusted, specifically depending on the flexibility of the system and the needs of users. Exemplarily, in the present invention, the preset number is set to 5. Of course, according to different application scenarios and user needs, the preset number can also be set to other numbers such as 3 or 10. The present invention does not limit this. The decision-making object refers to the smart home devices selected in step S11. These devices will participate in the subsequent decision-making process to obtain the characteristic data of the devices. There are various ways to select devices. The system can randomly select a certain number of devices as decision-making objects, or select devices according to the priority or status of the devices (such as online status, power status, etc.), and can also select the devices commonly used by users according to user preferences or historical usage records. Exemplarily, in the present invention, the selection method adopted is to select according to user preferences. Of course, according to different application scenarios and user needs, other methods can also be adopted for the selection method. The present invention does not limit this.

[0027] In step S12, the process of determining its state characteristics according to the decision-making object, obtaining a characteristic state set, and conducting training to obtain the first state prediction model includes: Extract state characteristics according to the decision-making object to obtain state characteristic data; Perform data cleaning and preprocessing on the state characteristic data to obtain a training data set; Use a machine learning algorithm to conduct model training on the training data set to obtain the first state prediction model.

[0028] It should be noted that the state feature extraction process obtains data from the real-time operation data of the decision-making object, mainly including the temperature, humidity, power consumption, operation mode, and working state parameters of the device. Through state feature extraction, the key information of the current operation of the device can be captured, providing basic data for subsequent model training. The extracted state feature data may contain outliers, redundant data, or noise data, which are caused by sensor failures, communication delays, or external environmental interferences. Through data cleaning and preprocessing, outliers can be removed, missing values can be filled, and data normalization or standardization can be performed to ensure the quality and consistency of the training data. The training data set after cleaning and preprocessing contains high-quality state feature data, which is the key input for model training. By adopting appropriate machine learning algorithms and after a certain number of training rounds, a first state prediction model is generated to predict the future state change trend of the device. Exemplarily, the machine learning algorithm adopted in the present invention is the support vector machine. Of course, according to different application scenarios and user requirements, the machine learning algorithm can also be set to other machine learning algorithms such as random forest and linear regression, and the present invention does not limit this.

[0029] Among them, the support vector machine (Support Vector Machine, SVM) is a commonly used supervised learning algorithm, especially suitable for classification and regression problems. The support vector machine is a binary classification model, and its core idea is to find an optimal hyperplane (in a high-dimensional space) to separate data points of different classes as much as possible. For regression problems, SVM predicts continuous values by introducing the "ε-insensitive loss function". SVM regression (SVR) minimizes the error between the predicted value and the actual value while keeping the model complexity low. Using the SVR (support vector regression) model, the historical state data and related features (such as time, environmental conditions, etc.) of the device are used as inputs to train the model, and SVM will output the continuous value prediction result of the future state of the device. In the state prediction of smart home devices, SVM can handle high-dimensional feature spaces and is suitable for complex device state prediction problems (such as combining multi-dimensional features such as time series and environmental parameters). By maximizing the classification boundary, SVM can effectively avoid overfitting and has strong generalization ability. By introducing kernel functions (such as linear kernel, polynomial kernel, RBF kernel, etc.), SVM can handle non-linear problems and adapt to complex state prediction requirements.

[0030] It should be noted that the setting of the model training rounds is a key parameter in the process of machine learning model training. It determines the number of iterations of the model on the entire training dataset, directly affecting the convergence speed, performance, and overfitting risk of the model. If the set training rounds are too few, the model has not fully learned the patterns in the data, resulting in underfitting. If the set training rounds are too many, the model will gradually approach the optimal solution, taking more training time and consuming more computing resources. A reasonable setting of the model training rounds needs to be adjusted in combination with the data scale, model type, and actual requirements. Common methods include manual setting, early stopping, learning rate decay, and staged training. Exemplarily, the method adopted in the present invention is early stopping. Of course, according to different actual application scenarios and user requirements, other methods can also be used for the setting of the training rounds, and the present invention does not limit this.

[0031] In step S13, the generating a constraint feature set according to the first state prediction model and relevant constraint conditions and training to obtain a second state prediction model includes: Obtaining initial constraint data according to the first state prediction model and the relevant constraint conditions; Performing constraint condition feature extraction on the initial constraint data to obtain a constraint feature set; Training according to the constraint feature set using a machine learning algorithm to generate a second state prediction model.

[0032] It should be noted that the initial constraint data refers to the initial data set generated through the state prediction model and relevant constraint conditions. The generation process of this data set is to combine the output result of the state prediction model with the constraint conditions in the actual application scenario, thereby forming an initial data set containing prediction results and constraint information. In the embodiment of the present invention, the initial constraint data includes the predicted state of the device (such as energy consumption, switch state, etc.) and relevant constraint conditions (such as energy consumption upper limit, working time range, etc.). By comparing the prediction results with the constraint conditions, the initial constraint data can be generated, providing a basis for subsequent feature extraction and model optimization. Constraint condition feature extraction refers to extracting features closely related to the constraint conditions from the initial constraint data to form a constraint feature set. This process is to screen out the features that have an important impact on the constraint conditions from the initial data, such as the working time of the device, energy consumption value, environmental parameters, etc. Through constraint condition feature extraction, a feature set containing key constraint information can be generated, providing high-quality input data for subsequent model training.

[0033] It should be noted that the constraint feature set refers to the feature set obtained by extracting features through constraint conditions and is used to train the second state prediction model. This feature set contains key features closely related to the constraint conditions, such as the energy consumption constraint feature, time constraint feature, and environmental constraint feature of the device, etc. In the embodiment of the present invention, the role of the constraint feature set is to combine the constraint conditions with the device state prediction, thereby improving the prediction accuracy and robustness of the model. By using the constraint feature set for training, the second state prediction model can better capture the relationship between the device state and the constraint conditions, and thus show higher prediction ability in practical applications. The second state prediction model refers to the model generated after being trained using the constraint feature set and is used to more accurately predict the device state. The generation process of this model is to input the constraint feature set into a machine learning algorithm for training, thereby obtaining a model that can combine the constraint conditions for state prediction. In the embodiment of the present invention, the second state prediction model can more accurately predict the energy consumption state of the device, while considering constraint conditions such as the energy consumption upper limit and working time. By using the constraint feature set for training, the second state prediction model can better capture the relationship between the device state and the constraint conditions, and thus show higher prediction accuracy and reliability in practical applications. Exemplarily, the machine learning algorithm adopted in the present invention is the support vector machine. Of course, according to different application scenarios and user requirements, the machine learning algorithm can also be set to other machine learning algorithms such as random forest and linear regression, and the present invention does not make any limitations in this regard. The generation process of the second state prediction model is to input the constraint feature set into a machine learning algorithm for training, thereby obtaining a model that can combine the constraint conditions for state prediction. This process combines the constraint conditions with the device state prediction, thereby improving the prediction accuracy and robustness of the model. Through this process, the second state prediction model can better combine the constraint conditions and improve the prediction accuracy and robustness.

[0034] In step S14, the performing state trend prediction based on the decision object and the second state prediction model to obtain a candidate state set includes: Performing a state feature change trend prediction based on the decision object and the second state prediction model to obtain state change data; Generating a change trend of the state feature based on the state change data to obtain a state feature change trend; Generating candidate states based on the state feature change trend to obtain a candidate state set.

[0035] It should be noted that the state change data refers to the data obtained by predicting the state feature change trend through the decision-making object and the second state prediction model. The generation process of this data set is to input the state features of the decision-making object into the second state prediction model to predict the change trend of the device state in a future period of time. In the embodiments of the present invention, the state change data includes the change trend of the device's energy consumption, the change trend of the switch state, and the change trend of environmental parameters, etc. Through the state change data, the future change trend of the device state can be understood, providing a basis for the subsequent generation of the state feature change trend and the generation of the candidate state set. The state feature change trend refers to the change trend of the device state features generated according to the state change data in a future period of time. This process is to analyze and process the state change data to extract the dynamic change law of the device state features. In the embodiments of the present invention, the state feature change trend includes the energy consumption change curve of the device, the change law of the switch state, and the change curves of parameters such as environmental temperature and humidity. Through the state feature change trend, the dynamic change law of the device state can be more clearly described, providing support for the subsequent generation of candidate states.

[0036] It should be noted that the candidate state set refers to the set of possible states of the device in a future period of time generated according to the changing trend of state characteristics. The generation process of this set is to further process the changing trend of state characteristics to generate various possible states of the device in a future period of time. In the embodiments of the present invention, the candidate state set includes the range of energy consumption values of the device, the possible combinations of switch states, and the range of changes in environmental parameters. Through the candidate state set, various possible solutions can be provided for the optimization and decision-making of the device state, thereby improving the flexibility and intelligence level of the system. The generation process of the candidate state set refers to generating a set of various possible states of the device in a future period of time according to the changing trend of state characteristics. This process is to further process the changing trend of state characteristics to generate the range of energy consumption values of the device in a future period of time, the possible combinations of switch states (such as on or off), and the range of changes in environmental parameters. In the embodiments of the present invention, the generation process of the candidate state set includes the following steps: generating the range of energy consumption values of the device in a future period of time according to the changing trend of state characteristics; generating the possible combinations of the switch states (such as on or off) of the device in a future period of time according to the changing trend of state characteristics; generating the possible range of changes in parameters such as environmental temperature and humidity according to the changing trend of state characteristics. Through the candidate state set, the system can select the optimal state solution according to actual needs, thereby improving the operating efficiency of the device and the user experience. Among them, various technical means can be adopted for the generation method of the candidate state set. In the embodiments of the present invention, the generation of the candidate state set adopts a method based on time series analysis, and by modeling the changing trend of state characteristics, various possible states of the device in a future period of time are predicted. In addition, a method based on Monte Carlo simulation can also be adopted, and various possible combinations of device states are generated by random sampling. These methods can effectively generate the candidate state set and provide support for subsequent decision-making and optimization.

[0037] In step S15, the generating a candidate decision-making plan according to the candidate state set includes: Performing state combination calculation according to the candidate state set to obtain potential state combinations; Performing feasibility analysis on different state combinations according to the potential state combinations, and screening out a set of states that meet the preset conditions; Performing random decision-making plan generation according to the set of states to obtain a candidate decision-making plan set.

[0038] It should be noted that the potential state combinations refer to all possible state combinations obtained by performing state combination calculations based on the candidate state set. This process combines various possible states in the candidate state set to generate various possible state combinations of the device at different time points. For example, in the embodiments of the present invention, the candidate state set includes the energy consumption value range of the device, the possible combinations of switch states, and the change range of environmental parameters, etc. By performing combination calculations on these states, various possible state combinations of the device at different time points can be generated. For example, the energy consumption state combination: the combination of energy consumption values of the device at different time points; the switch state combination: the combination of switch states (such as on or off) of the device at different time points; the environmental parameter combination: the combination of environmental temperature, humidity and other parameters of the device at different time points. Through the potential state combinations, various possible state changes of the device in a future period of time can be comprehensively described, providing a basis for subsequent feasibility analysis. Feasibility analysis refers to performing a feasibility assessment of different state combinations based on the potential state combinations and screening out the state set that meets the preset conditions. This process evaluates the potential state combinations and screens out the state combinations that meet the preset conditions. For example, in the embodiments of the present invention, the preset conditions include: energy consumption constraint: the energy consumption value of the device cannot exceed the preset upper limit; time constraint: the working time of the device must be within the specified time range; environmental constraint: the environmental parameters (such as temperature, humidity) must be within a reasonable range. By performing feasibility analysis on the potential state combinations, the state set that meets these constraint conditions can be screened out, thus ensuring the practical feasibility of the generated decision-making scheme.

[0039] It is worth noting that the state set refers to the set of state combinations that meet the preset conditions screened out through feasibility analysis. The generation process of this set is to evaluate the potential state combinations and screen out the state combinations that meet the preset conditions. In the embodiments of the present invention, the state set includes: the energy consumption state set: the combination of energy consumption values that meet the energy consumption constraint; the switch state set: the combination of switch states that meet the time constraint; the environmental parameter set: the combination of environmental parameters that meet the environmental constraint. Through the state set, it can be ensured that the generated decision-making scheme is feasible in practical applications, thus providing high-quality input data for the subsequent generation of random decision-making schemes. The generation of random decision-making schemes refers to generating various possible decision-making schemes based on the state set to form a candidate decision-making scheme set. This process randomly samples the state set to generate various possible decision-making schemes. The candidate decision-making scheme set refers to the set of various possible decision-making schemes obtained through the generation of random decision-making schemes. In the embodiments of the present invention, the candidate decision-making scheme set includes: the energy consumption decision-making scheme: the combination of energy consumption values at different time points; the switch state decision-making scheme: the combination of switch states at different time points; the environmental parameter decision-making scheme: the combination of environmental parameters at different time points. Through the candidate decision-making scheme set, various possible decision-making schemes can be provided for the system.

[0040] In step S16, based on the candidate decision-making scheme, a simulation exercise is carried out to obtain exercise feedback data, including: Based on the candidate decision-making scheme, a random scheme selection is carried out to obtain input data; Based on the input data, the Monte Carlo method is used to carry out a simulation exercise to obtain feedback data on the decision-making object and constraint conditions during the exercise; Based on the feedback data, a credibility calculation of the decision-making scheme is carried out to obtain the scheme credibility; Based on the scheme credibility, an evaluation of the candidate decision-making scheme is carried out to obtain the final exercise feedback data.

[0041] It should be noted that the input data refers to the data obtained after randomly selecting a solution based on the candidate decision-making solutions. This process involves randomly selecting from the candidate decision-making solutions to generate a set of input data for subsequent simulation exercises. In the embodiments of the present invention, the candidate decision-making solutions include the energy consumption decision-making solution of the device, the switch state decision-making solution, and the environmental parameter decision-making solution, etc. By randomly selecting from these solutions, a set of input data can be generated for subsequent simulation exercises. The Monte Carlo method simulation exercise refers to using the Monte Carlo method to perform a simulation exercise on the input data to obtain the feedback data of the decision-making object and the constraint conditions in the exercise. This process evaluates the performance of the decision-making solution in actual applications through random sampling and multiple simulations. In the embodiments of the present invention, the Monte Carlo method simulation exercise includes the following steps: randomly sampling the input data to generate multiple simulation scenarios; in each simulation scenario, evaluating the execution effect of the decision-making solution, including the energy consumption of the device, the switch state, and the environmental parameters, etc.; recording the feedback data in each simulation scenario, including the interaction situation between the decision-making object and the constraint conditions. Through the Monte Carlo method simulation exercise, the feasibility and stability of the decision-making solution can be comprehensively evaluated, providing a basis for subsequent credibility calculation. The feedback data refers to the interaction data between the decision-making object and the constraint conditions obtained through the Monte Carlo method simulation exercise. The generation process of this data set is to record the execution effect of the decision-making solution in different simulation scenarios through simulation exercises. Through the feedback data, the performance of the decision-making solution in the simulation exercise can be comprehensively evaluated, providing support for subsequent credibility calculation. The solution credibility refers to the credibility index of the decision-making solution calculated based on the feedback data. This process analyzes and calculates the feedback data to quantitatively evaluate the reliability and stability of the decision-making solution. The candidate decision-making solution evaluation refers to evaluating the candidate decision-making solutions based on the solution credibility to obtain the final exercise feedback data. This process evaluates the advantages and disadvantages of the candidate decision-making solutions by analyzing and comparing the solution credibility. In the embodiments of the present invention, the candidate decision-making solution evaluation includes the following steps: sorting the candidate decision-making solutions according to the solution credibility; selecting the decision-making solution with the highest credibility as the optimal solution; recording the detailed information of the optimal solution, including the energy consumption value, the switch state, and the environmental parameters, etc., to generate the final exercise feedback data. Through the candidate decision-making solution evaluation, the optimal decision-making solution can be screened out to provide support for actual applications.

[0042] It is worth noting that according to the feedback data, the credibility of the decision-making solution is calculated to obtain the solution credibility, and the calculation formula of the solution credibility is as follows: Wherein, is the number of feedback data samples corresponding to the selected th candidate decision-making solution, is the total number of feedback data samples of all candidate decision-making solutions. is the confidence level of the th candidate decision scheme.

[0043] It should be noted that is the number of feedback data samples corresponding to the selected th candidate decision scheme. The feedback data samples include energy consumption values, switch states, environmental parameters, etc. of the device. is the total number of feedback data samples of all candidate decision schemes, which is the sum of the feedback data samples generated by all candidate decision schemes in the simulation exercise. is the confidence level of the th candidate decision scheme, which is measured by calculating the proportion of the number of feedback data samples of the th scheme in the total amount of all feedback data samples. By calculating , the confidence level of the th candidate decision scheme can be quantified. The higher the confidence level, the more feedback data samples are generated by the scheme in the simulation exercise, indicating that the scheme has higher stability and reliability in practical applications. By comparing the values of different candidate decision schemes, the advantages and disadvantages of each scheme can be evaluated, and thus the optimal decision scheme can be selected.

[0044] In step S17, according to the exercise feedback data, implement the decision scheme to achieve the control of smart home devices.

[0045] It should be noted that the exercise feedback data refers to the feedback data obtained through the simulation exercise in step S16, including the confidence level of the decision scheme, the execution effect, and the change of the device state, etc. The implementation of the decision scheme is to analyze and evaluate the exercise feedback data, select the optimal decision scheme, and apply it to the actual device control. In the embodiment of the present invention, the implementation of the decision scheme includes the following steps: select the decision scheme with the highest confidence level according to the exercise feedback data; send the selected decision scheme to the smart home device to perform the corresponding control operation; monitor the change of the device state to ensure the execution effect of the decision scheme. Through the implementation of the decision scheme, the intelligent control of smart home devices can be achieved, and the operation efficiency and user experience of the devices can be improved.

[0046] Among them, the smart home control method based on machine learning further includes: Perform data preprocessing on the exercise feedback data and remove redundant values to obtain clean feedback data after preprocessing; Perform user behavior modeling according to the clean feedback data to obtain a user behavior model; According to the clean feedback data, re-perform state prediction modeling of the decision object to obtain a state prediction feedback model; When the user behavior model or the state prediction feedback model changes, based on the feedback data, calculate the accuracy of the decision result to obtain decision result accuracy data; Based on the decision result accuracy data, re-determine the model adjustment period to ensure that the model adapts to changes in the environment and user requirements.

[0047] It should be noted that data preprocessing and redundancy value removal are carried out by cleaning and deduplicating the exercise feedback data to ensure the accuracy and consistency of the data. Through data preprocessing and redundancy value removal, clean feedback data can be obtained, providing high-quality input data for subsequent user behavior modeling and state prediction modeling. User behavior modeling is carried out by analyzing and modeling the clean feedback data to construct a user behavior model. In the embodiments of the present invention, user behavior modeling includes the following steps: extracting user behavior characteristics from the clean feedback data, such as operation time, operation frequency, device usage preferences, etc.; using a clustering model to model the user behavior characteristics; evaluating the performance of the user behavior model to ensure the accuracy and reliability of the model. Through user behavior modeling, the operation habits and preferences of users can be better understood, providing support for optimizing the decision-making scheme. The state prediction feedback model is a state prediction model reconstructed by analyzing and modeling the clean feedback data. Through the state prediction feedback model, the future state of the decision-making object can be predicted more accurately, providing support for optimizing the decision-making scheme. The calculation of the decision result accuracy is to evaluate the accuracy of the decision result by analyzing and calculating the feedback data. The re-determination of the model adjustment period is to dynamically adjust the update period of the model by analyzing the decision result accuracy data. Through the re-determination of the model adjustment period, it can be ensured that the model can timely adapt to changes in the environment and user requirements, improving the accuracy and stability of the decision-making scheme.

[0048] It is worth noting that when the user behavior model or the state prediction feedback model changes, based on the feedback data, calculate the accuracy of the decision result to obtain decision result accuracy data. The calculation formula for the decision result accuracy is as follows: Wherein, represents the accuracy of the decision result, represents the th decision result, represents the th actual result, represents the number of decision results.

[0049] It should be noted that, represents the accuracy of the decision result, that is, the proportion of the absolute error between all decision results and the actual results in the total sum of the actual results. represents the A decision result, that is, a result generated by model prediction or decision-making scheme. Denote the th actual result, that is, the result observed in actual application. By calculating , the accuracy of the decision result can be quantified. The higher the accuracy, the smaller the difference between the decision result and the actual result. When the value is large, it indicates that there is a large difference between the prediction result of the model and the actual result, and the model needs to be adjusted and optimized.

[0050] Referring to Figure 2 , the second embodiment of the present invention provides a smart home control system based on machine learning, including: An object selection module, configured to select a preset number of smart home devices to obtain decision-making objects; A first state prediction module, configured to determine the state characteristics according to the decision-making objects, obtain a feature state set, and perform training to obtain a first state prediction model; A second state prediction module, configured to generate a constraint feature set according to the first state prediction model and relevant constraint conditions, and perform training to obtain a second state prediction model; A trend prediction module, configured to perform state trend prediction according to the decision-making objects and the second state prediction model to obtain a candidate state set; A scheme generation module, configured to generate a candidate decision-making scheme according to the candidate state set; A simulation exercise module, configured to perform a simulation exercise according to the candidate decision-making scheme to obtain exercise feedback data; An implementation decision module, configured to implement a decision-making scheme according to the exercise feedback data to achieve the control of smart home devices.

[0051] It should be noted that the smart home control system based on machine learning provided by the embodiment of the present invention is used to execute all the process steps of the smart home control method based on machine learning in the above embodiment. The working principles and beneficial effects of the two correspond one by one, so they will not be elaborated here.

[0052] In summary, in the present invention, by continuously collecting feedback data on the device operation status and user behavior, the state prediction model and the user behavior model are continuously trained and updated, so that the model can adapt to the real-time changing user needs and device operation environment, improve the accuracy and flexibility of prediction, and through the introduction of machine learning algorithms, the accurate prediction of user behavior in multiple scenarios is realized, so as to perform efficient intelligent device control.

[0053] An embodiment of the present invention further provides a terminal device. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a smart home control program based on machine learning. When the processor executes the computer program, the steps in each of the above-described embodiments of the smart home control method based on machine learning are implemented, such as Figure 1 the step S11 shown. Alternatively, when the processor executes the computer program, the functions of each module / unit in each of the above-described system embodiments are implemented.

[0054] Exemplarily, the computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.

[0055] The terminal device may be a computing device such as a desktop computer, a notebook, a palm computer, and a smart tablet. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above components are only examples of the terminal device and do not constitute a limitation on the terminal device. It may include more or fewer components than the above, or combine certain components, or different components. For example, the terminal device may further include input / output devices, network access devices, a bus, etc.

[0056] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the terminal device and connects various parts of the entire terminal device through various interfaces and lines.

[0057] The memory can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory and invoking the data stored in the memory, the processor can implement various functions of the terminal device. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

[0058] Among them, if the modules / units integrated in the terminal device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or system that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0059] It should be noted that the system 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 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. In addition, in the accompanying drawings of the system embodiments provided by the present invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0060] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. In particular, for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A smart home control method based on machine learning, characterized in that: Executed by the server, including: Select a preset number of smart home devices to obtain decision objects; According to the decision object, determine its state characteristics, obtain a characteristic state set, and perform training to obtain a first state prediction model; Generate a constraint feature set according to the first state prediction model and related constraint conditions, and perform training to obtain a second state prediction model; Performing state trend prediction according to the decision object and the second state prediction model to obtain a candidate state set; Generate a solution based on the candidate state set to obtain a candidate decision solution; Conducting simulation exercises according to the candidate decision-making schemes to obtain exercise feedback data; Based on the exercise feedback data, a decision-making plan is implemented to achieve control of smart home devices.

2. The smart home control method based on machine learning according to claim 1, characterized in that: According to the decision object, its state characteristics are determined, Obtain a feature state set and perform training to obtain a first state prediction model, including: According to the decision object, state feature extraction is performed to obtain state feature data; According to the state characteristic data, data cleaning and preprocessing are performed to obtain a training data set; Based on the training data set, a machine learning algorithm is used to perform model training to obtain a first state prediction model.

3. The smart home control method based on machine learning according to claim 1, characterized in that: The step of generating a constraint feature set according to the first state prediction model and related constraint conditions, and training the second state prediction model includes: Obtaining initial constraint data according to the first state prediction model and the relevant constraint conditions; Extracting constraint condition features according to the initial constraint data to obtain a constraint feature set; According to the constraint feature set, a machine learning algorithm is used for training to generate a second state prediction model.

4. The smart home control method based on machine learning according to claim 1, characterized in that: The step of performing state trend prediction according to the decision object and the second state prediction model to obtain a candidate state set includes: According to the decision object and the second state prediction model, predict the state characteristic change trend to obtain state change data; Generating a change trend of the state characteristics according to the state change data to obtain a change trend of the state characteristics; According to the changing trend of the state characteristics, candidate states are generated to obtain a candidate state set.

5. The smart home control method based on machine learning according to claim 1, characterized in that: The generating of a solution according to the candidate state set to obtain a candidate decision solution includes: Performing state combination calculation according to the candidate state set to obtain a potential state combination; According to the potential state combinations, feasibility analysis of different state combinations is performed to screen out state sets that meet preset conditions; According to the state set, random decision solutions are generated to obtain a set of candidate decision solutions.

6. The smart home control method based on machine learning according to claim 1, characterized in that: The step of performing a simulation exercise according to the candidate decision-making scheme to obtain exercise feedback data includes: According to the candidate decision solutions, random solution selection is performed to obtain input data; According to the input data, a simulation exercise is performed using the Monte Carlo method to obtain feedback data of decision objects and constraints in the exercise; Calculating the credibility of the decision-making solution based on the feedback data to obtain the solution credibility; According to the credibility of the scheme, the candidate decision schemes are evaluated to obtain the final exercise feedback data.

7. The smart home control method based on machine learning according to claim 6, characterized in that: The credibility of the decision-making scheme is calculated based on the feedback data to obtain the scheme credibility. The calculation formula of the scheme credibility is as follows: in, For the selected The number of feedback data samples corresponding to the candidate decision solutions, is the total number of feedback data samples of all candidate decision solutions, For the The credibility of the candidate decision solutions.

8. The smart home control method based on machine learning according to claim 1, characterized in that: The method further comprises: According to the exercise feedback data, data preprocessing is performed and redundant values ​​are removed to obtain preprocessed clean feedback data; Performing user behavior modeling based on the clean feedback data to obtain a user behavior model; Re-performing state prediction modeling of the decision object according to the clean feedback data to obtain a state prediction feedback model; When the user behavior model or the state prediction feedback model changes, the decision result accuracy is calculated according to the feedback data to obtain decision result accuracy data; Based on the accuracy data of the decision results, the model adjustment cycle is re-determined to ensure that the model adapts to changes in the environment and user needs.

9. The smart home control method based on machine learning according to claim 8, characterized in that: When the user behavior model or the state prediction feedback model changes, the decision result accuracy is calculated according to the feedback data to obtain the decision result accuracy data. The calculation formula for the decision result accuracy calculation is as follows: in, represents the accuracy of the decision result, Indicates The decision result, Indicates The actual results, Indicates the number of decision outcomes.

10. A smart home control system based on machine learning, characterized in that: include: An object selection module is used to select a preset number of smart home devices to obtain a decision object; A first state prediction module, used to determine the state characteristics of the decision object, obtain a characteristic state set, and perform training to obtain a first state prediction model; A second state prediction module, used to generate a constraint feature set according to the first state prediction model and related constraint conditions, and perform training to obtain a second state prediction model; A trend prediction module, used to perform state trend prediction based on the decision object and the second state prediction model to obtain a candidate state set; A solution generation module, used to generate a solution based on the candidate state set to obtain a candidate decision solution; A simulation exercise module, used to conduct a simulation exercise according to the candidate decision-making scheme to obtain exercise feedback data; The decision-making module is used to implement a decision-making plan according to the exercise feedback data to achieve control of smart home devices.

Citation Information

Cited By

  • Equipment control method and device, electronic equipment and readable storage medium

    CN121254650A