Device control method, device, electronic device and storage medium
Through a pre-trained environmental model, the operating environment of the gas water heater is simulated, and the observational change data is predicted, which solves the problems of slow response speed and control lag in the temperature control of the gas water heater, improves the response speed and control accuracy of the equipment, and improves the user experience .
Patent Information
- Application Number
- CN202410098929.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-01-24
AI Technical Summary
The existing temperature control methods of gas water heaters have problems such as slow response speed and lag in control, and cannot make adjustments in advance, resulting in poor water use experience.
By obtaining multiple action parameter values corresponding to the action amount of the target execution component of the device, each parameter group is predicted based on the pre-trained environmental model, simulating the operating environment of the device, predicting observation change data, and determining the target observation change based on the target observation change based on the pre-trained environment model. data, thereby controlling the target execution component of the device.
The equipment is responded in advance, improving the accuracy, response speed and stability of control, thereby improving the user experience.
Smart Images

Figure CN117930658B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic control technology, and in particular to a device control method, device, electronic equipment and storage medium. Background Art
[0002] With the transformation of energy structure and the progress of science and technology, gas water heaters have been rapidly popularized and have become one of the essential equipment in daily life. Only when gas water heaters achieve stable control can they provide users with a better water experience in daily use.
[0003] The temperature control of gas water heaters is an important part of the control process. The temperature control method for gas water heaters often uses a feedback control algorithm to calculate the deviation between the outlet water temperature and the set temperature, and adjust it according to the deviation through a proportional integral differential algorithm. When factors such as water flow and inlet water temperature change, although a certain buffer space is reserved for the water tank inside the gas water heater for heat exchange, the feedback control algorithm cannot make adjustments in advance. Only when the outlet water temperature changes will the feedback control algorithm respond. This lagging control method will bring an extremely bad water experience when external factors fluctuate significantly.
[0004] Analysis of the existing technology shows that there are problems of slow response and delayed control. Summary of the invention
[0005] The present invention provides an equipment control method, device, electronic equipment and storage medium to solve the problems of control lag, inaccurate control results and slow response speed in existing automatic control methods.
[0006] According to one aspect of the present invention, there is provided a device control method, comprising:
[0007] Acquire multiple action parameter values corresponding to the action amount of the target execution component of the device, and determine a set of parameter groups based on each action parameter value, wherein the parameter group includes parameter values corresponding to the observed amount, the execution action amount, and the external variable, respectively; the execution action amount includes the action amount of the target execution component;
[0008] Based on the pre-trained environmental model, each parameter group is predicted and processed to obtain the observed quantity change data corresponding to each parameter group. The environmental model is used to simulate the operating environment of the equipment. The observed quantity change data is the observed quantity data that changes with time obtained by multiple predictions of the parameter group by the environmental model;
[0009] Determine the target observation quantity change data from the observation quantity change data corresponding to the parameter groups respectively based on the target observation quantity change data;
[0010] Based on the action parameter values in the parameter group corresponding to the target observation quantity change data, the target execution component of the control device is controlled.
[0011] Optionally, obtaining multiple action parameter values corresponding to the action amount of the target execution component of the device, and determining a set of parameter groups based on each action parameter value, includes:
[0012] A plurality of action parameter values are obtained by sampling from a standard value range of the action amount of the target execution component through a preset sampling method;
[0013] The action quantity parameters, external variable parameters and observation quantity parameters corresponding to each action parameter value are determined to obtain a set of parameter groups corresponding to each action parameter value.
[0014] Optionally, determining the action amount parameter, external variable parameter and observation amount parameter corresponding to each action parameter value to obtain a set of parameter groups corresponding to each action parameter value includes:
[0015] Determine the action amount parameters of other action amounts based on the corresponding relationship between the action amount of the target execution component and other action amounts and the action amount parameters corresponding to the action amount of the target execution component;
[0016] Obtaining historical external variable parameters and historical observation quantity parameters corresponding to the current moment, and forming a parameter group based on the action quantity parameters corresponding to each action quantity, the historical external variable parameters corresponding to the current moment, and the historical observation quantity parameters;
[0017] Among them, the equipment is a temperature control equipment, the target execution component includes a proportional valve; the action amount of the target execution component includes the proportional valve opening; the external variables include the equipment's water inlet temperature, water inlet flow, section valve information, and air blockage level; the observed quantity includes the equipment's water outlet temperature.
[0018] Optionally, prediction processing is performed on each parameter group based on a pre-trained environmental model to obtain observation quantity change data corresponding to each parameter group, including:
[0019] For any parameter group, the parameter group is input into a pre-trained environment model to obtain a first prediction value, where the first prediction value is the observed value data at a first prediction moment;
[0020] Forming a parameter group at a first prediction moment based on the first prediction value and the execution action parameter and the external variable parameter in the parameter group;
[0021] Inputting the parameter group at the first prediction moment into the pre-trained environment model to obtain a second prediction value, and obtaining the next parameter group based on the second prediction value until the observed value data at multiple prediction moments are obtained;
[0022] Based on the observation data corresponding to the multiple prediction moments, the observation change data corresponding to the parameter group are obtained.
[0023] Optionally, determining the target observation quantity change data from the observation quantity change data corresponding to the parameter groups respectively based on the target observation quantity change data includes:
[0024] Determine the deviation data between the observed quantity change data and the target observed quantity change data corresponding to each parameter group through the prediction model control algorithm;
[0025] The observation change data corresponding to the minimum deviation data is determined as the target observation change data.
[0026] Optional, environment model training process, including:
[0027] Constructing an environment model to be trained, wherein the environment model to be trained is a neural network model;
[0028] Select a historical observation value from the historical data as the initial observation value, and obtain the historical action quantity parameters and historical external variable parameters in the time period corresponding to the initial observation value, and form the initial observation value, the historical action quantity parameters and the historical external variable parameters into a training parameter group;
[0029] Inputting the training parameter group into the environment model to be trained, obtaining the prediction result of the environment model to be trained output as the prediction result at the first moment;
[0030] The prediction result at the first moment is used as the observation value at the next moment, and the historical execution action parameters and historical external variable parameters in the time period corresponding to the observation value at the next moment are obtained to obtain the next training parameter group, and the next training parameter is input into the environment model to be trained to obtain the prediction result at the second moment, until the predicted observation value change data that meets the preset prediction step length is obtained;
[0031] The predicted observation change data is input into the preset discriminant network, the reward value is determined based on the discrimination result of the preset discriminant network, and the parameters of the environment model are adjusted based on the reward value through the preset reinforcement learning algorithm to obtain a trained environment model.
[0032] Optionally, the training process of the preset discriminant network includes:
[0033] Obtain the predicted observation quantity change data and the actual observation quantity change data within the time range corresponding to the predicted observation quantity change data;
[0034] Inputting the predicted observation quantity change data into a preset discriminant network to obtain a first output result corresponding to the predicted observation quantity change data;
[0035] Inputting the actual observed value change data into a preset discriminant network to obtain a second output result corresponding to the actual observed value change data;
[0036] Determine a first loss function based on the first output result and the preset false label value; determine a second loss function based on the second output result and the preset true label value;
[0037] The preset discriminant network is adjusted based on the first loss function and the second loss function to obtain a target preset discriminant network.
[0038] According to one aspect of the present invention, there is provided a device control apparatus, comprising:
[0039] A parameter group determination module is used to obtain multiple action parameter values corresponding to the action amount of the target execution component of the device, and determine a set of parameter groups based on each action parameter value, wherein the parameter group includes parameter values corresponding to the observed amount, the execution action amount and the external variable respectively; the execution action amount includes the action amount of the target execution component;
[0040] The observation data determination module is used to perform prediction processing on each parameter group based on the pre-trained environmental model to obtain the observation change data corresponding to each parameter group. The environmental model is used to simulate the operating environment of the equipment. The observation change data is the observation data that changes with time obtained by performing multiple predictions on the parameter group through the environmental model.
[0041] A target observation quantity change data determination module, used to determine the target observation quantity change data from the observation quantity change data corresponding to the parameter groups respectively based on the target observation quantity change data;
[0042] The target execution component control module is used to control the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation quantity change data.
[0043] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0044] at least one processor; and
[0045] a memory communicatively connected to at least one processor; wherein,
[0046] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the device control method of any embodiment of the present invention.
[0047] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device control method of any embodiment of the present invention when executed.
[0048] According to another aspect of the present invention, a computer program product is provided, characterized in that the computer program product includes a computer program, and when the computer program is executed by a processor, the device control method of any embodiment of the present invention is implemented.
[0049] The technical solution of the embodiment of the present invention obtains multiple action parameter values corresponding to the action amount of the target execution component of the device, determines a group of parameter groups based on each action parameter value, and the parameter group includes the parameter values corresponding to the observation amount, the execution action amount and the external variable respectively; the execution action amount includes the action amount of the target execution component; predicts and processes each parameter group based on the pre-trained environment model to obtain the observation amount change data corresponding to each parameter group, the environment model is used to simulate the operating environment of the device, and the observation amount change data is the observation amount data that changes with time obtained by multiple predictions of the parameter group by the environment model; determines the target observation amount change data in the observation amount change data corresponding to the parameter group respectively based on the target observation amount change data; and controls the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation amount change data. In order to solve the problems of control lag and slow response speed in the existing automatic control method, and the problem of poor control stability caused by the lag control method when the external factors change significantly, the device control method proposed in this scheme realizes the device to respond in advance, improves the accuracy, response speed and stability of device control, and thus improves user experience.
[0050] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0052] Figure 1 is a flow chart of a device control method provided by Embodiment 1 of the present invention;
[0053] Figure 2 is a flow chart of a device control method provided by Embodiment 2 of the present invention;
[0054] Figure 3 is a structural schematic diagram of a device control device provided by Embodiment 3 of the present invention;
[0055] Figure 4It is a structural schematic diagram of an electronic device for implementing the device control method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0057] It should be noted that the terms "first characteristic data", "second characteristic data", etc. in the specification and claims of the present invention 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0058] The acquisition, storage and / or processing of data in the technical solutions involved in this application comply with the relevant provisions of national laws and regulations.
[0059] Embodiment 1
[0060] Figure 1 This is a flow chart of a device control method provided by the first embodiment of the present invention. This embodiment is applicable to the case of automatic control processing. The method can be executed by a device control device. The device control device can be implemented in the form of hardware and / or software. The device control device can be configured in the electronic device provided by the embodiment of the present invention. Figure 1 As shown, the method includes:
[0061] S110. Obtain multiple action parameter values corresponding to the action amount of the target execution component of the device, and determine a set of parameter groups based on each action parameter value, wherein the parameter group includes parameter values corresponding to the observation quantity, the execution action amount and the external variable respectively; the execution action amount includes the action amount of the target execution component.
[0062] Among them, the target execution component of the equipment can be specifically understood as the execution component to be controlled, and the target execution component includes but is not limited to proportional valves, fans, and flow valves. The action parameter value can be specifically understood as the parameter value executable by the target execution component. For example, if the target execution component is a proportional valve, the action parameter value can be the proportional valve opening value. Each parameter in the parameter group can be specifically understood as a parameter that affects the control result of the equipment, and the observation quantity can be specifically understood as the output parameter of the equipment. For example, if the temperature of the equipment is controlled, the observation quantity can be the outlet water temperature. The execution action quantity can be specifically understood as the execution action variable of the executable component. In this embodiment, the execution action quantity includes the action quantity of the target execution component. External variables can be specifically understood as external factors that affect the control of the equipment. In this embodiment, taking temperature control as an example, the external variables include but are not limited to the inlet water temperature, the inlet water flow, the section valve information, and the wind blockage level.
[0063] Specifically, multiple corresponding action parameter values are selected according to the characteristics of the target execution component. Multiple action parameter values corresponding to the action amount of the target execution component can be selected from the equipment operation data, or multiple values can be selected from the standard threshold range of the action amount of the target execution component as the multiple action parameter values corresponding to the action amount of the target execution component. Each action parameter value of the target execution component corresponds to a set of parameter groups, and the parameter group includes parameter values corresponding to the observed quantity, the execution action amount, and the external variable respectively; the execution action amount includes the action amount of the target execution component. Exemplarily, a set of parameter groups associated with each action parameter value can be determined by analyzing the equipment operation data, or a set of parameter groups corresponding to each action parameter value can be determined according to a preset numerical relationship.
[0064] Optionally, multiple action parameter values corresponding to the action amount of the target execution component of the device are obtained, and a group of parameter groups are determined based on each action parameter value, including: sampling multiple action parameter values from the standard value range of the action amount of the target execution component through a preset sampling method; determining the action amount parameters, external variable parameters and observation parameters corresponding to each action parameter value, and obtaining a group of parameter groups corresponding to each action parameter value.
[0065] The preset sampling method refers to the method of obtaining sampled data, and the preset sampling method includes but is not limited to uniform sampling, non-uniform sampling, and discrete sampling. The standard value range of the action amount can be specifically understood as the range between the maximum value and the minimum value corresponding to the parameter value of the action amount that the target execution component can execute.
[0066] Specifically, the standard value range of the target execution component is obtained, and multiple action parameter values are selected in sequence from the standard value range by uniform sampling. For example, if the standard value range of the target execution component is 1, 2, ..., 10, the action parameter value corresponding to the action amount of the target execution component selected by uniform sampling can be 1, 2, ..., 10. The parameter values of other parameter amounts corresponding to each action parameter value are determined according to the preset relationship between the action amount of the target execution component and other parameter amounts in the parameter group, that is, the action amount parameter, external variable parameter and observation amount parameter corresponding to each action parameter value are obtained, and a group of parameter groups corresponding to each action parameter value is obtained.
[0067] On the basis of the above embodiments, the action quantity parameters, external variable parameters and observation quantity parameters corresponding to each action parameter value are determined to obtain a group of parameter groups corresponding to each action parameter value, including: determining the action quantity parameters of other action quantities based on the correspondence between the action quantity of the target execution component and other action quantities and the action quantity parameters corresponding to the action quantity of the target execution component; obtaining the historical external variable parameters and historical observation quantity parameters corresponding to the current moment, and forming a group of parameter groups based on the action quantity parameters corresponding to each action quantity, the historical external variable parameters and historical observation quantity parameters corresponding to the current moment; wherein the device is a temperature control device, and the target execution component includes a proportional valve; the action quantity of the target execution component includes the proportional valve opening; the external variables include the water inlet temperature, water inlet flow, segmented valve information, and wind blockage level of the equipment; the observation quantity includes the water outlet temperature of the equipment.
[0068] Among them, the corresponding relationship between the action amount of the target execution component and other action amounts can be obtained in advance by performing data analysis on the operating data of the equipment, and the analysis results can be stored in a preset storage device. When needed, they can be matched from the preset storage device based on the relevant information of the target execution component and its action amount.
[0069] Specifically, other action quantities corresponding to the action quantity of the target execution component are determined according to the corresponding relationship between the action quantity of the target execution component and other action quantities. For example, the fan speed to be outputted corresponding to each proportional valve opening value can be determined according to the relationship between the proportional valve opening and the fan. By determining the parameters of other action quantities corresponding to the action quantity of the target execution component according to the corresponding relationship, the sampling space can be greatly compressed and the calculation cost can be saved. Since the future external variable parameters cannot be known in advance, the historical external variable parameters corresponding to the most recent known moment are used as the future external variable parameters, that is, the historical external variable parameters and historical observation parameters corresponding to the current moment are obtained, and the action quantity parameters corresponding to each action quantity, the historical external variable parameters corresponding to the current moment, and the historical observation parameters constitute a parameter group.
[0070] S120. Predictive processing is performed on each parameter group based on a pre-trained environmental model to obtain observation change data corresponding to each parameter group. The environmental model is used to simulate the operating environment of the equipment. The observation change data is the observation data that changes over time after multiple predictions of the parameter group by the environmental model.
[0071] Specifically, each parameter group obtained is used as the input parameter of the pre-trained environmental model, and the environmental model performs prediction, that is, the parameter group obtained by sampling is deduced. In the deduction process corresponding to each parameter group, the action amount remains unchanged, the external variable remains unchanged, and the observation amount determined at each moment is used as the observation amount of the input parameter of the next prediction process. The prediction process ends when the preset deduction step length is reached, and the observation amount change data corresponding to each parameter group is obtained, that is, the prediction data of the preset step length corresponding to each parameter group is obtained. Among them, the environmental model is the operating environment of the device simulated according to the operating data of the device. The pre-trained environmental model is as follows:
[0072]
[0073] Among them, L represents the step length of deduction, N represents the number of uniform sampling, represents the predicted value at time t+i, represents the predicted value at time t+i+1, represents the amount of action at time t+i, o t Represents the external variables at time t+i. During the entire prediction process, the action amount and the external variables remain unchanged. It should be noted that a smaller step size is prone to overshoot, while a too large step size will lead to a longer response time and increase the amount of calculation at the same time. Therefore, the optimal deduction step size can be determined based on multiple experiments. For example, the deduction step size that can be used in this embodiment is 5; in addition, the larger the N value, the more action amount schemes there are, and the better the control effect is relatively, but this will also directly lead to an increase in the amount of calculation. Therefore, it is also necessary to select a reasonable number of action amount samples according to actual conditions. It should also be noted that when selecting time t as the starting prediction point, the actual output value corresponding to time t is selected as the observation value to predict the output result at time t+1.
[0074] Optionally, the training process of the environmental model includes: constructing an environmental model to be trained, wherein the environmental model to be trained is a neural network model; selecting a historical observation quantity from historical data as an initial observation quantity, and obtaining historical action quantity parameters and historical external variable parameters in a time period corresponding to the initial observation quantity, and forming a training parameter group with the initial observation quantity, the historical action quantity parameters and the historical external variable parameters; inputting the training parameter group into the environmental model to be trained to obtain a prediction result of the output of the environmental model to be trained as a prediction result at a first moment; using the prediction result at the first moment as the observation quantity at the next moment, obtaining historical execution action parameters and historical external variable parameters in a time period corresponding to the observation quantity at the next moment, and obtaining the next training parameter group, inputting the next training parameter into the environmental model to be trained to obtain a prediction result at a second moment, until predicted observation quantity change data that meets a preset prediction step length is obtained; inputting the predicted observation quantity change data into a preset discriminant network, determining a reward value based on the discrimination result of the preset discriminant network, and adjusting the parameters of the environmental model through a preset reinforcement learning algorithm based on the reward value to obtain a trained environmental model.
[0075] Specifically, according to the operating characteristics of the equipment, the relevant variables that affect the output results of the equipment are selected, that is, the observed quantity, action quantity and external variables are determined, and the neural network is driven based on historical data to complete the construction of the environmental model. The environmental model to be trained is constructed as follows:
[0076]
[0077]
[0078] in, represents the prediction result at time t+1, S t 、a t , o tThey respectively represent the observation quantity, action quantity, and external variable corresponding to time t, select the historical observation quantity corresponding to any time from the historical data as the initial observation quantity, that is, determine the observation quantity corresponding to time t, and obtain the historical action quantity parameters and historical external variable parameters corresponding to time t, use the observation quantity, historical action quantity, and historical external variable corresponding to time t as the initial input parameters of the environment model to be trained, obtain the prediction result at time t+1, and obtain the prediction result at the first moment, then use the obtained prediction result at the first moment as the observation quantity at the next moment, obtain the historical action quantity and historical external variable at the corresponding moment, use the observation quantity, historical action quantity, and historical external variable corresponding to the first moment as the training parameter group, input them into the environment model to be trained, obtain the prediction result at the next moment, and obtain the prediction result at the second moment, and repeat this process until the predicted observation quantity change data that meets the preset prediction step length is obtained. The predicted observation quantity change data is input into a preset discriminant network, and a reward value is determined based on the discrimination result of the preset discriminant network. The parameters of the environment model are adjusted through a preset reinforcement learning algorithm based on the reward value to obtain a trained environment model. That is, after obtaining the predicted observation quantity change data, the environment model to be trained is adjusted according to the error between the predicted observation quantity change data and the actual observation quantity change data, and the error between the two is determined through the discriminant network. In the process of training the environment model, the environment model to be trained is trained by forming an adversarial network with the environment model and the discriminant network. The predicted observation quantity change data output by the environment model to be trained can be input into the preset discriminant network. The discriminant network correctly identifies whether the input data is real data or data predicted by the environment model. In the training process, the environment model and the discriminant network confront each other and constantly compete until a Nash equilibrium is reached. In the process of training the environment model, the judgment network will also adjust itself, so that the environment model obtained by the final training is more accurate. The output result of the environment model is input into the preset discriminant network, and a reward value is determined based on the discrimination result. The parameters of the environment model are adjusted through a preset reinforcement learning algorithm based on the reward value to obtain a trained environment model.
[0079] In a specific embodiment, the environmental model is a model used to simulate the operating environment of the equipment. It is a neural network model that uses the outlet water temperature as an observed quantity, the proportional valve opening and the fan speed as action quantities, and the inlet water temperature, inlet water flow, segmented valve information, and wind blockage level as external variables to predict the outlet water temperature at the next moment. External variables cannot be predicted and controlled, but as conditional variables, they affect the dynamic response relationship of the transfer model. The outlet water temperature is not determined only by the action quantity and external variables at the current moment, but is comprehensively determined by all variables over a period of time. From the data level analysis, the approximate duration of water flow from entering the gas water heater to flowing out is 5 seconds, so the action quantities and external variables input into the environmental model are stacked, that is, all the action quantities and external variables within 5 seconds are used. When training the environmental model to be trained, the corresponding observation quantity change data is first generated through the environmental model to be trained based on the historical data. The corresponding observation quantity change data generation process is to first select an initial observation quantity from the historical data, and then give the real action quantity and external variables of the corresponding time in a period of time to obtain the prediction result. The prediction result is used as the observation value at the next moment, combined with the real action quantity and the real external variable for prediction, and this process is repeated until the observation quantity change data of the preset step length is reached. Then, the environmental model is updated by determining the error between the observed value change data and the actual observed value data to obtain a trained environmental model, wherein the error between the observed value change data and the actual observed value data is calculated by the discriminant network. The discriminant network is mainly used to correctly identify whether the input data is real data or data generated by the environmental model. The discriminant network is introduced to train the environmental model so that the output results of the trained environmental model can be closer to the real observed values, so that the trained environmental model can simulate the operating environment of the equipment with higher accuracy, thereby making the prediction results more accurate and improving the control effect.
[0080] On the basis of the above embodiments, the training process of the preset discriminant network includes: obtaining predicted observation quantity change data and actual observation quantity change data within the time range corresponding to the predicted observation quantity change data; inputting the predicted observation quantity change data into the preset discriminant network to obtain a first output result corresponding to the predicted observation quantity change data; inputting the actual observation quantity change data into the preset discriminant network to obtain a second output result corresponding to the actual observation quantity change data; determining a first loss function based on the first output result and a preset false label value; determining a second loss function based on the second output result and a preset true label value; adjusting the preset discriminant network based on the first loss function and the second loss function to obtain a target preset discriminant network.
[0081] Among them, the preset false label value can be specifically understood as a numerical value representing the predicted data, and the preset true label value can be specifically understood as data representing the real data. It can be set according to actual needs, and the corresponding character representation corresponding label value can be set for each type of label. For example, the preset false label value is set to 0, and the preset true label value is set to 1.
[0082] Specifically, in the process of training the environmental model, a preset discriminant network is introduced to calculate the error between the observed quantity change data and the actual observed quantity data, and the environmental model to be trained is updated by the error. In this process, the preset discriminant network will also self-adjust with the training process, prompting the environmental model to be trained to improve its prediction ability. In the training process, the output result of the environmental model is input into the discriminant network, and the corresponding real data is also input into the discriminant network, and the first output result corresponding to the predicted observed quantity change data and the first loss function corresponding to the preset false label value are calculated, and the second output result corresponding to the actual observed quantity change data and the second loss function corresponding to the preset real label value are calculated, and then the first loss function and the second loss function are summed, and the preset discriminant network is adjusted by the summation result to obtain the target preset discriminant result.
[0083] On the basis of the above embodiment, after the environment model is trained, the environment model is tested. Only the model that passes the test can fully demonstrate the correctness of the constructed environment model. The deduction test, response curve test, and data distribution test are performed in sequence. Among them, the deduction test specifically quantifies the predicted observed quantity change data and the actual observed quantity change data at the corresponding moment, calculates the absolute value of the error between the predicted observed quantity change data and the actual observed quantity change data corresponding to each moment, and if the absolute value of the error meets the preset error threshold, it means that the deduction test is successful; the response curve test specifically refers to judging whether the change trend of the predicted observed quantity change data meets the preset change trend of the corresponding variable according to the change trend of each variable, and determining that the change trend of the predicted observed quantity change data changes correctly, wherein the preset change trend of the variable is set according to the actual situation. For example, for temperature change, in a real operating environment, the temperature will also rise as the dependent variable increases. Therefore, it can be set that if the dependent variable corresponding to the temperature change shows an increasing change trend, then the corresponding preset change trend of the predicted observed quantity change data should also show an increasing change trend, that is, it is judged that the change trend of the predicted observed quantity change data is an increasing change trend, and then the response curve test is determined to be successful; for the data distribution test, when the environmental model is accurate enough to simulate the real equipment, the output data distribution generated by the environmental model based on the historical data should meet the preset similarity threshold with the real output data distribution, which means that the data distribution test is successful.
[0084] In this embodiment, multiple action parameter values corresponding to the action quantities of multiple target execution components are collected to determine multiple control schemes, and then each parameter group is predicted and processed through a pre-trained environmental model to obtain the observed quantity change data corresponding to each parameter group, so as to subsequently determine the best control scheme, that is, to obtain the parameter values of the target execution components applied to the control device, thereby improving the response speed and control accuracy of the device.
[0085] S130. Determine target observation quantity change data from the observation quantity change data corresponding to the parameter groups based on the target observation quantity change data.
[0086] Specifically, the deviations between the observed quantity change data corresponding to the parameter groups and the target set values can be calculated, and curves can be drawn for the observed quantity change data corresponding to the parameter groups. The similarity between the drawn curves and the curves drawn based on the target set values can be determined, and the observed quantity change data with the smallest deviation or the highest similarity can be used as the target observed quantity change data.
[0087] Optionally, target observation quantity change data are determined from the observation quantity change data corresponding to the parameter groups based on the target observation quantity change data, including: determining the deviation data between the observation quantity change data corresponding to each parameter group and the target observation quantity change data through a predictive model control algorithm; and determining the observation quantity change data corresponding to the minimum deviation data as the target observation quantity change data.
[0088] Among them, the target observation value change data can be specifically understood as the target observation value set at each moment. The target observation value at each moment can be exactly the same or different, and is set according to actual control requirements.
[0089] Specifically, after obtaining the observed quantity change data corresponding to each parameter group, the deviation data between the observed quantity change data corresponding to each parameter group and the preset target observed quantity change data is calculated through the prediction model control algorithm, and the calculated deviation data are compared pairwise to determine the minimum deviation value, and the observed quantity change data corresponding to the minimum deviation value is used as the target observed quantity change data.
[0090] In this embodiment, a control scheme closest to the target observed quantity change data is determined from the observed quantity change data corresponding to each parameter group, so as to determine the optimal action parameter value of the control device.
[0091] S140. Control the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation quantity change data.
[0092] Specifically, the corresponding parameter group is obtained through the target observation quantity change data, and the action quantity parameter value in the parameter group is used as the optimal action parameter value to control the target execution component of the device to execute according to the optimal action parameter value, so that the output result of the control device meets the set output result, thereby completing the stability control of the device.
[0093] The technical solution of the embodiment of the present invention is to obtain multiple action parameter values corresponding to the action amount of the target execution component of the device, determine a group of parameter groups based on each action parameter value, and the parameter group includes the parameter values corresponding to the observation amount, the execution action amount and the external variable respectively; the execution action amount includes the action amount of the target execution component; predict and process each parameter group based on the pre-trained environment model to obtain the observation amount change data corresponding to each parameter group, the environment model is used to simulate the operating environment of the device, and the observation amount change data is the observation amount data that changes with time obtained by multiple predictions of the parameter group by the environment model; determine the target observation amount change data in the observation amount change data corresponding to the parameter group respectively based on the target observation amount change data; and control the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation amount change data. In order to solve the problems of control lag and slow response speed in the existing automatic control method, and the problem of poor control stability caused by the lag control method when the external factors change significantly, the device control method proposed by the scheme can make the device respond in advance, improve the accuracy, response speed and stability of the device control, and thus improve the user experience.
[0094] Embodiment 2
[0095] Figure 2 It is a flow chart of a device control method provided in the second embodiment of the present invention. This embodiment is a further optimization of the method of the above embodiment. Optionally, for any parameter group, the parameter group is input into a pre-trained environmental model to obtain a first prediction value, which is the observed value data at the first prediction moment; a parameter group at the first prediction moment is formed based on the first prediction value and the execution action parameters and external variable parameters in the parameter group; the parameter group at the first prediction moment is input into the pre-trained environmental model to obtain a second prediction value, and the next parameter group is obtained based on the second prediction value, until the observed value data at multiple prediction moments are obtained; and the observed value change data corresponding to the parameter group is obtained based on the observed value data corresponding to the multiple prediction moments. Figure 2 As shown, the method includes:
[0096] S210. Obtain multiple action parameter values corresponding to the action amount of the target execution component of the device, and determine a set of parameter groups based on each action parameter value, wherein the parameter group includes parameter values corresponding to the observation quantity, the execution action amount and the external variable respectively; the execution action amount includes the action amount of the target execution component.
[0097] S220. For any parameter group, input the parameter group into a pre-trained environment model to obtain a first prediction value, where the first prediction value is the observed value data at a first prediction moment.
[0098] Specifically, any parameter group is input as an input parameter into a pre-trained environment model, and after being processed by the environment model, a first prediction value corresponding to the any parameter group is obtained, and the first prediction value is used as the observed value data at the first prediction moment.
[0099] S230. Form a parameter group for a first prediction moment based on the first prediction value and the execution action parameters and external variable parameters in the parameter group.
[0100] Specifically, during the prediction and deduction process, future external variable parameters cannot be known, therefore, the external variable data corresponding to the previous moment can be kept unchanged and together with the first prediction value and the execution action parameters in the parameter group constitute the parameter group of the first prediction moment.
[0101] S240, inputting the parameter group of the first prediction moment into the pre-trained environment model to obtain a second prediction value, and obtaining the next parameter group based on the second prediction value, until the observed value data of multiple prediction moments are obtained.
[0102] Specifically, the parameter group of the first prediction moment is input into the pre-trained environmental model to obtain the second prediction value, and the second prediction value is used as the observation value of the next prediction process, and the execution action parameters and external variable parameters in the corresponding parameter group are formed into the next parameter group, which is continued to be input into the pre-trained environmental model, and the above method is repeated until the observation data of multiple prediction moments are obtained.
[0103] S250. Obtain observation change data corresponding to the parameter group based on the observation data corresponding to the multiple prediction moments.
[0104] Specifically, a plurality of observation data corresponding to the test moments are arranged according to the test moments to obtain observation change data corresponding to the parameter group.
[0105] S260. Determine target observation quantity change data from the observation quantity change data corresponding to the parameter groups based on the target observation quantity change data.
[0106] S270. Control the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation quantity change data.
[0107] The technical solution of the embodiment of the present invention is to obtain multiple action parameter values corresponding to the action amount of the target execution component of the device, determine a group of parameter groups based on each action parameter value, and the parameter group includes parameter values corresponding to the observation amount, the execution action amount and the external variable respectively; the execution action amount includes the action amount of the target execution component; for any parameter group, input the parameter group into a pre-trained environmental model to obtain a first prediction value, and the first prediction value is the observation data at the first prediction moment; form a parameter group at the first prediction moment based on the first prediction value and the execution action parameters and external variable parameters in the parameter group; input the parameter group at the first prediction moment into the pre-trained environmental model to obtain a second prediction value, and obtain the next parameter group based on the second prediction value, until the observation data at multiple prediction moments are obtained; obtain the observation change data corresponding to the parameter group based on the observation data corresponding to the multiple prediction moments; determine the target observation change data in the observation change data corresponding to the parameter group based on the target observation change data; control the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation change data. In order to solve the problems of control lag and slow response speed in existing automatic control methods, as well as the problem of poor control stability caused by drastic changes in external factors in the lagging control methods, the device control method proposed in this scheme can enable the device to respond in advance, improve the accuracy, response speed and stability of device control, thereby improving user experience.
[0108] Embodiment 3
[0109] Figure 3 Schematic diagram of the structure of a device control device provided by Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0110] A parameter group determination module 310 is used to obtain multiple action parameter values corresponding to the action amount of the target execution component of the device, and determine a set of parameter groups based on each action parameter value, wherein the parameter group includes parameter values corresponding to the observed amount, the execution action amount and the external variable respectively; the execution action amount includes the action amount of the target execution component;
[0111] The observation change data determination module 320 is used to perform prediction processing on each parameter group based on the pre-trained environment model to obtain the observation change data corresponding to each parameter group. The environment model is used to simulate the operating environment of the device. The observation change data is the observation data that changes with time obtained by performing multiple predictions on the parameter group through the environment model.
[0112] A target observation amount change data determination module 330, configured to determine the target observation amount change data from the observation amount change data corresponding to the parameter groups respectively based on the target observation amount change data;
[0113] The target execution component control module 340 is used to control the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation value change data.
[0114] The technical solution of the embodiment of the present invention obtains multiple action parameter values corresponding to the action amount of the target execution component of the device through a parameter group determination module, and determines a group of parameter groups based on each action parameter value, wherein the parameter group includes parameter values corresponding to the observation quantity, the execution action quantity and the external variable respectively; the execution action quantity includes the action amount of the target execution component; the observation quantity change data determination module predicts each parameter group based on a pre-trained environmental model to obtain the observation quantity change data corresponding to each parameter group, the environmental model is used to simulate the operating environment of the device, and the observation quantity change data is the observation quantity data that changes with time obtained by multiple predictions of the parameter group by the environmental model; the target observation quantity change data determination module determines the target observation quantity change data in the observation quantity change data corresponding to the parameter groups based on the target observation quantity change data; the target execution component control module controls the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation quantity change data.
[0115] On the basis of the above embodiment, optionally, the parameter group determination module 310 includes an action parameter value sampling unit and a parameter group determination unit, wherein the action parameter value sampling unit is used to: obtain multiple action parameter values by sampling from the standard value range of the action amount of the target execution component through a preset sampling method; the parameter group determination unit is used to determine the action amount parameter, external variable parameter and observation amount parameter corresponding to each action parameter value, and obtain a group of parameter groups corresponding to each action parameter value. Optionally, the parameter group determination unit is also specifically used to: determine the action amount parameters of other action amounts based on the corresponding relationship between the action amount of the target execution component and other action amounts and the action amount parameters corresponding to the action amount of the target execution component; obtain the historical external variable parameters and historical observation amount parameters corresponding to the current moment, and form a group of parameter groups based on the action amount parameters corresponding to each action amount, the historical external variable parameters and historical observation amount parameters corresponding to the current moment.
[0116] Optionally, the observation change data determination module 320 is specifically used to:
[0117] For any parameter group, the parameter group is input into a pre-trained environment model to obtain a first prediction value, where the first prediction value is the observed value data at a first prediction moment;
[0118] Forming a parameter group at a first prediction moment based on the first prediction value and the execution action parameter and the external variable parameter in the parameter group;
[0119] Inputting the parameter group at the first prediction moment into the pre-trained environment model to obtain a second prediction value, and obtaining the next parameter group based on the second prediction value until the observed value data at multiple prediction moments are obtained;
[0120] Based on the observation data corresponding to the multiple prediction moments, the observation change data corresponding to the parameter group are obtained.
[0121] Optionally, the target observation quantity change data determination module 330 is specifically used to:
[0122] Determine the deviation data between the observed quantity change data and the target observed quantity change data corresponding to each parameter group through the prediction model control algorithm;
[0123] The observation change data corresponding to the minimum deviation data is determined as the target observation change data.
[0124] Optionally, the observation change data determination module 320 is further specifically used for:
[0125] Constructing an environment model to be trained, wherein the environment model to be trained is a neural network model;
[0126] Select a historical observation value from the historical data as the initial observation value, and obtain the historical action quantity parameters and historical external variable parameters in the time period corresponding to the initial observation value, and form the initial observation value, the historical action quantity parameters and the historical external variable parameters into a training parameter group;
[0127] Inputting the training parameter group into the environment model to be trained, obtaining the prediction result of the environment model to be trained output as the prediction result at the first moment;
[0128] The prediction result at the first moment is used as the observation value at the next moment, and the historical execution action parameters and historical external variable parameters in the time period corresponding to the observation value at the next moment are obtained to obtain the next training parameter group, and the next training parameter is input into the environment model to be trained to obtain the prediction result at the second moment, until the predicted observation value change data that meets the preset prediction step length is obtained;
[0129] The predicted observation change data is input into the preset discriminant network, the reward value is determined based on the discrimination result of the preset discriminant network, and the parameters of the environment model are adjusted based on the reward value through the preset reinforcement learning algorithm to obtain a trained environment model.
[0130] Optionally, the observation change data determination module 320 is further specifically used for:
[0131] Obtain the predicted observation quantity change data and the actual observation quantity change data within the time range corresponding to the predicted observation quantity change data;
[0132] Inputting the predicted observation quantity change data into a preset discriminant network to obtain a first output result corresponding to the predicted observation quantity change data;
[0133] Inputting the actual observed value change data into a preset discriminant network to obtain a second output result corresponding to the actual observed value change data;
[0134] Determine a first loss function based on the first output result and the preset false label value; determine a second loss function based on the second output result and the preset true label value;
[0135] The preset discriminant network is adjusted based on the first loss function and the second loss function to obtain a target preset discriminant network.
[0136] The equipment control device provided in the embodiment of the present invention can execute the equipment control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0137] Embodiment 4
[0138] Figure 4 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0139] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0140] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0141] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a device control method.
[0142] In some embodiments, the device control method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the device control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the device control method in any other appropriate manner (e.g., by means of firmware).
[0143] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific reference products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0144] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0145] Embodiment 5
[0146] Embodiment 5 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute a device control method, the method comprising:
[0147] Acquire multiple action parameter values corresponding to the action amount of the target execution component of the device, and determine a set of parameter groups based on each action parameter value, wherein the parameter group includes parameter values corresponding to the observed amount, the execution action amount, and the external variable, respectively; the execution action amount includes the action amount of the target execution component;
[0148] Based on the pre-trained environmental model, each parameter group is predicted and processed to obtain the observed quantity change data corresponding to each parameter group. The environmental model is used to simulate the operating environment of the equipment. The observed quantity change data is the observed quantity data that changes with time obtained by multiple predictions of the parameter group by the environmental model;
[0149] Determine the target observation quantity change data from the observation quantity change data corresponding to the parameter groups respectively based on the target observation quantity change data;
[0150] Based on the action parameter values in the parameter group corresponding to the target observation quantity change data, the target execution component of the control device is controlled.
[0151] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0152] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0153] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0154] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0155] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
Claims
1. A device control method, characterized in that: include: Acquire multiple action parameter values corresponding to the action amount of the target execution component of the device, and determine a set of parameter groups based on each of the action parameter values, wherein the parameter groups include parameter values corresponding to the observed amount, the execution action amount, and the external variable, respectively; the execution action amount includes the action amount of the target execution component; Predicting each parameter group based on a pre-trained environment model to obtain observed quantity change data corresponding to each parameter group, wherein the environment model is used to simulate the operating environment of the device, and the observed quantity change data is observed quantity data that changes over time obtained by performing multiple predictions on the parameter group through the environment model; Determine the target observation value change data from the observation value change data respectively corresponding to the parameter groups based on the target observation value; Controlling the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation amount change data; The acquiring device includes acquiring a plurality of action parameter values corresponding to the action amount of the target execution component, and determining a set of parameter groups based on each of the action parameter values, including: Sampling a plurality of action parameter values from a standard value range of the action amount of the target execution component in a preset sampling manner; Determine the action amount parameter, external variable parameter and observation amount parameter corresponding to each action parameter value, and obtain a set of parameter groups corresponding to each action parameter value; The step of determining the action amount parameter, the external variable parameter and the observation amount parameter corresponding to each action parameter value to obtain a group of parameter groups corresponding to each action parameter value includes: Determine the action amount parameters of other action amounts based on the corresponding relationship between the action amount of the target execution component and other action amounts and the action amount parameters corresponding to the action amount of the target execution component; Acquire the historical external variable parameters and the historical observation amount parameters corresponding to the current moment, and form the parameter group based on the action amount parameters corresponding to each action amount, the historical external variable parameters and the historical observation amount parameters corresponding to the current moment; Among them, the device is a temperature control device, the target execution component includes a proportional valve; the action amount of the target execution component includes the proportional valve opening; the external variables include the water inlet temperature, water inlet flow, section valve information, and wind blockage level of the device; the observed quantity includes the water outlet temperature of the device.
2. The method according to claim 1, characterized in that: The predicting process is performed on each parameter group based on the pre-trained environment model to obtain the observed quantity change data corresponding to each parameter group, including: For any of the parameter groups, input the parameter group into the pre-trained environment model to obtain a first prediction value, where the first prediction value is the observed value data at a first prediction moment; Forming a parameter group at a first prediction moment based on the first prediction value and the execution action parameters and external variable parameters in the parameter group; Inputting the parameter group at the first prediction moment into the pre-trained environment model to obtain a second prediction value, and obtaining a next parameter group based on the second prediction value until observation data at multiple prediction moments are obtained; The observation value change data corresponding to the parameter group is obtained based on the observation value data corresponding to multiple prediction moments respectively.
3. The method according to claim 1, characterized in that The determining the target observation value change data from the observation value change data respectively corresponding to the parameter groups based on the target observation value comprises: Determine the deviation data between the observed value change data corresponding to each parameter group and the target observed value change data by using a prediction model control algorithm; The observation change data corresponding to the minimum deviation data is determined as the target observation change data.
4. The method according to claim 1, characterized in that The training process of the environment model includes: Constructing an environment model to be trained, wherein the environment model to be trained is a neural network model; Select a historical observation value as an initial observation value from historical data, and obtain historical action quantity parameters and historical external variable parameters in a time period corresponding to the initial observation value, and form a training parameter group with the initial observation value, the historical action quantity parameters and the historical external variable parameters; Inputting the training parameter group into the environment model to be trained, obtaining a prediction result output by the environment model to be trained as a prediction result at the first moment; The prediction result at the first moment is used as the observation value at the next moment, and the historical action quantity parameters and historical external variable parameters in the time period corresponding to the observation value at the next moment are obtained to obtain the next training parameter group, and the next training parameter is input into the environment model to be trained to obtain the prediction result at the second moment, until the predicted observation quantity change data satisfying the preset prediction step length is obtained; The predicted observed quantity change data is input into a preset discriminant network, a reward value is determined based on a discrimination result of the preset discriminant network, and the parameters of the environmental model are adjusted based on the reward value through a preset reinforcement learning algorithm to obtain a trained environmental model.
5. The method according to claim 4, characterized in that The training process of the preset discriminant network includes: Acquire the predicted observed quantity change data and the actual observed quantity change data within a time range corresponding to the predicted observed quantity change data; Inputting the predicted observed quantity change data into the preset discriminant network to obtain a first output result corresponding to the predicted observed quantity change data; Inputting the actual observed value change data into the preset discriminant network to obtain a second output result corresponding to the actual observed value change data; Determine a first loss function based on the first output result and a preset false label value; determine a second loss function based on the second output result and a preset true label value; The preset discriminant network is adjusted based on the first loss function and the second loss function to obtain a target preset discriminant network.
6. A device control device, characterized in that: include: A parameter group determination module, used to obtain multiple action parameter values corresponding to the action amount of the target execution component of the device, and determine a group of parameter groups based on each of the action parameter values, wherein the parameter group includes parameter values corresponding to the observed amount, the execution action amount and the external variable respectively; the execution action amount includes the action amount of the target execution component; An observation data determination module is used to perform prediction processing on each of the parameter groups based on a pre-trained environmental model to obtain observation change data corresponding to each of the parameter groups, wherein the environmental model is used to simulate the operating environment of the device, and the observation change data is the observation data of the parameter group that changes over time after multiple predictions by the environmental model; A target observation quantity change data determination module, used to determine the target observation quantity change data from the observation quantity change data respectively corresponding to the parameter groups based on the target observation value; A target execution component control module, used to control the target execution component of the device based on the action parameter value in the parameter group corresponding to the target observation amount change data; The parameter group determination module includes an action parameter value sampling unit and a parameter group determination unit; The action parameter value sampling unit is used to: obtain a plurality of action parameter values by sampling from a standard value range of the action amount of the target execution component through a preset sampling method; The parameter group determination unit is used to determine the action amount parameter, external variable parameter and observation amount parameter corresponding to each action parameter value, and obtain a group of parameter groups corresponding to each action parameter value; The parameter group determination unit is specifically used to: determine the action amount parameters of other action amounts based on the corresponding relationship between the action amount of the target execution component and other action amounts and the action amount parameters corresponding to the action amount of the target execution component; obtain the historical external variable parameters and historical observation amount parameters corresponding to the current moment, and form a group of parameter groups based on the action amount parameters corresponding to each action amount, the historical external variable parameters and the historical observation amount parameters corresponding to the current moment; Among them, the device is a temperature control device, the target execution component includes a proportional valve; the action amount of the target execution component includes the proportional valve opening; the external variables include the water inlet temperature, water inlet flow, section valve information, and wind blockage level of the device; the observed quantity includes the water outlet temperature of the device.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device control method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device control method according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Control model obtaining method and system of gas water heater and control computer
CN111948941A
Heat pump water heater debugging method and device
CN114967443A
Water heater control method and gas water heater
CN115560489A
Training method and device of control decision model, equipment and storage medium
CN116562156A
Methods, systems, and apparatus to support reduced use of energy and water
CN116997751A
