Building integrated management control strategy self-learning method and device, and storage medium
The self-learning of differentiated control strategies for multiple spaces in the building is realized through neural networks, which solves the problem of multi-space and multi-service linkage in large-scale building groups in the existing technology, achieves highly autonomous adaptation and personalized management, and improves comprehensive building management. System flexibility and user experience.
Patent Information
- Application Number
- CN202410617609.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-09-03
AI Technical Summary
It is difficult for the existing comprehensive building management system to achieve multi-space, multi-business linkage and deep integration management in large-scale building groups, and the control strategy management method based on rule tables is highly professional and cumbersome, and cannot realize user habits and personalized perception learning. , and the adaptive control algorithm has poor scalability on high-dimensional state sets.
The neural network is used to realize the self-learning method of differentiated control strategies for multiple spaces in the building. By obtaining the state combination value of the target space, judging the state change, self-learning is performed according to the preset expert rule set, and the action combination value is predicted. And calculate the reward factor based on the reward function, form a state transition entry, add it to the experience library, and gradually optimize the control strategy.
It realizes multi-segmented space, multi-service linkage and in-depth integrated management in large-scale building cluster scenarios, provides a local edge-side reinforcement learning agent foundation that requires no policy rule deployment and has high autonomous adaptability, and improves the flexibility of the system. and user experience.
Smart Images

