Indoor air quality regulation method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202411431381.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2044-10-14
AI Technical Summary
[0005]本发明提供一种室内空气质量调节方法、装置、电子设备及存储介质,以解决相关技术中无法满足实际住宅建筑需兼顾多个房间控制的复杂需求的问题,通过人工智能DQN模块对采集数据进行实时分析并生成控制策略,兼顾全屋各居室空气质量的动态调节,实现能耗与室内空气质量的平衡控制
[0035] The current indoor and outdoor air quality status, the target execution actions of the multiple controllable device terminals, the current execution value, and the indoor and outdoor air quality status at the next moment are stored in the preset memory container.
Smart Images

Figure CN119665422B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent air pollution control technology, and in particular to an indoor air quality adjustment method, device, electronic equipment, and storage medium. Background Technology
[0002] PM 2.5 The main sources include industrial pollution and vehicle exhaust. 2.5 Exposure to PM2.5 increases the risk of respiratory and cardiovascular diseases, thus necessitating effective control of indoor PM2.5 in residential buildings. 2.5 pollute.
[0003] In related technologies, deep reinforcement learning techniques are commonly used to develop indoor air quality control systems, enabling intelligent reduction of indoor PM2.5. 2.5 Concentration, saving energy.
[0004] However, the above-mentioned technical means can only be applied to a single room, failing to meet the complex needs of controlling multiple rooms in actual residential buildings. They also fail to ensure that kitchen ventilation equipment such as range hoods and the building facade are coordinated, making it difficult to achieve coordinated control of energy consumption and air quality, which urgently needs to be addressed. Summary of the Invention
[0005] This invention provides an indoor air quality regulation method, device, electronic device, and storage medium to solve the problem that related technologies cannot meet the complex needs of controlling multiple rooms in actual residential buildings. By using an artificial intelligence DQN module to analyze the collected data in real time and generate control strategies, the invention achieves a balance between energy consumption and indoor air quality by dynamically adjusting the air quality of each room in the house.
[0006] To achieve the above objectives, a first aspect of the present invention provides a method for adjusting indoor air quality, comprising the following steps:
[0007] Collect current outdoor air quality, current living room air quality, and current kitchen air quality;
[0008] The current indoor and outdoor air quality status is obtained based on the current outdoor air quality, the current living room air quality, and the current kitchen air quality. The current indoor and outdoor air quality status is then input into a pre-trained air quality control model to obtain the target execution actions of multiple devices to be controlled. The air quality control model is obtained by training a deep Q-network using a historical air quality dataset.
[0009] The control parameters of each device terminal to be controlled are determined according to the target execution action, and the corresponding device terminal to be controlled is controlled according to the control parameters of each device terminal to be controlled in order to adjust the indoor air quality.
[0010] According to one embodiment of the present invention, the step of inputting the current indoor and outdoor air quality status into a pre-trained air quality control model to obtain target execution actions for multiple controlled device terminals includes:
[0011] The current indoor and outdoor air quality status is input into the pre-trained air quality control model to obtain multiple actions corresponding to the current indoor and outdoor air quality status;
[0012] Based on a preset greedy strategy, the target action is determined from the plurality of actions.
[0013] According to one embodiment of the present invention, before inputting the current indoor and outdoor air quality status into the pre-trained air quality control model, the method further includes:
[0014] Obtain the historical air quality dataset, wherein the historical air quality dataset includes multiple sets of air quality data and the corresponding action for each set of air quality data, and the multiple sets of air quality data consist of outdoor air quality at multiple historical times, living room air quality at multiple historical times, and kitchen air quality at multiple historical times;
[0015] The reward value for executing the action corresponding to each set of air quality data is determined, and the multiple sets of air quality data, the action corresponding to each set of air quality data, and the reward value corresponding to each set of air quality data are divided into multiple tuples and stored in a preset memory container. Each tuple includes the indoor and outdoor air quality status at the first moment, the action corresponding to the indoor and outdoor air quality status at the first moment, the reward value corresponding to the indoor and outdoor air quality status at the first moment, and the indoor and outdoor air quality status at the next moment after the first moment.
[0016] Based on a preset loss function, the behavior network of the deep Q-network is trained using partial data from each of the multiple tuples, and the target network of the deep Q-network is trained using partial data from each of the multiple tuples, thus obtaining the pre-trained air quality control model.
[0017] According to one embodiment of the present invention, after obtaining the target execution action of the plurality of controlled device terminals, the method further includes:
[0018] Obtain the current execution value when executing the target execution action of multiple controllable device terminals corresponding to the current indoor and outdoor air quality status;
[0019] The current indoor and outdoor air quality status, the target execution actions of the multiple controllable device terminals, the current execution value, and the indoor and outdoor air quality status at the next moment are stored in the preset memory container.
[0020] According to one embodiment of the present invention, the plurality of controllable device terminals include a range hood, an air purifier, a window control terminal, and an air conditioner.
[0021] The indoor air quality regulation method proposed in this embodiment of the invention trains an air quality control model using deep reinforcement learning, collects real indoor and outdoor environmental air quality data, and inputs this data into the pre-trained air quality control model. The model then outputs the execution actions of the controlled device terminal. The device terminal determines control parameters based on the output execution actions and adjusts the indoor air quality accordingly. Thus, the artificial intelligence DQN module performs real-time analysis of the collected data and generates control strategies, taking into account the dynamic adjustment of air quality in all rooms of the house, achieving a balance between energy consumption and indoor air quality control.
[0022] To achieve the above objectives, a second aspect of the present invention provides an indoor air quality conditioning device, comprising:
[0023] The data acquisition module is used to collect the current outdoor air quality, the current living room air quality, and the current kitchen air quality.
[0024] The processing module is used to obtain the current indoor and outdoor air quality status based on the current outdoor air quality, the current living room air quality, and the current kitchen air quality, and input the current indoor and outdoor air quality status into a pre-trained air quality control model to obtain the target execution actions of multiple devices to be controlled. The air quality control model is obtained by training a deep Q-network using a historical air quality dataset.
[0025] The control module is used to determine the control parameters of each device terminal to be controlled according to the target execution action, and to control the corresponding device terminal to be controlled according to the control parameters of each device terminal to be controlled, so as to adjust the indoor air quality.
[0026] According to one embodiment of the present invention, the processing module is specifically used for:
[0027] The current indoor and outdoor air quality status is input into the pre-trained air quality control model to obtain multiple actions corresponding to the current indoor and outdoor air quality status;
[0028] Based on a preset greedy strategy, the target action is determined from the plurality of actions.
[0029] According to an embodiment of the present invention, before inputting the current indoor and outdoor air quality status into the pre-trained air quality control model, the processing module is further configured to:
[0030] Obtain the historical air quality dataset, wherein the historical air quality dataset includes multiple sets of air quality data and the corresponding action for each set of air quality data, and the multiple sets of air quality data consist of outdoor air quality at multiple historical times, living room air quality at multiple historical times, and kitchen air quality at multiple historical times;
[0031] The reward value for executing the action corresponding to each set of air quality data is determined, and the multiple sets of air quality data, the action corresponding to each set of air quality data, and the reward value corresponding to each set of air quality data are divided into multiple tuples and stored in a preset memory container. Each tuple includes the indoor and outdoor air quality status at the first moment, the action corresponding to the indoor and outdoor air quality status at the first moment, the reward value corresponding to the indoor and outdoor air quality status at the first moment, and the indoor and outdoor air quality status at the next moment after the first moment.
[0032] Based on a preset loss function, the behavior network of the deep Q-network is trained using partial data from each of the multiple tuples, and the target network of the deep Q-network is trained using partial data from each of the multiple tuples, thus obtaining the pre-trained air quality control model.
[0033] According to an embodiment of the present invention, after obtaining the target execution action of the plurality of controlled device terminals, the processing module is further configured to:
[0034] Obtain the current execution value when executing the target execution action of multiple controllable device terminals corresponding to the current indoor and outdoor air quality status;
[0035] The current indoor and outdoor air quality status, the target execution actions of the multiple controllable device terminals, the current execution value, and the indoor and outdoor air quality status at the next moment are stored in the preset memory container.
[0036] According to one embodiment of the present invention, the plurality of controllable device terminals include a range hood, an air purifier, a window control terminal, and an air conditioner.
[0037] The indoor air quality control device proposed in this embodiment of the invention trains an air quality control model using deep reinforcement learning, collects real indoor and outdoor environmental air quality data, inputs the indoor and outdoor air quality data into the pre-trained air quality control model, and outputs the execution actions of the controlled device terminal. The device terminal determines control parameters based on the output execution actions and adjusts the indoor air quality according to the control parameters. Thus, the artificial intelligence DQN module performs real-time analysis of the collected data and generates control strategies, taking into account the dynamic adjustment of air quality in all rooms of the house, achieving a balance between energy consumption and indoor air quality control.
[0038] To achieve the above objectives, a third aspect of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the indoor air quality adjustment method as described in the above embodiments.
[0039] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the indoor air quality adjustment method as described in the above embodiments.
[0040] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, is used to implement the indoor air quality adjustment method as described in the above embodiments.
[0041] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0042] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0043] Figure 1 A flowchart illustrating an indoor air quality adjustment method according to an embodiment of the present invention;
[0044] Figure 2 This is a schematic diagram of a residential whole-room air quality acquisition system according to a specific embodiment of the present invention;
[0045] Figure 3 A schematic diagram illustrating the principle of an artificial intelligence DQN module according to a specific embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of the structure of a system suitable for an indoor air quality conditioning method according to a specific embodiment of the present invention;
[0047] Figure 5 This is a flowchart illustrating an indoor air quality adjustment method according to a specific embodiment of the present invention.
[0048] Figure 6 This is a block diagram of an indoor air quality conditioning device according to an embodiment of the present invention;
[0049] Figure 7 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention.
[0050] Figure label:
[0051] 10-Indoor air quality control device, 100-Acquisition module, 200-Processing module, 300-Control module, 701-Memory, 702-Processor, 703-Communication interface. Detailed Implementation
[0052] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0053] The following description, with reference to the accompanying drawings, outlines an indoor air quality adjustment method, apparatus, electronic device, and storage medium according to embodiments of the present invention. First, the indoor air quality adjustment method according to embodiments of the present invention will be described with reference to the accompanying drawings.
[0054] Figure 1 This is a flowchart of an indoor air quality adjustment method provided in one embodiment of the present invention.
[0055] like Figure 1 As shown, the indoor air quality adjustment method includes the following steps:
[0056] In step S101, the current outdoor air quality, the current living room air quality, and the current kitchen air quality are collected.
[0057] Specifically, fine particulate matter (PM2.5) 2.5 PM2.5 refers to particulate matter in the atmosphere with a diameter of 2.5 micrometers or less, also known as respirable particulate matter. This invention aims to address PM2.5. 2.5 The impact of pollution on the indoor environment is considered to ensure the safety of residents. Therefore, the current outdoor air quality in this invention should include the current outdoor air PM2.5 concentration. 2.5 Concentration, the current living room air quality should include the current PM2.5 concentration in the living room air. 2.5 Concentration; current kitchen air quality should include the current PM2.5 concentration in the kitchen air. 2.5 Concentration. In embodiments of the present invention, current outdoor air quality can be collected using an outdoor air quality monitoring sensor, or the current living room and kitchen air quality can be collected using sensors in air purifiers, range hoods, and other devices.
[0058] In step S102, the current indoor and outdoor air quality status is obtained based on the current outdoor air quality, the current living room air quality, and the current kitchen air quality. The current indoor and outdoor air quality status is then input into a pre-trained air quality control model to obtain the target execution actions of multiple devices to be controlled. The air quality control model is obtained by training a deep Q-network using a historical air quality dataset.
[0059] Specifically, after collecting the current outdoor air quality, the current living room air quality, and the current kitchen air quality, this embodiment of the invention integrates the air quality data into the current indoor and outdoor air quality status, and inputs the current indoor and outdoor air quality status into a pre-trained air quality control model. This model uses historical air quality datasets as training data and is trained based on a deep Q-network. The trained air quality control model can match the target action of the corresponding device terminal to be controlled according to the input current air quality status.
[0060] Optionally, in some embodiments, the current indoor and outdoor air quality status is input into a pre-trained air quality control model to obtain multiple target execution actions for the controlled device terminals, including: inputting the current indoor and outdoor air quality status into the pre-trained air quality control model to obtain multiple actions corresponding to the current indoor and outdoor air quality status; and determining the target execution action from the multiple actions based on a preset greedy strategy.
[0061] Specifically, the current indoor and outdoor air quality status is input into a pre-trained air quality control model, which then matches multiple corresponding actions. Based on a preset greedy strategy, a random value is preset, and the action with the value less than the random value is selected from the multiple actions and output as the target action. If there is no action with a value less than the random value among the multiple actions, the action with the highest value is selected as the target action.
[0062] For example, first establish the reward model and the action-value function Q(s) t ,a t Initialize the action value function Q(s) t ,a t ), learning rate α, discount factor γ (0 < γ < 1), where s t As a state factor, a t This is an action factor. Among them, a t The action factors at time t are the combined states of the behavior of the window, range hood, and air purifier; s t Let the state factor be the indoor and outdoor air quality at time t.
[0063] s t =(C out(t), C ink (t), C inl (t))
[0064] Among them, C ink (t) represents the PM in the kitchen. 2.5 Concentration, C inl (t) represents PM in the living room 2.5 Concentration, C out (t) represents the outdoor PM2.5 concentration.
[0065] Based on the current state s t The agent observes the current state s t According to its strategy π(a) t |a t Take action a t The agent operates based on the output of the behavioral network. And the ε-greedy policy chooses an action, where This represents all actions that can be taken. An ε-greedy strategy refers to choosing... The maximum probability of the action is ε, and the probability of randomness is 1-ε.
[0066] In step S103, the control parameters of each device terminal to be controlled are determined according to the target execution action, and the corresponding device terminal to be controlled is controlled according to the control parameters of each device terminal to adjust the indoor air quality.
[0067] Specifically, after the air quality control model outputs the target execution action, the embodiments of the present invention determine the control parameters of each device terminal to be controlled based on the target execution action. For example, the control parameter is to increase the power of the device terminal to be controlled from 60% to 80%, and control the corresponding device terminal to be controlled according to the control parameter so that the device terminal to be controlled can adjust the indoor air quality.
[0068] In some embodiments, the multiple controllable device terminals include range hoods, air purifiers, window control terminals, and air conditioners.
[0069] Specifically, such as Figure 2 As shown, Figure 2 This is a schematic diagram of a residential whole-room air quality acquisition system according to a specific embodiment of the present invention. The residential whole-room air quality acquisition system may include: sensors, a central processing system, and multiple controllable device terminals. After determining the control parameters of the controllable device terminals, the central processing system can control the corresponding controllable device terminals according to the control parameters, for example, increasing the power of the air purification system to adjust the indoor air quality.
[0070] Therefore, by collecting the current outdoor air quality, the current living room air quality, and the current kitchen air quality, and integrating the current outdoor air quality, the current living room air quality, and the current kitchen air quality into the current indoor and outdoor air quality status, the current indoor and outdoor air quality status is input into the pre-trained air quality control model, and the target execution action of the device terminal to be controlled is output. The target execution action is then converted into the control parameters of the device terminal, thereby controlling the device terminal.
[0071] Optionally, in some embodiments, before inputting the current indoor and outdoor air quality status into the pre-trained air quality control model, the method further includes: acquiring a historical air quality dataset, wherein the historical air quality dataset includes multiple sets of air quality data and corresponding actions for each set of air quality data, the multiple sets of air quality data consisting of outdoor air quality at multiple historical moments, living room air quality at multiple historical moments, and kitchen air quality at multiple historical moments; determining the reward value when executing the action corresponding to each set of air quality data, and dividing the multiple sets of air quality data, the corresponding actions for each set of air quality data, and the corresponding reward values for each set of air quality data into multiple tuples and storing them in a preset memory container, wherein each tuple includes the indoor and outdoor air quality status at a first moment, the action corresponding to the indoor and outdoor air quality status at the first moment, the reward value corresponding to the indoor and outdoor air quality status at the first moment, and the indoor and outdoor air quality status at the next moment after the first moment; training the behavior network of the deep Q network using partial data from each tuple in the multiple tuples based on a preset loss function, and simultaneously training the target network of the deep Q network using partial data from each tuple in the multiple tuples, thereby obtaining a pre-trained air quality control model.
[0072] Specifically, the air quality control model in this embodiment of the invention includes an artificial intelligence DQN module. When training the model, it is necessary to first acquire a historical air quality dataset, which includes multiple sets of air quality data from multiple time points prior to the current time and the corresponding actions for each set of air quality data. The reward value corresponding to each action is determined based on the action. Multiple tuples are then created based on the multiple sets of air quality data, the corresponding actions, and the corresponding reward values, and these tuples are stored in a preset memory container. Each tuple includes the indoor and outdoor air quality state at a first time point, the action corresponding to that first time point, the reward value corresponding to that first time point, and the indoor and outdoor air quality state at the next time point. Based on a preset loss function, the behavior network and target network of the deep Q-network are trained. The loss function is then calculated using the reward values, and the two trained networks are finally output, resulting in a pre-trained air quality control model.
[0073] Furthermore, in some embodiments, after obtaining the target execution actions of multiple controllable device terminals, the method further includes: obtaining the current execution value when executing the target execution actions of multiple controllable device terminals corresponding to the current indoor and outdoor air quality status; and storing the current indoor and outdoor air quality status, the target execution actions of multiple controllable device terminals, the current execution value, and the indoor and outdoor air quality status at the next moment into a preset memory container.
[0074] Specifically, a memory container can be a data structure used for experience replay to store information such as actions, reward values, and states during historical training. This information is stored in the memory container and can be retrieved at any time to train the behavior network and target network of the deep Q-network.
[0075] For example, combining the above, such as Figure 3 As shown, Figure 3 This is a schematic diagram illustrating the principle of an artificial intelligence DQN module according to a specific embodiment of the present invention. After obtaining the target's action, a time interval is elapsed, and the state s of the next moment is collected. t+1 Based on the state factors s in the current state t+1 and action factors t Update the reward model r value; the agent updates its policy to maximize the total discounted future reward G. t It uses a discount factor γ to balance immediate and delayed rewards. t It can be represented as:
[0076] G t =r t+1 +γr t+2 +…+γ T-t-1 r T
[0077] Where T is the end time of the cycle. The training aims to maximize Gt.
[0078] To estimate the benefit of taking action a in state s, this method uses a value function Q. π (s,a) estimates the expected future reward of action a in state s under policy π(a|s). π (s,a) can be represented as:
[0079]
[0080] Where E π (·) represents the expected value π(a|s) of the expression under a given strategy.
[0081] Next, each step (s) t ,a t ,r t ,st+1 Store the action value in a memory container, and then update the current action value function Q(s). t+1 a): Update the learning rate α and continuously repeat the above steps; while continuously repeating the above steps, every n steps, randomly take a number of (s) from the memory container. k ,a k ,r k s k+1 );(s k ,a k For behavioral networks, the input data is s k The output data is Q. e (s k ,a k For the target network, s k+1 For input, maximum This is the output. Then use the reward r. k Calculate the loss function L k and the outputs of the two networks:
[0082]
[0083] For the target network parameter w e The update, every m time steps, copies the behavioral network parameters and uses them to replace w. e .
[0084] To enable those skilled in the art to further understand the indoor air quality adjustment method of the present invention, the following detailed description is provided in conjunction with specific embodiments.
[0085] Specifically, such as Figure 4 As shown, Figure 4 This is a schematic diagram of a system for an indoor air quality control method according to a specific embodiment of the present invention, wherein the system for an indoor air quality control method includes:
[0086] 1. Air quality acquisition module
[0087] This includes sensors in different locations.
[0088] 2. Data acquisition and storage module
[0089] This includes: communication protocols between modules and databases such as MySQL.
[0090] 3. Artificial Intelligence DQN Module.
[0091] 4. Equipment control terminal module
[0092] This includes: air purifier systems, window control terminals, range hood control terminals, and air conditioning controls.
[0093] Furthermore, such as Figure 5 As shown, Figure 5 A flowchart illustrating an indoor air quality adjustment method according to a specific embodiment of the present invention includes the following steps:
[0094] S1. The air quality acquisition module and the equipment control terminal module acquire indoor and outdoor air quality parameters and equipment terminal parameters in real time.
[0095] S2, the data acquisition and storage module stores the acquired data.
[0096] S3. The indoor air quality control system based on deep reinforcement learning makes real-time decisions based on stored data.
[0097] S4. Send the action decision to the device terminal to complete the control.
[0098] In step S1 above, the indoor and outdoor air quality parameters include outdoor PM2.5. 2.5 PM2.5 concentration in different rooms 2.5 Concentration. In step S2, MySQL is used for data storage and management, and Wi-Fi and device communication protocols are used to obtain device status and collect data. In step S3, a deep reinforcement learning-based indoor air quality control system using DQN makes real-time decisions based on the stored data. In step S4, device terminal parameters include window control status, air purifier status, and range hood status.
[0099] It should be noted that in the indoor air quality regulation method proposed in this embodiment of the invention, the data acquisition module uploads data every minute. Experiments show that the algorithm model can learn a stable strategy in about half a month, while seasons generally change every three months. The algorithm model's strategy may only need to be changed when the seasons change. In addition, since seasonal changes occur slowly, the learning speed of the algorithm model can fully adapt to seasonal changes, achieving an effective balance between energy saving and ensuring air quality. Through machine learning, this invention can also learn different strategies according to different climates, meeting the diverse requirements of the market.
[0100] The indoor air quality regulation method proposed in this embodiment of the invention trains an air quality control model using deep reinforcement learning, collects real indoor and outdoor environmental air quality data, and inputs this data into the pre-trained air quality control model. The model then outputs the execution actions of the controlled device terminal. The device terminal determines control parameters based on the output execution actions and adjusts the indoor air quality accordingly. Thus, the artificial intelligence DQN module performs real-time analysis of the collected data and generates control strategies, taking into account the dynamic adjustment of air quality in all rooms of the house, achieving a balance between energy consumption and indoor air quality control.
[0101] Next, the indoor air quality conditioning device according to an embodiment of the present invention is described with reference to the accompanying drawings.
[0102] Figure 6 This is a block diagram of an indoor air quality conditioning device according to an embodiment of the present invention.
[0103] like Figure 6 As shown, the indoor air quality conditioning device 10 includes: a data acquisition module 100, a processing module 200, and a control module 300.
[0104] The data acquisition module 100 is used to collect the current outdoor air quality, the current living room air quality, and the current kitchen air quality.
[0105] The processing module 200 is used to obtain the current indoor and outdoor air quality status based on the current outdoor air quality, the current living room air quality, and the current kitchen air quality, and input the current indoor and outdoor air quality status into a pre-trained air quality control model to obtain the target execution actions of multiple devices to be controlled. The air quality control model is obtained by training a deep Q-network from a historical air quality dataset.
[0106] The control module 300 is used to determine the control parameters of each device terminal to be controlled according to the target execution action, and to control the corresponding device terminal to be controlled according to the control parameters of each device terminal to adjust the indoor air quality.
[0107] According to one embodiment of the present invention, the processing module 200 is specifically used to: input the current indoor and outdoor air quality status into a pre-trained air quality control model to obtain multiple actions corresponding to the current indoor and outdoor air quality status; and determine the target action to be executed from the multiple actions based on a preset greedy strategy.
[0108] According to an embodiment of the present invention, before inputting the current indoor and outdoor air quality status into the pre-trained air quality control model, the processing module 200 is further configured to: acquire a historical air quality dataset, wherein the historical air quality dataset includes multiple sets of air quality data and execution actions corresponding to each set of air quality data, the multiple sets of air quality data consisting of outdoor air quality at multiple historical moments, living room air quality at multiple historical moments, and kitchen air quality at multiple historical moments; determine the reward value when executing the execution action corresponding to each set of air quality data, and divide the multiple sets of air quality data, the execution actions corresponding to each set of air quality data, and the reward values corresponding to each set of air quality data into multiple tuples and store them in a preset memory container, wherein each tuple includes the indoor and outdoor air quality status at a first moment, the execution action corresponding to the indoor and outdoor air quality status at the first moment, the reward value corresponding to the indoor and outdoor air quality status at the first moment, and the indoor and outdoor air quality status at the next moment after the first moment; based on a preset loss function, train the behavior network of the deep Q network using partial data from each tuple in the multiple tuples, and simultaneously train the target network of the deep Q network using partial data from each tuple in the multiple tuples, to obtain a pre-trained air quality control model.
[0109] According to an embodiment of the present invention, after obtaining the target execution actions of multiple controllable device terminals, the processing module 200 is further configured to: obtain the current execution value when executing the target execution actions of the multiple controllable device terminals corresponding to the current indoor and outdoor air quality status; and store the current indoor and outdoor air quality status, the target execution actions of the multiple controllable device terminals, the current execution value, and the indoor and outdoor air quality status at the next moment into a preset memory container.
[0110] According to one embodiment of the present invention, the plurality of controllable device terminals include a range hood, an air purifier, a window control terminal, and an air conditioner.
[0111] The indoor air quality control device proposed in this embodiment of the invention trains an air quality control model using deep reinforcement learning, collects real indoor and outdoor environmental air quality data, inputs the indoor and outdoor air quality data into the pre-trained air quality control model, and outputs the execution actions of the controlled device terminal. The device terminal determines control parameters based on the output execution actions and adjusts the indoor air quality according to the control parameters. Thus, the artificial intelligence DQN module performs real-time analysis of the collected data and generates control strategies, taking into account the dynamic adjustment of air quality in all rooms of the house, achieving a balance between energy consumption and indoor air quality control.
[0112] Figure 7 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. The electronic device may include:
[0113] The memory 701, the processor 702, and the computer program stored on the memory 701 and executable on the processor 702.
[0114] When the processor 702 executes the program, it implements the indoor air quality adjustment method provided in the above embodiments.
[0115] Furthermore, electronic devices also include:
[0116] Communication interface 703 is used for communication between memory 701 and processor 702.
[0117] The memory 701 is used to store computer programs that can run on the processor 702.
[0118] The memory 701 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.
[0119] If the memory 701, processor 702, and communication interface 703 are implemented independently, then the communication interface 703, memory 701, and processor 702 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0120] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.
[0121] The processor 702 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention.
[0122] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described indoor air quality adjustment method.
[0123] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described indoor air quality adjustment method.
[0124] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0125] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0126] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for regulating indoor air quality, characterized in that, Includes the following steps: Collect current outdoor air quality, current living room air quality, and current kitchen air quality; The current indoor and outdoor air quality status is obtained based on the current outdoor air quality, the current living room air quality, and the current kitchen air quality. The current indoor and outdoor air quality status is then input into a pre-trained air quality control model to obtain the target execution actions of multiple devices to be controlled. The air quality control model is obtained by training a deep Q-network using a historical air quality dataset. The control parameters of each device terminal to be controlled are determined according to the target execution action, and the corresponding device terminal to be controlled is controlled according to the control parameters of each device terminal to be controlled in order to adjust the indoor air quality. The process involves inputting the current indoor and outdoor air quality status into a pre-trained air quality control model to obtain target execution actions for multiple controlled device terminals, including: The current indoor and outdoor air quality status is input into the pre-trained air quality control model to obtain multiple actions corresponding to the current indoor and outdoor air quality status; Based on a preset greedy strategy, the target action is determined from the plurality of actions; The plurality of controllable device terminals include range hoods, air purifiers, window control terminals, and air conditioners; The current indoor and outdoor air quality status is input into the pre-trained air quality control model to obtain multiple actions corresponding to the current indoor and outdoor air quality status; based on a preset greedy strategy, the target action is determined from the multiple actions, including: After inputting the current indoor and outdoor air quality status into the pre-trained air quality control model, the air quality control model will match multiple corresponding actions. Based on a preset greedy strategy, a random value is preset, and one action less than the random value is selected from the multiple corresponding actions as the target action output. If there is no action less than the random value among the multiple corresponding actions, the action with the highest action value is selected as the target action output. The current indoor and outdoor air quality status is input into a pre-trained air quality control model. The air quality control model will match multiple corresponding actions, including: establishing a reward model and an action value function Q( ,at), initialize action value function Q( , Learning rate α, discount factor γ (0 < γ < 1), in, The action factors at time t are specifically the combined states of the behavior of the window, the range hood, and the air purifier. The state factor is specifically the indoor and outdoor air quality state at time t: =( , , ) in, The PM2.5 concentration in the kitchen. This represents the PM2.5 concentration in the living room. This represents the outdoor PM2.5 concentration.
2. The method according to claim 1, characterized in that, Before inputting the current indoor and outdoor air quality status into the pre-trained air quality control model, the method further includes: Obtain the historical air quality dataset, wherein the historical air quality dataset includes multiple sets of air quality data and the corresponding action for each set of air quality data, and the multiple sets of air quality data consist of outdoor air quality at multiple historical times, living room air quality at multiple historical times, and kitchen air quality at multiple historical times; The reward value for executing the action corresponding to each set of air quality data is determined, and the multiple sets of air quality data, the action corresponding to each set of air quality data, and the reward value corresponding to each set of air quality data are divided into multiple tuples and stored in a preset memory container. Each tuple includes the indoor and outdoor air quality status at the first moment, the action corresponding to the indoor and outdoor air quality status at the first moment, the reward value corresponding to the indoor and outdoor air quality status at the first moment, and the indoor and outdoor air quality status at the next moment after the first moment. Based on a preset loss function, the behavior network of the deep Q-network is trained using partial data from each of the multiple tuples, and the target network of the deep Q-network is trained using partial data from each of the multiple tuples, thus obtaining the pre-trained air quality control model.
3. The method according to claim 2, characterized in that, After obtaining the target execution action of the plurality of controlled device terminals, the method further includes: Obtain the current execution value when executing the target action of multiple controlled device terminals corresponding to the current indoor and outdoor air quality status. The current indoor and outdoor air quality status, the target execution actions of the multiple controllable device terminals, the current execution value, and the indoor and outdoor air quality status at the next moment are stored in the preset memory container.
4. An indoor air quality conditioning device, implementing the indoor air quality conditioning method as described in any one of claims 1-3, characterized in that, include: The data acquisition module is used to collect the current outdoor air quality, the current living room air quality, and the current kitchen air quality. The processing module is used to obtain the current indoor and outdoor air quality status based on the current outdoor air quality, the current living room air quality, and the current kitchen air quality, and input the current indoor and outdoor air quality status into a pre-trained air quality control model to obtain the target execution actions of multiple devices to be controlled. The air quality control model is obtained by training a deep Q-network using a historical air quality dataset. The control module is used to determine the control parameters of each device terminal to be controlled according to the target execution action, and to control the corresponding device terminal to be controlled according to the control parameters of each device terminal to be controlled, so as to adjust the indoor air quality.
5. The apparatus according to claim 4, characterized in that, The processing module is specifically used for: The current indoor and outdoor air quality status is input into the pre-trained air quality control model to obtain multiple actions corresponding to the current indoor and outdoor air quality status; Based on a preset greedy strategy, the target action is determined from the plurality of actions.
6. The apparatus according to claim 4, characterized in that, Before inputting the current indoor and outdoor air quality status into the pre-trained air quality control model, it is also used for: Obtain the historical air quality dataset, wherein the historical air quality dataset includes multiple sets of air quality data and the corresponding action for each set of air quality data, and the multiple sets of air quality data consist of outdoor air quality at multiple historical times, living room air quality at multiple historical times, and kitchen air quality at multiple historical times; The reward value for executing the action corresponding to each set of air quality data is determined, and the multiple sets of air quality data, the action corresponding to each set of air quality data, and the reward value corresponding to each set of air quality data are divided into multiple tuples and stored in a preset memory container. Each tuple includes the indoor and outdoor air quality status at the first moment, the action corresponding to the indoor and outdoor air quality status at the first moment, the reward value corresponding to the indoor and outdoor air quality status at the first moment, and the indoor and outdoor air quality status at the next moment after the first moment. Based on a preset loss function, the behavior network of the deep Q-network is trained using partial data from each of the multiple tuples, and the target network of the deep Q-network is trained using partial data from each of the multiple tuples, thus obtaining the pre-trained air quality control model.
7. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, the processor executing the program to implement the indoor air quality adjustment method as described in any one of claims 1-3.
8. A computer storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the indoor air quality adjustment method as described in any one of claims 1-3.
Citation Information
Patent Citations
Building air conditioner energy consumption prediction method based on indoor temperature optimization control
CN116045443A
Fresh air equipment, control method and control device of fresh air equipment and computer readable storage medium
CN116105281A
Fresh air conditioner, control method and device of air conditioner management system and storage medium
CN117128624A