Control method and device of electric curtain, electronic equipment and storage medium
Through training models to predict the control instructions of electric curtains, the automatic control of electric curtains is realized, which solves the shortcomings of artificial control in the existing technology and meets the high requirements of users for environmental comfort.
Patent Information
- Application Number
- CN202411768405.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, the control of electric curtains mainly relies on human operation, lacks automated control methods, and cannot meet the high requirements of users for environmental comfort.
By obtaining the current environmental parameters of the electric curtains, using the trained prediction model to predict the control instructions, and automatically control the working mode of the electric curtains according to the instructions. This prediction model is obtained through the sample training set of historical control instructions and environment parameters.
It realizes automatic control of electric curtains, can adaptively adjust according to environmental conditions, meet users' comfort needs, and improves the efficiency of generating control instructions.
Smart Images

Figure CN120010302A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and in particular, relates to a control method, device, electronic device and storage medium for electric curtains. Background Art
[0002] With the development of intelligent building technology and the continuous improvement of intelligence, users have higher and higher requirements for environmental comfort.
[0003] As an important part of intelligent buildings, electric curtains are usually controlled manually. There is an urgent need for a method to automatically control electric curtains. Summary of the invention
[0004] The embodiments of the present application provide a control method, device, electronic device and computer storage medium for electric curtains, which can automatically control the working mode of the electric curtains according to environmental conditions at least to a certain extent and can meet the preferences and needs of users.
[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0006] According to a first aspect of an embodiment of the present application, a method for controlling an electric curtain is provided, comprising:
[0007] Get the current environmental parameters of the electric curtain;
[0008] Based on the current environmental parameters, the control instructions for the electric curtains are predicted by the trained prediction model; wherein the prediction model is obtained by training the sample training set; the sample training set includes historical control instructions and historical environmental parameters corresponding to the historical control instructions;
[0009] Control the working mode of electric curtains based on control instructions.
[0010] In some embodiments of the present application, based on the above solution, the method further includes:
[0011] Querying a target historical instruction matching the current environment parameters from a plurality of historical control instructions of the user;
[0012] Based on the environmental parameters, the control instructions for the electric curtains are predicted by the trained prediction model, including: if the target historical instructions are not queried, the control instructions for the electric curtains are predicted by the trained prediction model based on the current environmental parameters.
[0013] In some embodiments of the present application, based on the aforementioned scheme, each historical control instruction has a corresponding historical environment parameter;
[0014] Query the target historical commands that match the current environment parameters from multiple historical control commands of the user, including:
[0015] Matching current environmental parameters with various historical environmental parameters;
[0016] Target historical environmental parameters that match the current environmental parameters are determined, and historical control instructions corresponding to the target historical environmental parameters are used as target historical instructions that match the current environmental parameters.
[0017] In some embodiments of the present application, based on the above scheme, obtaining the current environmental parameters of the electric curtain includes: if it is detected that the current time does not meet the preset time condition, then obtaining the current environmental parameters of the electric curtain; the method also includes:
[0018] If it is detected that the current moment meets the preset time condition, the preset control instruction corresponding to the preset time condition is used as the control instruction of the electric curtain.
[0019] In some embodiments of the present application, based on the above solution, the method further includes:
[0020] From multiple control modes pre-set by the user, query the target control mode that the current environmental parameters match; based on the environmental parameters, predict the control instructions for the electric curtains through the trained prediction model, including: if the target control mode is not queried, then based on the current environmental parameters, predict the control instructions for the electric curtains through the trained prediction model.
[0021] In some embodiments of the present application, based on the above solution, the method further includes:
[0022] Obtaining operation information of associated smart appliances associated with electric curtains;
[0023] Based on the current environmental parameters, the trained prediction model predicts the control instructions for the electric curtains, including:
[0024] Based on the operating information of the associated smart appliances and the current environmental parameters, the control instructions for the electric curtains are predicted through the trained prediction model.
[0025] In some embodiments of the present application, based on the above scheme, the prediction model is trained in the following way:
[0026] Acquire a sample training set; the sample training set includes a plurality of sample environment parameters and sample control instructions corresponding to each sample environment parameter; the sample control instructions include historical control instructions; the sample environment parameters corresponding to the sample control instructions include historical environment parameters corresponding to the historical control instructions;
[0027] Performing at least one training operation on the initial prediction model based on the sample training set until a training end condition is met, and obtaining a trained prediction model based on the initial prediction model that meets the training condition;
[0028] The training operation includes:
[0029] Input each sample environmental parameter into the initial prediction model to obtain the corresponding sample prediction instruction;
[0030] For each sample environment parameter, determining the difference information between the corresponding sample control instruction and the sample prediction instruction; determining the total training loss based on the difference information corresponding to each sample environment parameter;
[0031] The parameters of the initial prediction model are adjusted based on the total training loss, and the initial prediction model after the adjustment of the parameters is used as the initial prediction model corresponding to the next training operation.
[0032] According to a second aspect of an embodiment of the present application, a control device for an electric curtain is provided, comprising:
[0033] The first acquisition module is used to obtain the current environmental parameters of the electric curtain;
[0034] A prediction module is used to predict control instructions for electric curtains based on current environmental parameters through a trained prediction model; wherein the prediction model is obtained through training of a sample training set; the sample training set includes historical control instructions and historical environmental parameters corresponding to the historical control instructions;
[0035] The control module is used to control the working mode of the electric curtain based on the control instructions.
[0036] In some embodiments of the present application, based on the above solution, the device further includes a first query module, which is used to:
[0037] Query the target historical instructions that match the current environmental parameters from the user's multiple historical control instructions; when the prediction module predicts the control instructions for the electric curtains based on the environmental parameters through the trained prediction model, it is specifically used to:
[0038] If the target historical instructions are not found, the control instructions for the electric curtains are predicted based on the current environmental parameters through the trained prediction model.
[0039] In some embodiments of the present application, based on the aforementioned scheme, each historical control instruction has a corresponding historical environment parameter;
[0040] When the first query module queries a target historical instruction matching the environment parameter from a plurality of historical control instructions of the user, it is specifically used to:
[0041] Matching current environmental parameters with various historical environmental parameters;
[0042] Target historical environmental parameters that match the current environmental parameters are determined, and historical control instructions corresponding to the target historical environmental parameters are used as target historical instructions that match the current environmental parameters.
[0043] In some embodiments of the present application, based on the above solution, when the first acquisition module acquires the current environmental parameters of the electric curtain, it is specifically used to:
[0044] If it is detected that the current time does not meet the preset time conditions, the current environmental parameters of the electric curtain are obtained;
[0045] The device also includes a generating module, which is used to:
[0046] If it is detected that the current moment meets the preset time condition, the preset control instruction corresponding to the preset time condition is used as the control instruction of the electric curtain.
[0047] In some embodiments of the present application, based on the above scheme, the device further includes a second query module for: querying the target control mode that the current environmental parameters conform to from multiple control modes pre-set by the user; when the prediction module predicts the control instructions for the electric curtains through the trained prediction model based on the current environmental parameters, it is specifically used to:
[0048] If the target control mode is not found, the control instructions for the electric curtains are predicted by the trained prediction model based on the current environmental parameters.
[0049] In some embodiments of the present application, based on the above solution, the device further includes a second acquisition module, which is used to:
[0050] Obtaining operation information of associated smart appliances associated with electric curtains;
[0051] Based on the current environmental parameters, the trained prediction model predicts the control instructions for the electric curtains, including:
[0052] Based on the operating information of the associated smart appliances and the current environmental parameters, the control instructions for the electric curtains are predicted through the trained prediction model.
[0053] In some embodiments of the present application, based on the above scheme, the device further includes a training module for: obtaining a sample training set; the sample training set includes a plurality of sample environment parameters and sample control instructions corresponding to each sample environment parameter; the sample control instructions include historical control instructions; the sample environment parameters corresponding to the sample control instructions include historical environment parameters corresponding to the historical control instructions;
[0054] Performing at least one training operation on the initial prediction model based on the sample training set until a training end condition is met, and obtaining a trained prediction model based on the initial prediction model that meets the training condition;
[0055] Among them, when the training module performs the training operation, it is specifically used to:
[0056] Input each sample environmental parameter into the initial prediction model to obtain the corresponding sample prediction instruction;
[0057] For each sample environment parameter, determining the difference information between the corresponding sample control instruction and the sample prediction instruction; determining the total training loss based on the difference information corresponding to each sample environment parameter;
[0058] The parameters of the initial prediction model are adjusted based on the total training loss, and the initial prediction model after the adjustment of the parameters is used as the initial prediction model corresponding to the next training operation.
[0059] According to a third aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method of the above embodiment.
[0060] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the method of the above embodiment are implemented.
[0061] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0062] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0063] The prediction model is obtained by training the sample training set, so that the prediction model has the ability to predict control instructions based on environmental parameters. Combining the current environmental parameters and the trained prediction model, the control instructions suitable for the current environment can be predicted, so that the electric curtains can be automatically controlled according to the environmental conditions.
[0064] In addition, the training set includes the user's historical control instructions and the historical environmental parameters corresponding to the historical control instructions. The prediction ability of the trained prediction model can be more in line with the user's preferences. The control instructions output by the prediction model based on the current environmental parameters can better meet the user's needs based on the environmental conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0066] Figure 1 A schematic diagram of a flow chart of a method for controlling an electric curtain provided in an embodiment of the present application;
[0067] Figure 2 A schematic diagram of a control scheme for electric curtains provided as an example of the present application;
[0068] Figure 3 A schematic diagram of a control scheme for electric curtains provided as an example of the present application;
[0069] Figure 4 A schematic diagram of the structure of a control device for electric curtains provided in an embodiment of the present application;
[0070] Figure 5 A schematic diagram of the structure of an electronic device for controlling an electric curtain provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0072] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0073] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0074] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0075] It should also be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the objects used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those shown or described.
[0076] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0077] like Figure 1 As shown, in some possible implementations, an embodiment of the present application provides a method for controlling an electric curtain. Taking the controller of the electric curtain as an example, the method may include the following steps: Step S101, obtaining the current environmental parameters of the electric curtain.
[0078] The electric curtains may be roller curtains or non-roller curtains.
[0079] The environmental parameter is a light parameter, or the environmental parameter includes the light parameter and at least one of a temperature parameter and a humidity parameter.
[0080] That is to say, the environmental parameters may include only the illumination parameters, or may include temperature parameters and humidity parameters in addition to the illumination parameters.
[0081] Among them, the lighting parameters may include lighting intensity and lighting direction. The lighting intensity and lighting direction can be used to infer different time periods of the day, which is also more conducive to the prediction model to make predictions. Combining lighting parameters, temperature parameters and humidity parameters, the current season can also be inferred, which is also more conducive to the prediction model to make predictions.
[0082] like Figure 2 As shown, in one example of the present application, the illumination parameters, temperature parameters and humidity parameters can be combined as inputs of the prediction model to predict the control instructions.
[0083] Specifically, the environmental parameters can be determined by setting different sensors at designated positions of the electric curtains. For example, when the electric curtains are electric roller curtains, the designated position can be any part of the lower end of the electric roller curtains. In this way, no matter whether the roller curtains are rolled up or not, the sensors will not be drawn in, and the environmental parameters can be detected more accurately. The environmental parameters can also be determined by combining sensors and meteorological data. Specifically, the meteorological data can be obtained by the controller through the network.
[0084] It is understandable that the trigger condition for obtaining the current environmental parameters may be triggered by a preset time interval, or may be triggered by detecting that the current time reaches a preset time.
[0085] Step S102: predicting control instructions for the electric curtains through the trained prediction model based on the current environmental parameters.
[0086] The prediction model is obtained by training a sample training set; the sample training set includes historical control instructions and historical environment parameters corresponding to the historical control instructions.
[0087] Specifically, the sample training set includes sample environment parameters and sample control instructions. The sample environment parameters are generated based on historical environment parameters; and the sample control instructions corresponding to the sample environment parameters are generated based on historical control instructions of users corresponding to the historical environment parameters.
[0088] Among them, the prediction model may include a hidden layer for feature extraction, and the hidden layer may include: 128 neurons, activation function; the second layer, 64 neurons, activation function; the third layer, 32 neurons, activation function, so as to extract features from the input of the prediction model.
[0089] That is to say, the prediction model is obtained based on the user's preference habits for different environmental parameters. In the specific implementation process, the sample environmental parameters can also be combined with historical environmental parameters and some set environmental parameters, and the sample control instructions corresponding to the sample environmental parameters can also be generated by combining the user's historical control instructions corresponding to the historical environmental parameters and the control instructions preset under the set environmental parameters. The control process of the prediction model will be further elaborated below.
[0090] Specifically, the environmental parameters can be input into the prediction model, and feature extraction can be performed through the prediction model to obtain environmental features, and the environmental features can be classified through the prediction model to obtain corresponding control instructions. Step S103: Control the working mode of the electric curtain based on the control instruction.
[0091] The control instruction may include an instruction on whether the electric curtain is open or closed, and may also control the proportion of the opening or closing to the corresponding window, for example, controlling the electric curtain to be open by 20%.
[0092] Among them, the working mode of the electric curtain corresponds to the control instruction, which can include the corresponding opening or closing, and the proportion of opening or closing to the corresponding window.
[0093] In the above embodiment, the prediction model is obtained by training the sample training set, so that the prediction model has the ability to predict the control instructions based on the environmental parameters, and then combined with the current environmental parameters and the trained prediction model, the control instructions suitable for the current environment can be predicted, so that the electric curtain can be automatically controlled according to the environmental conditions;
[0094] In addition, the training set includes the user's historical control instructions and the historical environmental parameters corresponding to the historical control instructions. The prediction ability of the trained prediction model can be more in line with the user's preferences. The control instructions output by the prediction model based on the current environmental parameters can better meet the user's needs based on the environmental conditions.
[0095] In some possible implementations of the present application, the method further includes:
[0096] The target historical instruction matching the current environment parameter is searched from the multiple historical control instructions of the user. Specifically, the controller may record the multiple historical control instructions of the user and the historical environment parameter corresponding to each historical control instruction.
[0097] In a specific implementation process, querying a target historical instruction matching the environment parameter from multiple historical control instructions of the user may include:
[0098] (1) Matching current environmental parameters with various historical environmental parameters;
[0099] (2) Determine the target historical environment parameters that match the current environment parameters, and use the historical control instructions corresponding to the target historical environment parameters as the target historical instructions.
[0100] Specifically, if the difference between the current environmental parameters and the historical environmental parameters is within a preset range, it can be considered that the current environmental parameters match the historical environmental parameters.
[0101] In the specific implementation process, if the current environment parameters match the historical environment parameters, it can be referenced whether the user has corresponding target historical instructions under the historical environment parameters, which represents the user's preference under the historical environment parameters.
[0102] Step S102 predicts control instructions for electric curtains based on environmental parameters through a trained prediction model, which may include:
[0103] If the target historical instructions are not found, the control instructions for the electric curtains are predicted based on the current environmental parameters through the trained prediction model.
[0104] Specifically, if the target historical instruction is not found, it means that there are no historical environmental parameters for reference under the current environmental parameters, and prediction can be made directly through the prediction model.
[0105] Specifically, the method further includes:
[0106] If the target historical instruction is found, the target historical instruction is used as the control instruction.
[0107] Specifically, if there is a corresponding target historical instruction, it means that under the historical environmental parameters, the user tends to use this control instruction to control the electric curtains. In this case, the target historical instruction can be directly used as the control instruction, that is, the working mode of the electric curtains can be controlled by referring to the target historical instruction.
[0108] In the above embodiment, the target historical instruction matching the current environment parameters can be searched from the user's multiple historical control instructions. If the target historical instruction is found, the target historical instruction is used as the control instruction, which can effectively improve the generation efficiency of the control instruction.
[0109] In some possible implementations of the present application, step S101 of obtaining current environmental parameters of electric curtains may include:
[0110] If it is detected that the current time does not meet the preset time condition, the current environmental parameters of the electric curtain are obtained; wherein the preset time condition may include being in a preset season or a specific time period of each day in the preset season. The method also includes:
[0111] If it is detected that the current moment meets the preset time condition, the preset control instruction corresponding to the preset time condition is used as the control instruction of the electric curtain.
[0112] For example, the preset time condition may be 8:00-17:00 every day in winter. At this time, there is no need to obtain environmental parameters, and the corresponding control instructions are directly obtained to completely close the electric curtains and not block the windows. When the preset time condition is not met, the environmental conditions are considered to determine how to control the electric curtains, which can effectively save the calculation amount of the prediction model.
[0113] In some possible implementations of the present application, the method further includes:
[0114] From the multiple control modes pre-set by the user, query the target control mode that the current environmental parameters meet. The control mode can be a user-defined mode or a mode pre-set by the controller. For example, the control mode can include an office mode, a sports mode, a movie viewing mode, etc.
[0115] Specifically, each control mode has a corresponding environmental parameter condition, that is, the environmental parameter must be within a corresponding range.
[0116] It can be understood that each control mode has a corresponding control instruction.
[0117] Specifically, the current environmental parameters may be matched with the environmental parameter conditions corresponding to each control mode, thereby searching for the target control mode that meets the requirements.
[0118] In the specific implementation process, if the target control mode that the current environmental parameters meet is queried, the control instructions corresponding to the target control mode can be used to control the working mode of the electric curtain.
[0119] Step S101 predicts control instructions for electric curtains based on environmental parameters through a trained prediction model, which may include:
[0120] If the target control mode is not found, the control instructions for the electric curtains are predicted by the trained prediction model based on the current environmental parameters.
[0121] In the case where the target control mode is not found, the control instructions can be predicted in real time based on the prediction model. In the above embodiment, multiple control modes of the electric curtains are pre-set, each control mode has corresponding control instructions and environmental parameter conditions. If the target control mode that the current environmental parameters meet is found, the working mode of the electric curtains can be directly controlled based on the control instructions of the corresponding target control mode, which can effectively improve the generation efficiency of the control instructions.
[0122] It can be understood that querying the target control mode that the current environmental parameters conform to from multiple control modes pre-set by the user, and querying the target historical instructions that match the current environmental parameters from multiple historical control instructions of the user can be performed in combination. If the target control mode or target historical instructions are queried, the electric curtains are controlled based on the target control mode or the target historical instructions.
[0123] If neither the target control mode nor the target control instruction is found, the prediction model is used to predict the control instruction in real time.
[0124] When the target control mode and the target historical instructions are queried at the same time, the target historical instructions may be referenced first.
[0125] In some possible implementations of the present application, the method further includes:
[0126] Obtaining operation information of associated smart appliances associated with electric curtains;
[0127] Based on the current environmental parameters, the trained prediction model predicts the control instructions for the electric curtains, including:
[0128] Based on the operating information of the associated smart appliances and the current environmental parameters, the control instructions for the electric curtains are predicted through the trained prediction model.
[0129] The associated smart appliances may include appliances related to some user behaviors associated with lighting, such as smart lamps, projectors, televisions, and the like.
[0130] It should be noted that the execution subject of the method for controlling electric curtains of the present application can be the controller of the electric curtains or the smart home system, that is, the electric curtains and various associated smart appliances can be linked. In some possible implementations, the sample training set may include sample environmental parameters, sample control instructions, and sample operation information of associated smart appliances. The prediction model is obtained by training the sample training set, and the operation information of the associated smart appliances and the current environmental parameters are input into the prediction model. The prediction model can output control instructions for the electric curtains.
[0131] In some other possible implementations, control instructions corresponding to the operation information of different associated smart appliances can be pre-set. If the control instructions corresponding to the operation information of the associated smart appliances in the current situation are found, the operation of the electric curtains is controlled based on the corresponding control instructions; if the control instructions corresponding to the operation information of the associated smart appliances in the current situation cannot be found, the control instructions are predicted based on the current environmental parameters. For example, when the projector is turned on, the electric curtains are opened to cover the windows of the room where the projector is located; if the projector is not turned on, the control instructions are determined based on the current environmental parameters.
[0132] like Figure 3 As shown, in an example of the present application, the illumination parameters, temperature parameters, humidity parameters and the operation information of the associated smart appliances can be combined as the input of the prediction model to predict the control instructions. The specific training process of the prediction model will be described below in conjunction with the embodiments.
[0133] In some possible implementations of the present application, the prediction model is trained in the following manner:
[0134] (1) Obtain a sample training set.
[0135] The sample training set includes multiple sample environment parameters and sample control instructions corresponding to each sample environment parameter.
[0136] Specifically, the sample environment parameters may include historical environment parameters, and the sample control instructions may include corresponding historical control instructions; the sample environment parameters may also include some preset environment parameters, and correspondingly, the sample control instructions may include preset control instructions.
[0137] (2) Performing at least one training operation on the initial prediction model based on the sample training set until the training end condition is met, and obtaining a trained prediction model based on the initial prediction model that meets the training condition.
[0138] The training operation includes:
[0139] Input each sample environmental parameter into the initial prediction model to obtain the corresponding sample prediction instruction;
[0140] For each sample environment parameter, determining the difference information between the corresponding sample control instruction and the sample prediction instruction; determining the total training loss based on the difference information corresponding to each sample environment parameter;
[0141] The parameters of the initial prediction model are adjusted based on the total training loss, and the initial prediction model after the adjustment of the parameters is used as the initial prediction model corresponding to the next training operation.
[0142] Specifically, if the training end condition is met, a prediction model is obtained; if the training end condition is not met, the training operation is repeated until the training end condition is met.
[0143] The initial prediction model may include CNN (Convolutional Neural Networks).
[0144] Among them, the training end conditions may include that the number of training operations reaches a preset number, or the total training loss is less than or equal to a preset threshold, or the total training loss converges, which is not specifically limited here. In the specific implementation process, a test data set can also be used to test the prediction model and evaluate the output results of the prediction model. If the evaluation result is that the prediction model reaches the expected prediction ability, the training is completed; if the evaluation result is that the prediction model does not reach the expected prediction ability, the prediction model is repeatedly trained.
[0145] In some possible implementations of the present application, the sample training set may be updated regularly to further update the prediction model.
[0146] That is to say, every once in a while, we can collect the user's control instructions under different environmental parameters, update the sample training set, and then update the prediction model, so that the prediction ability of the prediction model can be more in line with the user's preferences.
[0147] In some possible implementations of the present application, control instructions corresponding to different specific conditions may also be preset;
[0148] When it is detected that the current environmental parameters meet specific conditions, the control instructions corresponding to the specific conditions are queried; when the current environmental parameters do not meet the specific conditions, the control instructions for the electric curtains are predicted based on the current environmental parameters through the prediction model.
[0149] For example, in summer, when the light intensity exceeds the threshold, the opening ratio of the roller blinds is automatically adjusted. At this time, the electric roller blinds and VRV (Variable Refrigerant Volume, air conditioning system) can also be linked to reduce the cooling load of VRV. The above-mentioned electric curtain control method generates sample environmental parameters through historical environmental parameters, generates sample control instructions corresponding to the sample environmental parameters through the historical control instructions of the user corresponding to the historical environmental parameters, and obtains a prediction model based on the sample environmental parameters and the sample control instructions. The prediction model can automatically generate control instructions based on the environmental parameters to control the electric curtains, and the control instructions can be more in line with the user's habits and preferences.
[0150] The following describes an embodiment of the device of the present application, which can be used to execute the method in the above embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method in the above embodiment of the present application. In some possible implementations of the present application, such as Figure 4 As shown, a control device 40 for an electric curtain is provided, comprising:
[0151] The first acquisition module 401 is used to acquire the current environmental parameters of the electric curtain; the environmental parameters are illumination parameters, or the environmental parameters include illumination parameters and at least one of temperature parameters and humidity parameters; the prediction module 402 is used to predict the control instructions for the electric curtain through the trained prediction model based on the current environmental parameters; wherein the prediction model is obtained through training of the sample training set; the sample training set includes historical control instructions and historical environmental parameters corresponding to the historical control instructions;
[0152] The control module 403 is used to control the working mode of the electric curtain based on the control instruction.
[0153] In some embodiments of the present application, based on the above scheme, the device further includes a first query module for: querying a target historical instruction matching the current environmental parameters from a plurality of historical control instructions of the user; when the prediction module 402 predicts the control instruction for the electric curtain through the trained prediction model based on the environmental parameters, it is specifically used to:
[0154] If the target historical instruction is found, the target historical instruction is used as the control instruction;
[0155] If the target historical instructions are not found, the control instructions for the electric curtains are predicted based on the current environmental parameters through the trained prediction model.
[0156] In some embodiments of the present application, based on the aforementioned scheme, each historical control instruction has a corresponding historical environment parameter;
[0157] When the first query module 401 queries a target historical instruction matching the environment parameter from a plurality of historical control instructions of the user, it is specifically used to:
[0158] Matching current environmental parameters with various historical environmental parameters;
[0159] Target historical environmental parameters that match the current environmental parameters are determined, and historical control instructions corresponding to the target historical environmental parameters are used as target historical instructions that match the current environmental parameters.
[0160] In some embodiments of the present application, when acquiring the current environmental parameters of the electric curtain, the first acquisition module 401 is specifically used to:
[0161] If it is detected that the current time does not meet the preset time conditions, the current environmental parameters of the electric curtain are obtained;
[0162] The device also includes a generating module, which is used to:
[0163] If it is detected that the current moment meets the preset time condition, the preset control instruction corresponding to the preset time condition is used as the control instruction of the electric curtain.
[0164] In some embodiments of the present application, based on the above scheme, the device further includes a second query module for: querying the target control mode that the current environmental parameters comply with from multiple control modes pre-set by the user; the prediction module 402 is specifically used to predict the control instructions for the electric curtains based on the current environmental parameters through the trained prediction model:
[0165] If the target control mode is not found, the control instructions for the electric curtains are predicted by the trained prediction model based on the current environmental parameters.
[0166] In some embodiments of the present application, based on the above solution, the device further includes a second acquisition module, which is used to:
[0167] Obtaining operation information of associated smart appliances associated with electric curtains;
[0168] Based on the current environmental parameters, the trained prediction model predicts the control instructions for the electric curtains, including:
[0169] Based on the operating information of the associated smart appliances and the current environmental parameters, the control instructions for the electric curtains are predicted through the trained prediction model.
[0170] In some embodiments of the present application, based on the above scheme, the device further includes a training module for: obtaining a sample training set; the sample training set includes a plurality of sample environment parameters and sample control instructions corresponding to each sample environment parameter; the sample control instructions include historical control instructions; the sample environment parameters corresponding to the sample control instructions include historical environment parameters corresponding to the historical control instructions;
[0171] Performing at least one training operation on the initial prediction model based on the sample training set until a training end condition is met, and obtaining a trained prediction model based on the initial prediction model that meets the training condition;
[0172] Among them, when the training module performs the training operation, it is specifically used to:
[0173] Input each sample environmental parameter into the initial prediction model to obtain the corresponding sample prediction instruction;
[0174] For each sample environment parameter, determining the difference information between the corresponding sample control instruction and the sample prediction instruction; determining the total training loss based on the difference information corresponding to each sample environment parameter;
[0175] The parameters of the initial prediction model are adjusted based on the total training loss, and the initial prediction model after the adjustment of the parameters is used as the initial prediction model corresponding to the next training operation.
[0176] The above-mentioned electric curtain control device obtains a prediction model through sample training set training, so that the prediction model has the ability to predict control instructions based on environmental parameters, and then combines the current environmental parameters and the trained prediction model to predict control instructions suitable for the current environment, so that the electric curtain can be automatically controlled according to the environmental conditions;
[0177] In addition, the training set includes the user's historical control instructions and the historical environmental parameters corresponding to the historical control instructions. The prediction ability of the trained prediction model can be more in line with the user's preferences. The control instructions output by the prediction model based on the current environmental parameters can better meet the user's needs based on the environmental conditions.
[0178] In an alternative embodiment, an electronic device is provided, such as Figure 5 As shown, Figure 5The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0179] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0180] The bus 4002 may include a path for transmitting information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0181] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
[0182] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.
[0183] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0184] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.
[0185] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0186] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A method for controlling an electric curtain, characterized in that: include: Get the current environmental parameters of the electric curtain; Based on the current environmental parameters, predicting the control instructions for the electric curtains through a trained prediction model; wherein the prediction model is obtained through training of a sample training set; the sample training set includes historical control instructions and historical environmental parameters corresponding to the historical control instructions; The working mode of the electric curtain is controlled based on the control instruction.
2. The method according to claim 1, characterized in that The method further comprises: Searching for a target historical instruction that matches the current environment parameter from a plurality of historical control instructions of the user; The predicting the control instruction for the electric curtain by the trained prediction model based on the current environmental parameters includes: If the target historical instruction is not found, the control instruction for the electric curtain is predicted by the trained prediction model based on the current environmental parameters.
3. The method according to claim 2, characterized in that Each of the historical control instructions has a corresponding historical environment parameter; The step of searching for a target historical instruction that matches the current environment parameter from a plurality of historical control instructions of the user includes: Matching the current environmental parameters with respective historical environmental parameters; A target historical environment parameter that matches the current environment parameter is determined, and a historical control instruction corresponding to the target historical environment parameter is used as the target historical instruction that matches the current environment parameter.
4. The method according to claim 1, characterized in that: The obtaining of the current environmental parameters of the electric curtain comprises: if it is detected that the current time does not meet the preset time condition, obtaining the current environmental parameters of the electric curtain; The method further comprises: If it is detected that the current moment meets the preset time condition, the preset control instruction corresponding to the preset time condition is used as the control instruction of the electric curtain.
5. The method according to claim 1, characterized in that The method further comprises: From a plurality of control modes preset by a user, query the target control mode that the current environmental parameters conform to; The predicting the control instruction for the electric curtain by the trained prediction model based on the environmental parameters includes: If the target control mode is not found, the control instructions for the electric curtain are predicted by a trained prediction model based on the current environmental parameters.
6. The method according to claim 1, characterized in that The method further comprises: Acquire operation information of associated intelligent electrical appliances associated with the electric curtain; The predicting the control instruction for the electric curtain by the trained prediction model based on the current environmental parameters includes: Based on the operation information of the associated smart appliance and the current environmental parameters, the control instructions for the electric curtain are predicted by the trained prediction model.
7. The method according to claim 1, characterized in that The prediction model is trained in the following way: Acquire a sample training set; the sample training set includes a plurality of sample environment parameters and sample control instructions corresponding to each sample environment parameter; the sample control instructions include the historical control instructions; the sample environment parameters corresponding to the sample control instructions include the historical environment parameters corresponding to the historical control instructions; Performing at least one training operation on the initial prediction model based on the sample training set until a training end condition is met, and obtaining the trained prediction model based on the initial prediction model that meets the training condition; wherein the training operation includes: Input each of the sample environmental parameters into an initial prediction model to obtain a corresponding sample prediction instruction; For each sample environment parameter, determining the difference information between the corresponding sample control instruction and the sample prediction instruction; determining the total training loss based on the difference information corresponding to each sample environment parameter; The parameters of the initial prediction model are adjusted based on the total training loss, and the initial prediction model after the adjustment of the parameters is used as the initial prediction model corresponding to the next training operation.
8. A control device for electric curtains, characterized in that: include: The first acquisition module is used to obtain the current environmental parameters of the electric curtain; A prediction module, used to predict the control instructions for the electric curtains through a trained prediction model based on the current environmental parameters; wherein the prediction model is obtained by training a sample training set; the sample training set includes historical control instructions and historical environmental parameters corresponding to the historical control instructions; A control module is used to control the working mode of the electric curtain based on the control instruction.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Miniature stepping motor of smart home curtain and wireless networking control method
CN120523010A