Figure CN118584804A
Abstract
Description
Technical Field
[0001] The present invention relates to intelligent building technology, and in particular to a control strategy self-learning method, equipment and storage medium for comprehensive building management. Background Art
[0002] With the continuous development of building digitization and informatization, the types of various equipment and facilities and business management subsystems in building spaces are constantly enriched, the level of specialization is constantly improved, and the integration of different subsystems and multiple businesses is deeply integrated. In particular, the capabilities and comfort experience of building space state perception, information release and interaction have been significantly enhanced, which has greatly promoted the improvement of building intelligence. In terms of control mode, traditional building integrated management systems generally focus on local control of field controllers within each subsystem, supplemented by remote control of the management platform; in terms of control logic implementation, the control or management method is generally fixed in the field controller or management platform in the form of software code based on the use scenario, environmental conditions, equipment working characteristics, etc., and generally cannot be changed in the later use of the system.
[0003] With the development of technology, in the field of integrated building management, there are now strategic control methods based on rule tables (expert plans) and self-learning algorithms, which have improved the flexibility of system function adaptation to a certain extent. However, with the continuous increase in building scale, the increasing number of subsystem categories / numbers, the increasing complexity of linkage logic, and the frequent changes in linkage methods, the following problems still exist:
[0004] 1) The existing control strategy management method based on rule tables (expert plans) requires industry experts (or managers) to sort out various management requirements and on-site conditions one by one, and convert them into complete business logic, and then compile them into accurate definitions of input / output objects and matching conditions for various rules. It has high requirements on personnel professionalism, cumbersome processes, and heavy maintenance workload. In addition, due to the low degree of intelligence, it is impossible to achieve perceptual learning based on user habits and personalization, which makes it difficult to support applications in smart application scenarios such as strong interaction and high experience.
[0005] 2) Although there are adaptive control algorithms based on fuzzy algorithms, PID, etc. for the functional control of some professional components of individual subsystems in existing buildings, they are only applicable to low-dimensional state sets and have poor scalability. They are generally difficult to apply to the integrated management of multi-space / multi-subsystem / multi-service in large-scale building complexes. Summary of the invention
[0006] The present invention provides a control strategy self-learning method, device and storage medium for comprehensive building management, so as to realize differentiated control strategy self-learning for multiple spaces in a building, and provide a local edge-side reinforcement learning intelligent agent foundation with no policy rule deployment and high autonomous adaptability for multi-segmented spaces, multi-business linkage and deep integration management in large-scale building complex scenarios.
[0007] In a first aspect, the present invention provides a control strategy self-learning method for integrated building management, comprising:
[0008] S101, obtaining a state combination value of a target space in a building, where the state combination value is a combination of state values of all devices in the target space;
[0009] S102, determining whether the current state combination value is the same as the previous state combination value, if not, executing S103;
[0010] S103. Under the constraints of a preset expert rule set, the state combination value is used as an input of a neural network for self-learning to predict a predicted value of an action combination value of the target space, where the action combination value is a combination of action values of all devices in the target space.
[0011] Optionally, in S102, if yes, execute S105;
[0012] S105, obtaining the action combination value of the target space in the building;
[0013] S106, determine whether the current action combination value is the same as the previous action combination value, if not, execute S107, if yes, execute S108;
[0014] S107, creating a state pre-conversion entry, wherein the state pre-conversion entry includes the state combination value before the action combination value is acted, the state combination value after the action combination value is acted, and the action combination value, and then executing S108;
[0015] S108, calculating the reward factor of the current state based on a preset reward function;
[0016] S109, determining whether the reward factor is zero, if yes, executing S111, if no, executing S110;
[0017] S110, adding the reward factor, the action duration of the action combination value and the reward trigger time to the state pre-conversion entry to obtain a complete state conversion entry, and adding the state conversion entry as a sample to the experience library, and then executing S111;
[0018] S111. The next space in the building is taken as the target space, and the process returns to S101 until the control strategies for all spaces in the building are self-learned.
[0019] Optionally, S103 includes:
[0020] S1031, taking the state combination value as a condition, searching for a state combination matching the state combination value from the state input corresponding to the rule item of the fixed rule set of the preset expert rule set, if it matches, executing S1032, if it does not match, executing S1033;
[0021] S1032, controlling the device in the target space according to the action combination value of the rule item matched in the fixed rule set;
[0022] S1033, obtaining the number of samples in the experience library and the convergence state of the training results of the target space;
[0023] S1035. Based on the number of samples and the convergence state, determine whether to use the state combination value as the input of the neural network for self-learning, and predict the predicted value of the action combination value of the target space.
[0024] Optionally, based on the number of samples and the convergence state, determining whether to use the state combination value as an input of a neural network for self-learning to predict a predicted value of the action combination value of the target space includes:
[0025] S10351. Generate a random number;
[0026] S10352, determining whether the sample quantity is less than the minimum batch threshold for training the neural network, if so, executing S10353, if not, executing S10357;
[0027] S10353, determine whether the random number is greater than the first exploration rate, if so, execute S10354, if not, execute 10356;
[0028] S10354, taking the state combination value as a condition, querying the state combination matching the state combination value from the state input corresponding to the rule item of the reference rule set of the preset expert rule set, if it matches, executing S10355, if it does not match, executing S10356;
[0029] S10355. Control the device in the target space according to the action combination value of the rule item matched in the reference rule set;
[0030] S10356. Randomly extract an action combination value from the action set of the target space to control a device in the target space;
[0031] S10357, determining whether the sample quantity is less than the maximum batch threshold for training the neural network, if so, executing S10358, if not, executing S103510;
[0032] S10358, determining whether the random number is greater than the second exploration rate, if so, executing S10359, if not, executing step S10356;
[0033] S10359, taking the state combination value as a condition, searching for a state combination matching the state combination value from the state input corresponding to the rule item of the reference rule set of the preset expert rule set, if it matches, executing S10355, if it does not match, executing S103512;
[0034] S103510, judging whether the training result of the target space is converged based on the convergence state, if so, executing step S103511, if not, executing S10358;
[0035] S103511, determining whether the random number is greater than a third exploration rate, if so, executing S103512, if not, executing S10356, wherein the first exploration rate is greater than the second exploration rate, and the second exploration rate is greater than the third exploration rate;
[0036] S103512. Input the state combination value into the neural network for self-learning to predict the predicted value of the action combination value of the target space.
[0037] Optionally, S108 includes:
[0038] Calculate the manual intervention reward sub-factor based on the duration of the current action and the deviation between the current action combination value and the previous action combination value;
[0039] Calculate the usage evaluation reward sub-factor based on the user evaluation value;
[0040] Calculating an alarm abnormality reward sub-factor based on the number of over-limit alarms of the action combination value;
[0041] Calculate the energy efficiency bonus sub-factor based on the difference between the current environmental factors and the typical comfort environmental factors;
[0042] Calculating an autonomous operation time bonus sub-factor based on the autonomous operation time;
[0043] The sum of the manual intervention reward sub-factor, the usage evaluation reward sub-factor, the alarm abnormality reward sub-factor, the energy efficiency reward sub-factor and the autonomous operation time reward sub-factor is calculated to obtain the reward factor of the current state.
[0044] Optionally, the self-learning process of the neural network includes a startup mode and an operation mode, the reward discount rate of the startup mode is less than the reward discount rate of the operation mode, and the self-learning process includes:
[0045] Determining whether the training result of the target space converges;
[0046] If converged, determining whether the training stop interval rounds of the target space reaches a threshold;
[0047] If the training stop interval rounds reaches a threshold, resuming the neural network training of the target space;
[0048] If the training stop interval rounds do not reach the threshold, the neural network training of the target space is stopped, and the next space is selected as the target space, and the step of determining whether the training result of the target space converges is executed;
[0049] If it does not converge, determine whether the number of samples in the experience library is less than the preset value;
[0050] If the number of samples is less than a preset value, neural network training is performed according to the startup mode;
[0051] If the number of samples is greater than or equal to the preset value, the neural network training is performed according to the operation mode.
[0052] Optionally, the neural network is a Q network, and the training process of the neural network is:
[0053] Extracting a training sample group required for one round of training from the experience library of the target space;
[0054] Inputting the current state combination value and the action combination value in the first training sample in the training sample group into the prediction Q network to obtain a predicted Q value output by the prediction Q network;
[0055] Inputting the state combination value and the reward factor after the action in the first training sample in the training sample group into the target Q network to obtain the target Q value output by the target Q network;
[0056] Calculate a loss value based on the predicted Q value and the target Q value;
[0057] Update the network parameters of the prediction Q network based on the loss value;
[0058] Select the next sample of the training sample group, and return to execute the step of inputting the current state combination value and the action combination value in the first training sample in the training sample group into the prediction Q network to obtain the predicted Q value output by the prediction Q network, until the training of all samples in the training sample group is completed;
[0059] Determine whether the training rounds of the target space have reached the preset number;
[0060] When the training rounds of the target space reach a preset number, the network parameters of the predicted Q network are copied to the target Q network, the next space in the building is taken as the target space, and the step of extracting the training sample group required for one round of training from the experience library of the target space is returned to execute until the training of all spaces in the building is completed.
[0061] Optionally, after the training results in the target space converge, the following steps are also included:
[0062] Set the cross-space learning distance value of the target space;
[0063] Extracting a plurality of first samples with the same state combination value from the experience library of the target space;
[0064] Calculating the fluctuation range of the reward factor of the first sample;
[0065] The state combination value of the first sample whose fluctuation amplitude exceeds a predetermined amplitude is taken as a reward fluctuation set;
[0066] Determine a first space whose distance value to the target space is not greater than the cross-space learning distance value;
[0067] Combining the reward fluctuation set with the state combination value of the first space to obtain a cross-space state set;
[0068] Generate a random number;
[0069] Determining whether the random number is greater than a third exploration rate;
[0070] If yes, the state combination value is input into the neural network for self-learning to predict the predicted value of the action combination value of the target space;
[0071] If not, randomly extracting an action combination value from the action set of the target space to control the device in the target space;
[0072] Determining whether the target space converges after the samples in the experience library are expanded across the spatial state set;
[0073] If not, the cross-space learning distance value is increased by 1, and the step of determining the first space whose distance value to the target space is not greater than the cross-space learning distance value is returned to be executed until the target space converges after the cross-space state set of the samples in the experience library is expanded or the cross-space learning distance value reaches a maximum value;
[0074] When the target space converges after the sample expansion cross-space state set in the experience library or the cross-space learning distance value reaches the maximum value, the next space is selected as the target space, and the step of setting the cross-space learning distance value of the target space is returned to execute until all spaces are traversed.
[0075] In a second aspect, the present invention further provides a control strategy self-learning device for integrated building management, comprising:
[0076] A state acquisition module, used to acquire a state combination value of a target space in a building, wherein the state combination value is a combination of state values of all devices in the target space;
[0077] A state judgment module is used to judge whether the current state combination value is the same as the previous state combination value;
[0078] A self-learning module is used to perform self-learning under the constraints of a preset expert rule set, using the state combination value as an input of a neural network, and predicting a predicted value of an action combination value of the target space, wherein the action combination value is a combination of action values of all devices in the target space.
[0079] In a third aspect, the present invention further provides an electronic device, comprising:
[0080] one or more processors;
[0081] A storage device for storing one or more programs;
[0082] When the one or more programs are executed by the one or more processors, the one or more processors implement the control strategy self-learning method for integrated building management as provided in the first aspect of the present invention.
[0083] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the control strategy self-learning method for integrated building management as provided in the first aspect of the present invention.
[0084] The control strategy self-learning method for comprehensive building management provided by the present invention includes: obtaining the state combination value of the target space in the building, the state combination value is the combination of the state values of all devices in the target space, judging whether the current state combination value is the same as the previous state combination value, if not, under the constraint of the pre-set expert rule set, using the state combination value as the input of the neural network for self-learning, predicting the predicted value of the action combination value of the target space, the action combination value is the combination of the action values of all devices in the target space. The present invention realizes differentiated control strategy self-learning for multiple spaces in a building based on a neural network, and at the same time integrates the guidance of the expert rule set of spatial features, effectively avoiding the system availability problems caused by random action exploration in the initial stage of system deployment, and providing a local edge-side reinforcement learning intelligent agent foundation that is free of policy rule deployment and has high autonomous adaptability for multi-segmented spaces, multi-business linkage and deep integration management in large-scale building complex scenarios.
[0085] 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
[0086] 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.
[0087] Figure 1 A schematic diagram of the structure of a control strategy self-learning system for integrated building management provided by an embodiment of the present invention;
[0088] Figure 2 A flow chart of a control strategy self-learning method for integrated building management provided by an embodiment of the present invention;
[0089] Figure 3 A building integrated control logic diagram provided by an embodiment of the present invention;
[0090] Figure 4 Schematic diagram of the module of the control strategy self-learning algorithm for integrated building management in an embodiment of the present invention;
[0091] Figure 5 It is a processing logic diagram of the policy control and discovery management module in an embodiment of the present invention;
[0092] Figure 6 A schematic diagram of a neural network self-learning strategy provided by an embodiment of the present invention;
[0093] Figure 7 A cross-space control strategy learning flow chart provided by an embodiment of the present invention;
[0094] Figure 8 A schematic diagram of the structure of the control strategy self-learning device for comprehensive building management provided by the present invention;
[0095] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0096] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0097] 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.
[0098] It should be noted that the terms "first", "second", 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 interchanged 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.
[0099] The embodiment of the present invention provides a control strategy self-learning system for comprehensive building management. Figure 1 A structural diagram of a control strategy self-learning system for comprehensive building management provided by an embodiment of the present invention, such as Figure 1 As shown in the figure, the control strategy self-learning system for comprehensive building management is generally composed of a management platform, a building intelligent gateway, various business subsystems, and information interaction equipment.
[0100] Among them, the management platform has multi-site management capabilities and has typical expert rule sets for various types of building space characteristics (such as offices, conference rooms, toilets, etc.). Each type of expert rule set is composed of a fixed rule set and a reference rule set.
[0101] The building intelligent gateway is a comprehensive management device for the field area / edge, which can perform action control according to a given strategy based on the input of the combined value of each space state. It generally has a CPU and an NPU, where the CPU is used for business management, state collection, action control, strategy self-learning management and other functional deployments; the NPU is used for deep reinforcement learning neural network model deployment (such as DQN, DDQN, etc.), which can explore, learn and reason the optimal action control strategy based on the input of the environmental state.
[0102] Each business subsystem is deployed in each building space (such as conference rooms, offices, toilets, laboratories, etc.), such as access control subsystem, elevator control subsystem, air conditioning subsystem, lighting subsystem, video surveillance subsystem, environmental monitoring subsystem, conference reservation subsystem, etc. And each device / component belonging to each subsystem carries a unique radio frequency identity tag (such as RFID), and the identity tag information generally includes the subsystem ID and the state / action object ID.
[0103] Information interaction devices, such as information release screens or central control screens, are generally deployed at the entrances of each space (or central area). The building intelligent gateway can actively push status information such as the environment, equipment, personnel and business in the space to the interactive devices in the corresponding space based on the information interaction needs. The interaction content generally includes: equipment control (including operation mode / parameter changes) and current space operation effect evaluation (such as excellent, good, poor, etc.).
[0104] The data involved in the above system include the state set S, action set A and information set R of each space in the building. Among them, the state set S includes: the current environmental state in the space and its sensor detection value, the operating parameter values of various equipment and facilities, the output / control object value, the operating status of various business systems, etc. The action set C includes: various action values (including equipment operating parameter adjustment and output control value). The space information set R includes: each space ID, space distance, typical space energy consumption, typical human flow energy consumption, etc. Exemplarily, the state set S is shown in Table 1, the action set A is shown in Table 2, and the information set R is shown in Table 3.
[0105] Table 1
[0106]
[0107]
[0108] Table 2
[0109]
[0110] Table 3
[0111]
[0112] Figure 2 The flowchart of a control strategy self-learning method for building integrated management provided by an embodiment of the present invention is applicable to the situation of intelligent building integrated management. The method can be executed by the building integrated control device provided by an embodiment of the present invention. The device can be implemented by software and / or hardware, and is usually configured in an electronic device, such as Figure 2 As shown, the control strategy self-learning method for comprehensive building management includes the following steps:
[0113] S101. Obtain a state combination value of a target space in a building, where the state combination value is a combination of state values of all devices in the target space.
[0114] In the embodiment of the present invention, the target space can be any space in a building, such as a conference room, toilet, office, laboratory, etc. The state combination value of the target space can be obtained through the business subsystem in the target space. The state combination value is a combination of the state values of all devices in the target space, including the current environment state in the space and its sensor detection value, the operating parameter values of various equipment and facilities, the output / control object value, the operating state of various business systems, etc.
[0115] Figure 3 A building integrated control logic diagram provided by an embodiment of the present invention is exemplarily as follows: Figure 3 As shown in the figure, the spaces in the building are numbered in sequence in advance, and the space with sequence number 1 is selected as the target space for observation, and the state combination value of the space is obtained (such as vector S = [i1 = 0, i2 = 10, ..., i n =60]).
[0116] S102: Determine whether the current state combination value is the same as the previous state combination value.
[0117] For example, Figure 3 As shown, first check whether the current self-learning function of the target space is turned on. If not, select the next space as the target space and return to execute S101; if yes, execute S102 to determine whether the current state combination value is the same as the previous state combination value (i.e., determine whether the state combination value is updated). If not (i.e., the current state combination value is different from the previous state combination value), execute S103.
[0118] S103. Under the constraints of a preset expert rule set, the state combination value is used as the input of the neural network for self-learning to predict the predicted value of the action combination value of the target space, where the action combination value is a combination of the action values of all devices in the target space.
[0119] Exemplarily, in an embodiment of the present invention, the neural network may be a Q network. When the current state combination value is different from the previous state combination value, the current state combination value is passed to the policy control and exploration management module, in which, under the constraints of a preset expert rule set, the state combination value is used as the input of the neural network for self-learning, and the predicted value of the action combination value of the target space is predicted, and the action combination value is a combination of the action values of all devices in the target space.
[0120] After predicting the predicted value of the action combination value based on the current state combination value, the device in the target space is controlled according to the predicted value of the action combination value.
[0121] The control strategy self-learning method for comprehensive building management provided by the embodiment of the present invention includes: obtaining the state combination value of the target space in the building, the state combination value is the combination of the state values of all devices in the target space, judging whether the current state combination value is the same as the previous state combination value, if not, under the constraint of the pre-set expert rule set, using the state combination value as the input of the neural network for self-learning, predicting the predicted value of the action combination value of the target space, the action combination value is the combination of the action values of all devices in the target space. The present invention realizes differentiated control strategy self-learning for multiple spaces in a building based on a neural network, and at the same time integrates the guidance of the expert rule set of spatial features, effectively avoiding the system availability problems caused by random action exploration in the initial stage of system deployment, and providing a local edge-side reinforcement learning intelligent agent foundation with no policy rule deployment and high autonomous adaptability for multi-segmented space, multi-business linkage and deep integration management in large-scale building complex scenarios.
[0122] Figure 4 FIG. 1 is a schematic diagram of a module of a control strategy self-learning algorithm for building integrated management in an embodiment of the present invention. In some embodiments of the present invention, for example, Figure 3 , 4 As shown, in S102, if (that is, the current state combination value is the same as the previous state combination value), S105 and subsequent steps are executed.
[0123] S105: Obtain the action combination value of the target space in the building.
[0124] Exemplarily, in S101, when observing the target space, the current action combination value of the target space can also be obtained (such as vector A=[o1=5, o2=1, ...on=100]).
[0125] S106, judging whether the current action combination value is the same as the previous action combination value (ie whether the action combination value is updated), if not, executing S107, and if so, executing S108.
[0126] S107, creating a state pre-conversion entry, the state pre-conversion entry includes the state combination value before the action combination value action, the state combination value after the action combination value action and the action combination value, and then executing S108.
[0127] If the current action combination value is different from the previous action combination value, create a state pre-transition entry D prepare (S, A, S′), where S is the state combination value before the action, S′ is the state combination value after the action output, and A is the action combination value.
[0128] S108. Calculate the reward factor of the current state based on a preset reward function.
[0129] In the embodiment of the present invention, the reward factor of the current state is calculated based on a preset reward function.
[0130] Exemplarily, in some embodiments of the present invention, the reward factor is composed of a manual intervention reward sub-factor, a usage evaluation reward sub-factor, an alarm abnormality reward sub-factor, an energy efficiency reward sub-factor, and an autonomous operation time reward sub-factor.
[0131] Specifically, the manual intervention reward sub-factor is calculated based on the duration of the current action and the deviation between the current action combination value and the previous action combination value;
[0132] Calculate the usage evaluation reward sub-factor based on the user evaluation value;
[0133] Calculate the alarm abnormality reward sub-factor based on the number of over-limit alarms of the action combination value;
[0134] Calculate the energy efficiency bonus sub-factor based on the difference between the current environmental factors and the typical comfort environmental factors;
[0135] Calculating an autonomous operation time bonus sub-factor based on the autonomous operation time;
[0136] The sum of the manual intervention reward sub-factor, the usage evaluation reward sub-factor, the alarm abnormality reward sub-factor, the energy efficiency reward sub-factor and the autonomous operation time reward sub-factor is calculated to obtain the reward factor of the current state.
[0137] Exemplary, artificial intervention reward sub-factor R inter (A,A′,t), is a penalty (negative value, 0~-S a , such as -S a -50), by collecting control operation changes from the central control / release screen / WeChat terminal / management platform / third-party interface, when there is an intervention operation, if the current action maintenance time t is not less than the threshold T inter_min When t is less than T, there is no penalty; when t is less than Tinter_min When t is shorter (or the deviation of the intervention action is larger), the penalty value is larger, and t is longer (or the deviation of the intervention action is smaller), the penalty value is smaller. It is calculated as follows: formula (1), where dif(A, A′) represents the deviation between the current action and the previous action, k a is the adjustment coefficient (when t is less than T int er_min Time a Take 0);
[0138]
[0139] Use the evaluation reward sub-factor R eval (x), positive and negative bisexual (-S b ~S c , such as -S b -50, S c =100), the system can actively push the use effect evaluation interface to the user (manager) through the on-site release screen / central control screen / mobile WeChat terminal at a given time (such as every noon). The higher the evaluation value, the greater the reward, and vice versa. For example, excellent 100, good 80, poor -20, error -50. It is calculated as follows formula (2), where x represents the evaluation value.
[0140] R eval (x) = x, s c ≥x≥-s b (Formula 2)
[0141] Alarm abnormality reward sub-factor R erro (x), is a penalty (negative value, 0~-s d , such as d =-50), and is generated when a new fault anomaly occurs. It monitors the over-limit alarm (or abnormal) status of the action in this space, such as door opening timeout, over-temperature, etc. [abnormalities / alarms caused only by device control output value, operation mode or parameter errors, i.e., no hardware failures]. Its calculation is as shown in formula (3), where k b is the penalty value conversion factor (such as 10), n err is the number of current action over-limit alarms, and when there is a device hardware failure k b is 0.
[0142] R erro (x) = -1 × k b ×n err (Formula 3)
[0143] Energy efficiency bonus sub-factor R enery (E,dif env ,z), encouraging (0~s e , such as e=50), which is calculated by the environmental contribution and the human flow contribution. It is generated once a day at a fixed time (such as 2 a.m.). If there is no energy-saving demand, it is counted as 0. If there is, the accumulated energy consumption E in the space on that day is calculated. total Statistics, calculate the difference between the current environment and the typical comfortable environment dif env (t, l, h, f), (the influencing factors include temperature t, illumination l, humidity h, wind speed f), indoor flow coverage time z, and then calculate according to the following formula (4, 5, 6), Ee avr is the environmental contribution benchmark value, Em avr The base value of the contribution of human flow, k env , k man is the conversion factor.
[0144] dif env (t,l,h,f)=k temp ×dif t (t)+k light ×dif l (l)+k humidity ×dif h (h)+k fan ×dif f (f) (Formula 4)
[0145]
[0146]
[0147] Autonomous operation time R auto (t auto ,z), encouraging (0-S f , such as S f is 50), autonomous non-intervention operation duration t auto Greater than the starting threshold T auto_min When , it is calculated as in formula (7), where K auto is the reward discount coefficient (when t auto Less than T auto_min When K auto is 0, i.e. no reward), and z is the indoor crowd coverage duration on that day.
[0148]
[0149] The reward function can be expressed as follows (8):
[0150] r roomTotal =R inter (A,A′,t)+R eval (x)+R eval (x)+R enery (E,dif env,z)+R auto (t auto ,z)(Formula 8)
[0151] S109, determining whether the reward factor is zero (i.e., whether there is a reward factor), if so, executing S111, if not, executing S110.
[0152] S110, adding the reward factor, the action maintenance duration of the action combination value and the reward trigger time to the state pre-transition entry to obtain a complete state transition entry, and adding the state transition entry as a sample to the experience library, and then executing S111.
[0153] If the reward factor is not zero, the reward factor r and the action combination value are maintained for a duration of t keep and reward trigger time t reward Add to state pre-transition entry D prepare (S, A, S′), we get the complete state transition entry D complete (S,A,S′,r,t keep ,t reward ), and add the state transition entry as a sample to the experience library, and then execute S111.
[0154] S111. The next space in the building is taken as the target space, and the process returns to S101 until the control strategies for all spaces in the building are self-learned.
[0155] The next numbered space in the building is used as the target space, and the process returns to S101 until the control strategies for all spaces in the building are self-learned.
[0156] The embodiment of the present invention can automatically generate reward feedback that integrates multi-dimensional target expectations such as human intervention degree, user evaluation, abnormal alarm, autonomous operation time and energy efficiency by constructing a reward function that perceives diversified incentive factors for building space status / events, thereby automatically establishing experience samples with high training value for Q network learning.
[0157] Figure 5 FIG. 1 is a processing logic diagram of the policy control and discovery management module in an embodiment of the present invention. Figure 4 , 5 As shown, in some embodiments of the present invention, the processing process of the policy control and discovery management module in S103 is as follows:
[0158] S1030. Obtain an expert rule set corresponding to the type of the target space from the management platform according to the information set of the target space.
[0159] S1031, based on the state combination value, select a fixed rule set RL from a preset expert rule set FixedThe state input corresponding to the rule item is searched for a state combination that matches the state combination value. If it matches, S1032 is executed; if it does not match, S1033 is executed.
[0160] S1032. Control the devices in the target space according to the action combination values of the rule items matched in the fixed rule set.
[0161] S1033. Obtain the number of samples in the experience library and the convergence state of the training results of the target space.
[0162] In fixed rule set RL Fixed When there is no matching item that matches the current state combination value, obtain the number of samples SP in the experience library sum The convergence state of the training results of the target space. The convergence state includes convergence and non-convergence. For example, it can be determined whether the space is currently converged based on the statistical trend of the loss function loss of the previous training round of the target space (a training round is a training round in which each sample in a training sample group is trained one by one).
[0163] S1035. Based on the number of samples and the convergence state, decide whether to use the state combination value as the input of the neural network for self-learning, and predict the predicted value of the action combination value of the target space.
[0164] Exemplarily, S1035 includes the following sub-steps:
[0165] S10351. Generate a random number.
[0166] In fixed rule set RL Fixed When there is no match for the current state combination value, generate a random number between 0 and 1.
[0167] S10352. Determine whether the number of samples is less than the minimum batch threshold for training the neural network. If so, execute S10353; if not, execute 10357.
[0168] Determine the current number of samples SP in the experience library sum Is it less than the minimum batch threshold RD used to train the neural network? min If yes, execute S10353, if no, execute 10357.
[0169] S10353. Determine whether the random number is greater than the first exploration rate. If so, execute S10354; if not, execute 10356.
[0170] If the current sample size SP in the experience database sum Less than the minimum batch threshold RD for training neural networks min, then further determine whether the generated random number is greater than the first exploration rate ε max (For example, 60%), if yes, execute S10354, if no, execute 10356.
[0171] S10354. Based on the state combination value, query the state combination that matches the state combination value from the state input corresponding to the rule item of the reference rule set of the preset expert rule set. If it matches, execute S10355; if it does not match, execute S10356.
[0172] If the random number is greater than the first exploration rate ε max , then, with the state combination value S as the condition, the reference rule set RL of the preset expert rule set refer The state combination that matches the state combination value S is searched in the state input corresponding to the rule item. If it matches, execute S10355; if it does not match, execute S10356.
[0173] S10355. Control the devices in the target space according to the action combination values of the rule items matched in the reference rule set.
[0174] If we refer to the rule set RL refer If the state input corresponding to the rule item has a matching item that matches the state combination value S, then the action combination value A of the matching rule item in the reference rule set is used. force Take control of the devices in the target space.
[0175] S10356. Randomly extract action combination values from the action set of the target space to control the device in the target space.
[0176] If we refer to the rule set RL refer If the state input corresponding to the rule item does not have a matching item that matches the state combination value S, then the action combination value A is randomly selected from the action set in the target space. random Take control of the devices in the target space.
[0177] S10357. Determine whether the number of samples is less than the maximum batch threshold for training the neural network. If so, execute S10358; if not, execute S103510.
[0178] If the current sample size SP in the experience database sum Not less than the minimum batch threshold RD used to train the neural network min , further determine the sample size SP sum Is it less than the maximum batch threshold RD used to train the neural network? max If yes, execute S10358, if no, execute S103510.
[0179] S10358. Determine whether the random number is greater than the second exploration rate. If so, execute S10359; if not, execute step S10356.
[0180] If the current sample size SP in the experience database sum Less than the maximum batch threshold RD used to train neural networks max , then further determine whether the random number is greater than the second exploration rate ε mid If yes, execute step S10359, if no, execute step S10356.
[0181] S10359. Based on the state combination value, query the state combination that matches the state combination value from the state input corresponding to the rule item of the reference rule set of the preset expert rule set. If it matches, execute S10355; if it does not match, execute S103512.
[0182] S103510. Determine whether the training result of the target space converges based on the convergence state. If so, execute step S103511; if not, execute S10358.
[0183] If the sample size SP sum Not less than the maximum batch threshold RD used to train the neural network max , then determine whether the training result of the target space converges based on the convergence state, if so, execute step S103511, if not, execute S10358.
[0184] S103511. Determine whether the random number is greater than the third exploration rate ε min If yes, execute S103512, if no, execute S10356, where the first exploration rate ε max Greater than the second exploration rate ε mid , the second exploration rate ε mid Greater than the third exploration rate ε min .
[0185] S103512. Input the state combination value into the neural network to predict the predicted value of the action combination value of the target space.
[0186] If the random number is greater than the third exploration rate ε min , then the state combination value is input into the neural network for self-learning to predict the predicted value of the action combination value in the target space.
[0187] Figure 6 A schematic diagram of a neural network self-learning strategy provided by an embodiment of the present invention, such as Figure 5 , 6 As shown, in some embodiments of the present invention, the self-learning process of the neural network includes a startup mode and an operation mode, and the self-learning process includes:
[0188] 1. Determine whether the training results of the target space converge.
[0189] 2. If convergence occurs, determine the target space training stop interval N stopSpace Whether the threshold N is reached stopSpaceTh (or whether the training rounds have reached the preset value). Among them, one training stop gap round means that all spaces complete one training. When all spaces complete one training, the training stop gap round count is increased by 1.
[0190] 3. If the training stops for N rounds stopSpace Reaching the threshold N stopSpaceTh , then resume the neural network training in the target space, that is, the training enable bit EN rtrian Change to 1. Each time the neural network training of the target space is resumed, the training stop interval round count corresponding to the target space is reset to zero.
[0191] 4. If the training stops for N rounds stopSpace Threshold N not reached stopSpaceTh , then stop the neural network training of the target space, that is, the training enable bit EN rtrian Change it to 0, select the next space as the target space, and execute the step of judging whether the training result of the target space converges.
[0192] 5. If the training results of the target space do not converge, determine the number of samples SP in the experience library sum Is it less than the preset value N? min .
[0193] 6. If the sample size SP sum Less than the preset value N min , the neural network training is performed according to the activated mode.
[0194] 7. If the sample size SP sum Greater than or equal to the preset value N min , the neural network training is performed according to the operation mode.
[0195] Exemplarily, in the embodiment of the present invention, taking the neural network as a Q network as an example, the startup mode and the operation mode have different learning parameters, and the learning parameters include the random sampling number EXP of a round of training sample groups batch_NUM , training single step duration T step_Train , adjacent space training interval T room_interval , return discount rate λ, etc. The startup mode is suitable for low experience sample size and focuses on fast iterative training. The running mode is suitable for rich experience sample size and focuses on stability and long-term returns.
[0196] For example, the reward discount rate λ of the startup mode takes the minimum value λ min (such as 0.1, focusing on short-term returns), target Q network parameter replication interval N cpy_interval Take the lower threshold N cpy_interval_min (e.g. 50 rounds). The range of random batch extraction of experience is the full set of samples SP belonging to the current space of the experience library sum ; Sampling proportion coefficient K Bat Take a smaller value K batch_min (such as 30%), then the random sampling amount EXP of the training sample group batch_num =K batch_min *SP sum Check the time T that the samples in the target space in the experience library stop updating exp_no_add And the training round N after stopping updating no_add_round_train , if T exp_no_add Less than the minimum threshold K no_add_min *T room_interval (Its K no_add_min is the adjustment coefficient, such as 50), and N no_add_round_train Less than the minimum threshold N round_train_min (such as 100), then the training step length T step_Train Take the shortest period P step_time_min (e.g. 1 second), spatial training interval T room_interval Take the shortest time T room_interval_min , otherwise the training will be a single step length T step_Train and spatial training interval T room_interval Both increase to the shortest value k add1 times(3>k add1 >1), that is, T step_Train =k add1 *P step_time_min , T room_interval =k add1 *T room_interval_min .
[0197] The return discount rate λ of the operating mode takes a medium value λ mid (such as 0.6, focusing on long-term returns), target Q network parameter replication interval N cpy_interval Take the highest threshold N cpy_interval_max (e.g. 500). The range of random batch extraction is the entire experience library SP corresponding to this space. sum , and starting from the latest experience item downward with a medium proportion coefficient K batch_mid Draw (such as 70%), randomly draw amount EXP batch_num =K batch_mid *SP sum . Training single step length T step_Train Take the medium period P step_time_mid(For example, 3 seconds). The number of training rounds N after the samples in the target space experience library stop updating no_add_round_train Less than the medium threshold N round_train_mid (such as 200), target space training interval T room_interval Take the medium period T room_interval_mid , otherwise increase the target space training interval to the shortest value k add2 times (10>k add1 >3), that is, T step_Train =k add2 *P step_time_min , T room_interval= k add2 *T room_interval_min .
[0198] The embodiment of the present invention can adaptively adjust its self-learning exploration rate and Q network training parameters according to the status of each space in the building (such as physical environment / personnel / office business) and the learning progress of the control strategy, so as to minimize useless exploration of random action control, improve the convergence speed, take into account the exploration efficiency and stability, and give priority to ensuring the reliability of use of the system after it is put into use.
[0199] In the above self-learning process, the neural network is a Q network, such as Figure 6 As shown in Figure 2, the training process of the neural network is:
[0200] 1. Extract the training sample group required for one round of training from the experience library of the target space.
[0201] Exemplarily, through the learning parameters of the above startup mode or operation mode, a training sample group EXP required for a round of training is extracted from the experience library of the target space. batch_NUM .
[0202] 2. Input the current state combination value S and action combination value A in the first training sample in the training sample group into the prediction Q network Q (S, A; w), where w is the network parameter of the prediction Q network, and obtain the predicted Q value (Q_expected) output by the prediction Q network.
[0203] 3. Input the state combination value S' and reward factor r after the action in the first training sample in the training sample group into the target Q network Q (S', r; w-), where w- is the network parameter of the target Q network, and obtain the target Q value (Q_target) output by the target Q network.
[0204] 4. Calculate the loss value based on the predicted Q value (Q_expected) and the target Q value (Q_target) input into the loss function. Exemplarily, the loss function can be a cross entropy loss function.
[0205] 5. Update the network parameters of the prediction Q network based on the loss value.
[0206] Exemplarily, the network parameters of the prediction Q network are updated in the direction of decreasing loss function by the gradient descent method.
[0207] 6. Select the next sample of the training sample group, and return to execute the step of inputting the current state combination value and action combination value in the first training sample in the training sample group into the prediction Q network to obtain the predicted Q value output by the prediction Q network, until the training of all samples in the training sample group is completed.
[0208] 6. Determine whether the training rounds Ns of the target space have reached the preset number T room_interval (e.g. 100).
[0209] 7. The number of training rounds Ns in the target space reaches the preset number T room_interval When , the network parameters of the predicted Q network are copied to the target Q network, the next space in the building is taken as the target space, and the step of extracting the training sample group required for one round of training from the experience library of the target space is returned until the training of all spaces in the building is completed.
[0210] The embodiment of the present invention introduces a target Q network. During the training process, only the network parameters of the prediction Q network are updated, while the network parameters of the target Q network are kept fixed. In this way, the target value becomes relatively stable, making the learning process more stable and effective. After a certain number of updates, the network parameters of the prediction Q network are copied to the target Q network, ensuring the stability of the target network parameters while also allowing it to gradually adapt to the learning progress of the prediction Q network. In this way, the deep Q network can effectively learn stable strategies and ultimately achieve better performance.
[0211] In some embodiments of the present invention, learning is performed according to the above self-learning process, and after the control strategy learning of all spaces converges, cross-space control strategy learning is performed. Figure 7 A cross-space control strategy learning flow chart provided by an embodiment of the present invention, such as Figure 7 As shown in Figure 2, cross-space control strategy learning includes the following processes:
[0212] 1. Set the cross-space learning distance value of the target space.
[0213] In the embodiment of the present invention, after the control strategy learning of all spaces converges, the cross-space learning distance value d of the target space (learning object) is set to 1.
[0214] 2. Extract multiple first samples with the same state combination value from the experience library of the target space.
[0215] 3. Calculate the fluctuation range of the reward factor of the first sample.
[0216] Exemplarily, a reference value may be set, and then the fluctuation range of the reward factor of each first sample and the reference value may be calculated.
[0217] 4. The fluctuation range exceeds the predetermined range R dif The state combination value of the first sample is used as the reward fluctuation set c instabilityd .
[0218] 5. Determine the first space whose distance value to the target space is not greater than the cross-space learning distance value.
[0219] Exemplarily, the distance value between two spaces may be the difference between the serial numbers of the two spaces.
[0220] 6. Set the reward fluctuation set c instabilityd Combined with the state combination value of the first space, we get the cross-space state set C Span-d .
[0221] 7. Perform Q network training according to the learning and exploration parameters of the input phase. Specifically, determine whether the random number is greater than the third exploration rate ε min If so, the state combination value is input into the neural network for self-learning to predict the predicted value of the action combination value of the target space; if not, the action combination value is randomly extracted from the action set of the target space to control the equipment in the target space.
[0222] 8. Determine whether the target space converges after the samples in the experience library are expanded across the spatial state set.
[0223] 9. If not, add d+1 to the cross-space learning distance value, and return to the step of determining the first space whose distance value to the target space is not greater than the cross-space learning distance value, until the target space converges after the cross-space state set of samples in the experience library is expanded or the cross-space learning distance value reaches the maximum value d max .
[0224] 10. After the target space samples in the experience base extend the cross-space state set, convergence or the cross-space learning distance value reaches the maximum value d max , determine whether the sequence number of the target space is the last space. If so, end this round of cross-space strategy learning. Otherwise, take the next space sequence number as the cross-space strategy learning object (i.e., the target space) and repeat the above cross-space control strategy learning process until the cross-space strategy learning of all spaces is completed.
[0225] The embodiments of the present invention have cross-space exploration and learning capabilities, and provide a local edge-side reinforcement learning intelligent agent foundation with no policy rule deployment and high autonomous adaptability for multi-segmented spaces, multi-business linkage and deep integration management in large-scale building complex scenarios.
[0226] The embodiment of the present invention also provides a control strategy self-learning device for comprehensive building management. Figure 8 The structural diagram of the control strategy self-learning device for comprehensive building management provided by the present invention is as follows: Figure 8 As shown, the control strategy self-learning device for integrated building management includes:
[0227] A state acquisition module 201 is used to acquire a state combination value of a target space in a building, where the state combination value is a combination of state values of all devices in the target space;
[0228] A state determination module 202 is used to determine whether the current state combination value is the same as the previous state combination value;
[0229] The self-learning module 203 is used to perform self-learning under the constraints of a preset expert rule set, using the state combination value as the input of the neural network, and predict the predicted value of the action combination value of the target space, where the action combination value is a combination of the action values of all devices in the target space.
[0230] In some embodiments of the present invention, the control strategy self-learning device for integrated building management further includes:
[0231] An action combination value acquisition module, used for acquiring the action combination value of the target space in the building when the current state combination value is the same as the previous state combination value;
[0232] An action judgment module is used to judge whether the current action combination value is the same as the previous action combination value;
[0233] An entry creation module, used for creating a state pre-conversion entry when the current action combination value is different from the previous action combination value, the state pre-conversion entry including the state combination value before the action combination value is acted, the state combination value after the action combination value is acted, and the action combination value;
[0234] A reward factor calculation module, used to calculate the reward factor of the current state based on a preset reward function when the current action combination value is the same as the previous action combination value;
[0235] A reward factor determination module, used to determine whether the reward factor is zero;
[0236] A sample adding module, used for adding the reward factor, the action maintenance duration of the action combination value and the reward trigger time to the state pre-conversion entry when the reward factor is not zero, to obtain a complete state conversion entry, and adding the state conversion entry as a sample to the experience library;
[0237] The first return execution module is used to take the next space in the building as the target space when the reward factor is zero, and return to execute to obtain the state combination value of the target space in the building, wherein the state combination value is the combination of the state values of all devices in the target space until the control strategy self-learning of all spaces in the building is completed.
[0238] In some embodiments of the present invention, the self-learning module 203 includes:
[0239] The state matching submodule is used to query the state combination matching the state combination value from the state input corresponding to the rule item of the fixed rule set of the preset expert rule set based on the state combination value, and if there is a match;
[0240] A first control output submodule, used for controlling the device in the target space according to the action combination value of the matched rule item in the fixed rule set during matching;
[0241] A data acquisition submodule, used for acquiring the number of samples in the experience library and the convergence state of the training results of the target space when there is a mismatch;
[0242] The self-learning submodule is used to determine whether to use the state combination value as the input of the neural network for self-learning based on the sample quantity and the convergence state, and predict the predicted value of the action combination value of the target space.
[0243] In some embodiments of the present invention, the self-learning submodule includes:
[0244] A random number generating unit, used for generating a random number;
[0245] A first sample quantity determination unit, used to determine whether the sample quantity is less than a minimum batch threshold for training the neural network;
[0246] A first exploration rate comparison unit, configured to determine whether the random number is greater than a first exploration rate when the number of samples is less than a minimum batch threshold for training the neural network;
[0247] A state matching unit, configured to query a state combination matching the state combination value from state inputs corresponding to rule items of a reference rule set of a preset expert rule set, based on the state combination value when the random number is greater than a first exploration rate;
[0248] A first control output unit, used to control the device in the target space according to the action combination value of the rule item matched in the reference rule set during matching;
[0249] A second control output unit, configured to randomly extract an action combination value from an action set of the target space to control a device in the target space when there is no match or the random number is not greater than the first exploration rate;
[0250] A second sample quantity determination unit, configured to determine whether the sample quantity is less than a maximum batch threshold for training the neural network when the sample quantity is not less than a minimum batch threshold for training the neural network;
[0251] A second exploration rate comparison unit, configured to determine whether the random number is greater than a second exploration rate when the number of samples is less than a maximum batch threshold for training the neural network;
[0252] A first matching unit is used to query a state combination matching the state combination value from state inputs corresponding to rule items of a reference rule set of a preset expert rule set based on the state combination value when the random number is greater than a second exploration rate;
[0253] A convergence judgment unit, configured to judge whether the training result of the target space is converged based on the convergence state when the number of samples is less than a maximum batch threshold for training the neural network;
[0254] A third exploration rate comparison unit, configured to determine whether the random number is greater than a third exploration rate when the training result of the target space converges, wherein the first exploration rate is greater than the second exploration rate, and the second exploration rate is greater than the third exploration rate;
[0255] The self-learning unit is used to input the state combination value into the neural network for self-learning when the random number is greater than the third exploration rate, and predict the predicted value of the action combination value of the target space.
[0256] In some embodiments of the present invention, the reward factor calculation module includes:
[0257] A first sub-factor calculation sub-module, used to calculate the manual intervention reward sub-factor based on the duration of the current action and the deviation between the current action combination value and the previous action combination value;
[0258] The second sub-factor calculation sub-module is used to calculate the usage evaluation reward sub-factor based on the user evaluation value;
[0259] A third sub-factor calculation sub-module is used to calculate the alarm abnormality reward sub-factor based on the over-limit alarm number of the action combination value;
[0260] The fourth sub-factor calculation sub-module is used to calculate the energy efficiency reward sub-factor based on the difference between the current environmental factor and the typical comfort environmental factor;
[0261] A fifth sub-factor calculation sub-module, used to calculate an autonomous operation time reward sub-factor based on the autonomous operation time;
[0262] The summation submodule is used to calculate the sum of the manual intervention reward subfactor, the usage evaluation reward subfactor, the alarm abnormality reward subfactor, the energy efficiency reward subfactor and the autonomous operation time reward subfactor to obtain the reward factor of the current state.
[0263] In some embodiments of the present invention, the self-learning process of the neural network includes a startup mode and an operation mode, the reward discount rate of the startup mode is less than the reward discount rate of the operation mode, and the self-learning process includes:
[0264] Determining whether the training result of the target space converges;
[0265] If converged, determining whether the training stop interval rounds of the target space reaches a threshold;
[0266] If the training stop interval rounds reaches a threshold, resuming the neural network training of the target space;
[0267] If the training stop interval rounds do not reach the threshold, the neural network training of the target space is stopped, and the next space is selected as the target space, and the step of determining whether the training result of the target space converges is executed;
[0268] If it does not converge, determine whether the number of samples in the experience library is less than the preset value;
[0269] If the number of samples is less than a preset value, neural network training is performed according to the startup mode;
[0270] If the number of samples is greater than or equal to the preset value, the neural network training is performed according to the operation mode.
[0271] In some embodiments of the present invention, the neural network is a Q network, and the training process of the neural network is:
[0272] Extracting a training sample group required for one round of training from the experience library of the target space;
[0273] Inputting the current state combination value and the action combination value in the first training sample in the training sample group into the prediction Q network to obtain a predicted Q value output by the prediction Q network;
[0274] Inputting the state combination value and the reward factor after the action in the first training sample in the training sample group into the target Q network to obtain the target Q value output by the target Q network;
[0275] Calculate a loss value based on the predicted Q value and the target Q value;
[0276] Update the network parameters of the prediction Q network based on the loss value;
[0277] Select the next sample of the training sample group, and return to execute the step of inputting the current state combination value and the action combination value in the first training sample in the training sample group into the prediction Q network to obtain the predicted Q value output by the prediction Q network, until the training of all samples in the training sample group is completed;
[0278] Determine whether the training rounds of the target space have reached the preset number;
[0279] When the training rounds of the target space reach a preset number, the network parameters of the predicted Q network are copied to the target Q network, the next space in the building is taken as the target space, and the step of extracting the training sample group required for one round of training from the experience library of the target space is returned to execute until the training of all spaces in the building is completed.
[0280] In some embodiments of the present invention, the control strategy self-learning device for integrated building management further includes:
[0281] A distance value setting module, used to set the cross-space learning distance value of the target space after the training result of the target space converges;
[0282] A sample extraction module, used for extracting a plurality of first samples with the same state combination value from the experience library of the target space;
[0283] A fluctuation range calculation module, used to calculate the fluctuation range of the reward factor of the first sample;
[0284] A reward fluctuation set determination module, used for taking the state combination value of the first sample whose fluctuation range exceeds a predetermined range as a reward fluctuation set;
[0285] A first space determination module, used to determine a first space whose distance value to the target space is not greater than the cross-space learning distance value;
[0286] A merging module, used for merging the reward fluctuation set with the state combination value of the first space to obtain a cross-space state set;
[0287] A random number generation module is used to generate a random number;
[0288] An exploration rate judgment module, used to judge whether the random number is greater than a third exploration rate;
[0289] a cross-space self-learning module, for inputting the state combination value into the neural network for self-learning, and predicting a predicted value of the action combination value of the target space;
[0290] an output control module, for, if no, randomly extracting an action combination value from an action set of the target space to control a device in the target space;
[0291] A cross-space convergence judgment module, used to judge whether the target space converges after the sample in the experience library expands the cross-space state set;
[0292] a second return execution module, configured to, if not, add 1 to the cross-space learning distance value, and return to execute the step of determining the first space whose distance value to the target space is not greater than the cross-space learning distance value, until the target space converges after the cross-space state set of samples in the experience library is expanded or the cross-space learning distance value reaches a maximum value;
[0293] The traversal module is used to select the next space as the target space when the target space converges after the sample expansion cross-space state set in the experience library or the cross-space learning distance value reaches the maximum value, and return to execute the step of setting the cross-space learning distance value of the target space until all spaces are traversed.
[0294] The above-mentioned control strategy self-learning device for integrated building management can execute the control strategy self-learning method for integrated building management provided by the aforementioned embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the control strategy self-learning method for integrated building management.
[0295] Fig. 9 A schematic diagram of the structure of an electronic device provided for an embodiment of the present invention. The electronic device 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.
[0296] like Fig. 9As shown, the electronic device 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 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.
[0297] A number of components in the electronic device 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 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0298] 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 special 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 executes the various methods and processes described above, such as the control strategy self-learning method for integrated building management.
[0299] In some embodiments, the control strategy self-learning method for integrated building management 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 an electronic device 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 control strategy self-learning method for integrated building management described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the control strategy self-learning method for integrated building management in any other appropriate manner (e.g., by means of firmware).
[0300] Various implementations 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 standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can 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.
[0301] 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.
[0302] 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.
[0303] 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).
[0304] 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.
[0305] 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.
[0306] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the control strategy self-learning method for integrated building management as provided in any embodiment of the present application.
[0307] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0308] 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.
[0309] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A control strategy self-learning method for integrated building management, characterized in that: include: S101, obtaining a state combination value of a target space in a building, where the state combination value is a combination of state values of all devices in the target space; S102, determining whether the current state combination value is the same as the previous state combination value, if not, executing S103; S103. Under the constraints of a preset expert rule set, the state combination value is used as an input of a neural network for self-learning to predict a predicted value of an action combination value of the target space, where the action combination value is a combination of action values of all devices in the target space.
2. The control strategy self-learning method for integrated building management according to claim 1 is characterized in that: In S102, if yes, execute S105; S105, obtaining the action combination value of the target space in the building; S106, determine whether the current action combination value is the same as the previous action combination value, if not, execute S107, if yes, execute S108; S107, creating a state pre-conversion entry, wherein the state pre-conversion entry includes the state combination value before the action combination value is acted, the state combination value after the action combination value is acted, and the action combination value, and then executing S108; S108, calculating the reward factor of the current state based on a preset reward function; S109, determining whether the reward factor is zero, if so, executing S111, if not, executing S110; S110, adding the reward factor, the action duration of the action combination value and the reward trigger time to the state pre-conversion entry to obtain a complete state conversion entry, and adding the state conversion entry as a sample to the experience library, and then executing S111; S111. The next space in the building is taken as the target space, and the process returns to S101 until the control strategies for all spaces in the building are self-learned.
3. The control strategy self-learning method for integrated building management according to claim 2 is characterized in that: S103 includes: S1031, taking the state combination value as a condition, searching for a state combination matching the state combination value from the state input corresponding to the rule item of the fixed rule set of the preset expert rule set, if it matches, executing S1032, if it does not match, executing S1033; S1032, controlling the device in the target space according to the action combination value of the rule item matched in the fixed rule set; S1033, obtaining the number of samples in the experience library and the convergence state of the training results of the target space; S1035. Based on the number of samples and the convergence state, determine whether to use the state combination value as the input of the neural network for self-learning, and predict the predicted value of the action combination value of the target space.
4. The control strategy self-learning method for integrated building management according to claim 3 is characterized in that: Based on the number of samples and the convergence state, determining whether to use the state combination value as an input of a neural network for self-learning, and predicting a predicted value of the action combination value of the target space, includes: S10351. Generate a random number; S10352, determining whether the sample quantity is less than the minimum batch threshold for training the neural network, if so, executing S10353, if not, executing S10357; S10353, determine whether the random number is greater than the first exploration rate, if so, execute S10354, if not, execute 10356; S10354, taking the state combination value as a condition, querying the state combination matching the state combination value from the state input corresponding to the rule item of the reference rule set of the preset expert rule set, if it matches, executing S10355, if it does not match, executing S10356; S10355: Control the device in the target space according to the action combination value of the rule item matched in the reference rule set; S10356. Randomly extract an action combination value from the action set of the target space to control a device in the target space; S10357, determining whether the sample quantity is less than the maximum batch threshold for training the neural network, if so, executing S10358, if not, executing S103510; S10358, determining whether the random number is greater than the second exploration rate, if so, executing S10359, if not, executing step S10356; S10359, taking the state combination value as a condition, searching for a state combination matching the state combination value from the state input corresponding to the rule item of the reference rule set of the preset expert rule set, if it matches, executing S10355, if it does not match, executing S103512; S103510, judging whether the training result of the target space is converged based on the convergence state, if so, executing step S103511, if not, executing S10358; S103511, determining whether the random number is greater than a third exploration rate, if so, executing S103512, if not, executing S10356, wherein the first exploration rate is greater than the second exploration rate, and the second exploration rate is greater than the third exploration rate; S103512. Input the state combination value into the neural network for self-learning to predict the predicted value of the action combination value of the target space.
5. The control strategy self-learning method for integrated building management according to any one of claims 2 to 4, characterized in that: S108 includes: Calculate the manual intervention reward sub-factor based on the duration of the current action and the deviation between the current action combination value and the previous action combination value; Calculate the usage evaluation reward sub-factor based on the user evaluation value; Calculating an alarm abnormality reward sub-factor based on the number of over-limit alarms of the action combination value; Calculate the energy efficiency bonus sub-factor based on the difference between the current environmental factors and the typical comfort environmental factors; Calculating an autonomous operation time bonus sub-factor based on the autonomous operation time; The sum of the manual intervention reward sub-factor, the usage evaluation reward sub-factor, the alarm abnormality reward sub-factor, the energy efficiency reward sub-factor and the autonomous operation time reward sub-factor is calculated to obtain the reward factor of the current state.
6. The control strategy self-learning method for integrated building management according to any one of claims 1 to 4, characterized in that: The self-learning process of the neural network includes a startup mode and an operation mode, the reward discount rate of the startup mode is less than the reward discount rate of the operation mode, and the self-learning process includes: Determining whether the training result of the target space converges; If converged, determining whether the training stop interval rounds of the target space reaches a threshold; If the training stop interval rounds reaches a threshold, resuming the neural network training of the target space; If the training stop interval rounds do not reach the threshold, the neural network training of the target space is stopped, and the next space is selected as the target space, and the step of determining whether the training result of the target space converges is executed; If it does not converge, determine whether the number of samples in the experience library is less than the preset value; If the number of samples is less than a preset value, neural network training is performed according to the startup mode; If the number of samples is greater than or equal to the preset value, the neural network training is performed according to the operation mode.
7. The control strategy self-learning method for integrated building management according to claim 6 is characterized in that: The neural network is a Q network, and the training process of the neural network is: Extracting a training sample group required for one round of training from the experience library of the target space; Inputting the current state combination value and the action combination value in the first training sample in the training sample group into the prediction Q network to obtain a predicted Q value output by the prediction Q network; Inputting the state combination value and the reward factor after the action in the first training sample in the training sample group into the target Q network to obtain the target Q value output by the target Q network; Calculate a loss value based on the predicted Q value and the target Q value; Update the network parameters of the prediction Q network based on the loss value; Select the next sample of the training sample group, and return to execute the step of inputting the current state combination value and the action combination value in the first training sample in the training sample group into the prediction Q network to obtain the predicted Q value output by the prediction Q network, until the training of all samples in the training sample group is completed; Determine whether the training rounds of the target space have reached the preset number; When the training rounds of the target space reach a preset number, the network parameters of the predicted Q network are copied to the target Q network, the next space in the building is taken as the target space, and the step of extracting the training sample group required for one round of training from the experience library of the target space is returned to execute until the training of all spaces in the building is completed.
8. The control strategy self-learning method for integrated building management according to claim 1 is characterized in that: After the training results in the target space converge, it also includes: Set the cross-space learning distance value of the target space; Extracting a plurality of first samples with the same state combination value from the experience library of the target space; Calculating the fluctuation range of the reward factor of the first sample; The state combination value of the first sample whose fluctuation amplitude exceeds a predetermined amplitude is taken as a reward fluctuation set; Determine a first space whose distance value to the target space is not greater than the cross-space learning distance value; Combining the reward fluctuation set with the state combination value of the first space to obtain a cross-space state set; Generate a random number; Determining whether the random number is greater than a third exploration rate; If yes, the state combination value is input into the neural network for self-learning to predict the predicted value of the action combination value of the target space; If not, randomly extracting an action combination value from the action set of the target space to control the device in the target space; Determining whether the target space converges after the samples in the experience library are expanded across the spatial state set; If not, the cross-space learning distance value is increased by 1, and the step of determining the first space whose distance value to the target space is not greater than the cross-space learning distance value is returned to be executed until the target space converges after the cross-space state set of the samples in the experience library is expanded or the cross-space learning distance value reaches a maximum value; When the target space converges after the sample expansion cross-space state set in the experience library or the cross-space learning distance value reaches the maximum value, the next space is selected as the target space, and the step of setting the cross-space learning distance value of the target space is returned to execute until all spaces are traversed.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the control strategy self-learning method for integrated building management as described in any one of claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the control strategy self-learning method for integrated building management as described in any one of claims 1-8 is implemented.
