A method and system for intelligent control of building water use
By adopting the conditions of dynamic recoding strategy in the intelligent water management and control system for building use deep neural decision tree algorithms that are versatile networks and local structural entropy in the construction, the problems of insufficient diversity of data generation and simple feature selection strategies in the existing system are solved, and higher data analysis accuracy and better category imbalance processing are achieved.
Patent Information
- Application Number
- CN202411767694.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The existing intelligent water management and control system for building use has problems such as insufficient data generation diversity, simple feature selection strategies, fixed learning rate and insufficient category imbalance in data analysis, resulting in poor data analysis accuracy.
The conditional generation adversarial network algorithm of dynamic recoding strategy is used for data expansion, and the deep neural decision tree algorithm of local structural entropy is used for feature extraction and classification. The adaptive learning rate adjustment mechanism and the adaptive update mechanism of category weights are used to improve the accuracy of data analysis.
Through the combination of dynamic recoding and local structural entropy, more realistic and diverse simulated building water data are generated, which improves the accuracy of feature extraction and classification, improves the accuracy of data analysis, and solves the problems of category imbalance and learning rate adjustment.
Smart Images

Figure CN119228590B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electrical digital data processing, and in particular to an intelligent control method and system for building water use. Background Art
[0002] As an important part of the daily operation of buildings, water resources consumption not only affects the utilization efficiency of water resources, but also directly relates to water-related energy expenditures (such as the energy consumption of water pumps and hot water supply systems). In order to save water and enhance the utilization of water resources, each building is usually equipped with an intelligent building water management and control system (also known as a smart water system, smart water control, smart water control management system, smart water affairs, etc.). This type of system mainly relies on multiple water affairs equipment installed in or on the pipeline to achieve remote monitoring. After monitoring and obtaining building water use data, the data processor of this type of system will analyze the building water use data and make corresponding decisions. Water affairs equipment includes flow meters, water level meters, meteorological environment, telemetry data acquisition, water quality measurement instruments, etc. This type of system can realize the full process monitoring and management of raw water, water supply, water saving, drainage, sewage and other water affairs, reduce maintenance difficulty, and reduce energy consumption, so it has been widely promoted and applied.
[0003] However, the data processor of the existing building water intelligent management and control system has the following problems when analyzing building water data (usually electrical digital data):
[0004] (I) In order to better process building water data, a conditional generative adversarial network is used to generate simulated building water data when training the data processor. However, the encoding of the conditional variables of the existing conditional generative adversarial network is usually static and does not change during the entire training process. This fixed conditional encoding limits the diversity of the data generated by the generator, especially when facing complex multimodal data such as building water data. It cannot effectively reflect the real water flow behavior, environmental changes and user habits under different conditions, resulting in the lack of adaptability and realism of the generated simulated building water data, making the diversity of the simulated building water data insufficient, thereby affecting the training of other models and ultimately affecting the accuracy of data analysis;
[0005] (ii) The data processor will use a classifier to label the processed building water data with its classification category. The basis of classification is determined according to the needs, which can be water quality, water flow, etc. The existing classifier has the following three problems: ① The feature selection strategy of the existing classifier is simple and cannot process high-dimensional complex data. The decision tree model of the existing classifier usually uses global entropy or Gini index as the splitting criterion. Although this method is simple and easy to implement, its ability to distinguish features is insufficient in high-dimensional data and complex scenarios, which may cause the model to select inappropriate features when making decisions, thereby affecting the classification accuracy and efficiency, especially for building water data, which involves multidimensional, nonlinear, and non-Gaussian distribution data. Therefore, traditional feature selection methods are prone to inaccurate node splitting, affecting the performance of the classifier. ② The learning rate of the existing classifier is fixed, which is difficult to adapt to the training needs of different stages. In the existing technology, most deep learning models use a fixed learning rate, which leads to the classifier's slow learning speed in the early stage of training and cannot effectively explore the complex patterns of the data; in the later stage of training, due to the excessively high learning rate, it is easy to cause the model to overfit and fall into a local optimal solution, which is difficult to further optimize. ③ The existing classifiers are not capable of handling class imbalance. Existing classifiers are relatively simple in handling class imbalance problems, usually relying on data sampling techniques (such as undersampling or oversampling) or simple class weight adjustments. However, these methods often affect the overall performance of the model. Undersampling may result in a large loss of data, while oversampling may introduce redundancy and lead to overfitting. Existing classifiers lack a mechanism for dynamically adjusting weights to deal with class imbalance problems, making it difficult to improve the classification effect of a few categories without affecting model performance. The problems with existing classifiers make the judgment of building water use data inaccurate.
[0006] Therefore, the existing intelligent management and control systems and methods for building water use have the problem of poor data analysis accuracy. Summary of the invention
[0007] The technical problem to be solved by the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a method and system for intelligent management of building water use with high data analysis accuracy.
[0008] In order to solve the above technical problems, the present invention provides a method for intelligent management and control of building water, comprising:
[0009] S1. Collect real building water use data, mark the energy consumption level of the real building water use data, and store the marked real building water use data;
[0010] Energy consumption levels include level 1, level 2, level 3, level 4 and level 5;
[0011] S2. Use the annotated real building water use data to train a data augmentation model based on a conditional generative adversarial network algorithm using a dynamic recoding strategy. After the training is completed, use the data augmentation model to generate simulated building water use data to obtain augmented training building water use data.
[0012] The expanded building water use data for training includes real building water use data and simulated building water use data;
[0013] S3, using the expanded training building water use data to train a feature extraction model to obtain training building water use data after feature extraction;
[0014] S4, using the training building water use data after feature extraction to train a classifier based on a deep neural decision tree algorithm based on local structural entropy;
[0015] The classifier evaluates the classification contribution of features through local structural entropy. At each decision node, it selects the feature that can best improve the classification accuracy for splitting. It uses an adaptive learning rate adjustment mechanism based on discriminator performance feedback to dynamically adjust the learning rate. It uses a category weight adaptive update mechanism to dynamically adjust the weights of each category.
[0016] S5. Collect new real building water use data;
[0017] S6. Inputting the new real building water use data into the trained feature extraction model to perform feature extraction, thereby obtaining the new real building water use data after feature extraction;
[0018] S7, inputting the new real building water consumption data after feature extraction into the trained classifier to obtain the energy consumption level of the new real building water consumption data;
[0019] S8. Identify the energy consumption level of the new real building water use data. If the energy consumption level of the new real building water use data is level four or level five, determine that the water use situation is abnormal, start the water-saving mode and trigger an alarm to notify maintenance personnel; if the energy consumption level of the new real building water use data is level one, level two or level three, determine that the water use situation is normal and maintain the current water supply mode.
[0020] As a further improvement of the present invention: the building water use data in S1 includes sensor data, system logs, user behavior data and environmental factors.
[0021] As a further improvement of the present invention: the data expansion model based on conditional generative adversarial network trained by using the labeled building water data in S2 includes:
[0022] S201, the generator of the conditional generative adversarial network receives the noise signal and the conditional variable, generates simulated building water use data, and the mathematical model of the generation process is expressed as:
[0023] ,
[0024] In the formula, The simulated building water use data generated by the generator, is the generator network, is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding;
[0025] The generator function takes the conditional variable concatenated with a random vector of noise as its input, expressed as:
[0026] ,
[0027] In the formula, is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding, is the Sigmoid activation function, is the weight of the generator of the conditional generative adversarial network, is the vector concatenation operation, Bias for the generator of a conditional generative adversarial network;
[0028] The method of obtaining conditional variables using dynamic recoding strategy is expressed as:
[0029] ,
[0030] In the formula, is the vector of conditional variables before dynamic recoding, is a dynamic adjustment factor based on the discriminator output;
[0031] S202, the discriminator evaluates the distinction between the simulated building water use data and the real building water use data. The discriminator input is the first input or the second input. The first input is the dynamically recoded conditional variable and the simulated building water use data. The second input is the real building water use data. The output is the authenticity score of the building water use data, which is expressed as:
[0032] ,
[0033] In the formula, Score the authenticity of the building water samples for the discriminator, is the discriminator network, is the discriminator function, The simulated building water use data generated by the generator, is the conditional variable after dynamic recoding;
[0034] S203. According to the feedback from the discriminator, the parameters of the generator and the discriminator are updated through the gradient descent algorithm. The loss function in the adversarial training process between the generator and the discriminator is expressed as:
[0035] ,
[0036] In the formula, is the loss of the generator, For the expected operation, is the random noise sampled from the noise distribution, To obey a specific distribution, is the noise distribution, is the natural logarithm, is the discriminator function, is the generator function, is the conditional variable after dynamic recoding, is the adjustment parameter of the generator loss function, For content loss, is the loss of the discriminator, is a building water sample obtained from the real building water data distribution. is the real building water consumption data distribution, is the feature weight vector;
[0037] S204. During the adversarial training process, each iteration finely adjusts the performance of the generator and the discriminator in an adversarial manner. During the iteration process, the generator and the discriminator update their parameters alternately to achieve Nash equilibrium. The process is expressed as the following recursive relationship:
[0038] ,
[0039] In the formula, is the parameter of the generator for the t+1th iteration, is the parameter of the generator for the tth iteration, is the learning rate of the conditional generative adversarial network, The parameters of the generator for the conditional generative network, is the gradient with respect to the generator parameters, is the loss function of the generator, is the parameter of the discriminator at the tth iteration, is the parameter of the discriminator at the t+1th iteration, are the parameters of the discriminator of the conditional generative network, is the gradient with respect to the discriminator parameters, is the loss function of the discriminator;
[0040] S205, repeating iterations S201 to S204 until a preset stop iteration condition is met.
[0041] Preferably, the content loss in S203 The calculation formula is:
[0042] ,
[0043] In the formula, for norm, is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding, This is a real building water sample.
[0044] As a further improvement of the present invention: the feature extraction model trained by using the expanded training building water use data in S3 includes:
[0045] S301, initializing the weight and bias parameters of the neural network;
[0046] S302. In each round of training, the training data is forward propagated through the neural network. The training data includes real building water use data and simulated building water use data. The neural network calculates the output of each layer according to the current weight and bias. The output calculation of each layer is expressed as:
[0047] ,
[0048] In the formula, For the neural network The output of the layer, is the Sigmoid activation function, For the neural network The weight of the layer, For the neural network -1 layer output, For the neural network Bias of the layer;
[0049] S303, calculate the loss between the current output and the actual label, the loss function of the neural network The calculation formula is:
[0050] ,
[0051] In the formula, is a hyperparameter used to balance the contribution of the two losses, is the cross entropy loss function, y is the true label, For model prediction, is the KL divergence function, It is used to measure the difference between the true distribution P and the model predicted distribution Q;
[0052] S304, using the back propagation algorithm to calculate the gradient of the loss function for each weight of the neural network, and updating the weights according to these gradients. The updating method is expressed as:
[0053] ,
[0054] In the formula, For the neural network The weight of the layer, is the parameter update operation, is the constraint strength of the tth iteration, is the learning rate of the neural network, is the loss function of the neural network About weight The gradient of
[0055] S305. After each training phase, the performance of the model is tested using the building water use data validation set. The network parameters or training strategy are adjusted according to the validation results. The constraint strength of the tth iteration is The calculation formula is:
[0056] ,
[0057] In the formula, is the initial constraint strength, Adjust the sensitivity of the convergence measure to the effects of adjustments, is the convergence measure, To determine the threshold for adjusting the intensity, is the constraint strength decay rate, is the current iteration number;
[0058] S306, repeating iterations S302 to S304 until a preset stop iteration condition is met.
[0059] As a further improvement of the present invention: the classifier of the deep neural decision tree algorithm based on local structural entropy is trained by using the training building water data after feature extraction in S4, including:
[0060] S401, initializing the structure of the deep neural decision tree model;
[0061] S402, at each decision node, select the feature that can best improve the classification accuracy for splitting. At the i-th decision node, select the feature to split by maximizing the local structural entropy gain, expressed as:
[0062] ,
[0063] In the formula, is the information gain function, is the local structural entropy gain function of the feature of the i-th input to the deep neural decision tree, is the metric function of the feature, is the feature of the i-th input to the deep neural decision tree, is the metric balance parameter of the feature, is the entropy of the candidate feature set S, is the entropy calculation function, S is the candidate feature set, is the characteristic element in the left and right child node sets, By feature The subsets obtained after segmentation are and Through the characteristics The left and right subsets obtained after segmentation, L and R are the left and right child nodes respectively;
[0064] S403, split the node according to the selected feature and its threshold, distribute the data to the left and right child nodes, and split the data according to the selected feature and its optimal splitting point. The splitting function is expressed as:
[0065] ,
[0066] In the formula, is the decision function, is the index of the i-th feature, is the feature of the i-th input to the deep neural decision tree, is the optimal threshold for the feature of the i-th input to the deep neural decision tree;
[0067] S404, performing leaf node calibration, at the leaf nodes of the decision tree, calibrating the node category according to the majority category of the samples in the node, and using a strategy based on majority voting to determine the node category;
[0068] S405, perform model training and adaptive learning rate adjustment, update parameters through back propagation algorithm, combine adaptive learning rate strategy of neural differential equation, dynamically adjust learning rate according to loss change of each round of training, consider second-order derivative information of loss function to adjust learning rate, and calculate parameter update amount of deep neural decision tree;
[0069] S406, calculate the loss function of the deep neural decision tree. When the node is split, an adaptive category weight update mechanism is used to dynamically adjust the weight of each category according to the sample distribution of each category. For the feature vector input to the deep neural decision tree, a new category weight update function is used to calculate the category weight, which is expressed as:
[0070] ,
[0071] In the formula, is the category weight of the kth category; is the coefficient for adjusting weight changes; To pass the sample The set obtained after all feature segmentation, S is the candidate feature set, The preset proportions for class sample balance;
[0072] S407, repeating iterations S402 to S406 until a preset stop iteration condition is met.
[0073] Preferably, the structure of initializing the deep neural decision tree model in S401 includes: setting the number of layers of the deep neural decision tree to , the number of nodes per layer of the deep neural decision tree is , deep neural decision tree The layer weight is , deep neural decision tree The layer bias is , the initialization method is expressed as:
[0074] ,
[0075] In the formula, To obey a specific distribution; The mean is 0 and the variance is Normal distribution of Variance when initializing a deep neural decision tree.
[0076] Preferably, the entropy of the candidate feature set S in S402 is The calculation formula is:
[0077] ,
[0078] In the formula, is the relative frequency of the kth category in the candidate feature set S;
[0079] Entropy of the candidate feature set S The relative frequency of the kth category in the candidate feature set S in the calculation formula The calculation formula is:
[0080] ,
[0081] In the formula, is the relative frequency adjustment parameter, is the water use data sample to be classified, To pass the sample The set obtained after all feature segmentation is For sample The weight of , S is the set of candidate features.
[0082] Preferably, the calculation formula for determining the node category based on the majority voting strategy in S404 is:
[0083] ,
[0084] In the formula, To determine the node category based on the majority voting strategy, In order to make the function take the maximum value corresponding to the sample category, is the water use data sample to be classified, S is the candidate feature set, is the indicator function, is the true label of the sample input to the deep neural decision tree, is the category of the k-th water use data.
[0085] The present invention also provides a building water intelligent management and control system using the above-mentioned building water intelligent management and control method, comprising:
[0086] A storage module, used for storing data;
[0087] A collection module is used to collect real building water use data and send it to the storage module for storage. The building water use data includes sensor data, system logs, user behavior data and environmental factors;
[0088] A data expansion module, used to generate simulated building water use data based on real building water use data, and the data expansion model of the data expansion module is based on a conditional generative adversarial network algorithm using a dynamic recoding strategy;
[0089] Feature extraction module, used to extract features from building water use data;
[0090] The classification module is used to label the energy consumption level of building water data. The energy consumption levels include level 1, level 2, level 3, level 4 and level 5. The classifier of the classification module is based on the deep neural decision tree algorithm of local structural entropy. The classifier uses an adaptive learning rate adjustment mechanism based on discriminator performance feedback to dynamically adjust the learning rate, and adopts a category weight adaptive update mechanism to dynamically adjust the weight of each category.
[0091] An execution module is used to identify the energy consumption level of building water data and adjust the water supply mode.
[0092] The beneficial effects of the present invention are as follows: The data analysis accuracy of the intelligent building water management method and system provided by the present invention is high.
[0093] First, the feature extraction model of the present invention adopts a dynamic recoding strategy. Different from the fixed conditional variables of the traditional conditional generative adversarial network, the present invention dynamically adjusts the encoding of the conditional variables according to the feedback of the current training stage and the discriminator, thereby generating more realistic and diversified simulated building water use data. The simulated building water use data and the real building water use data are used together as training data to train the feature extraction model and classifier. The capabilities of the feature extraction model and classifier are improved through a large amount of training, so that the feature extraction model and classifier can process new real building water use data more accurately in the future, thereby improving the accuracy of data analysis.
[0094] Secondly, the classifier of the present invention is based on the deep neural decision tree algorithm of local structural entropy, which evaluates the classification contribution of features through local structural entropy, selects the features with the largest information gain for node splitting, and compared with the traditional decision tree splitting method based on global entropy or Gini index, the local structural entropy can more accurately reflect the discrimination of features on the current node data set, thereby improving the accuracy of classification decision. At the same time, the classifier of the present invention adopts an adaptive learning rate adjustment mechanism based on discriminator performance feedback during the model training process, and dynamically adjusts the learning rate to meet the needs of different training stages. Unlike the fixed learning rate, the adaptive learning rate can effectively avoid the problem of slow learning in the early stage of training or overfitting in the later stage. In addition, the classifier of the present invention also adopts a class weight adaptive update mechanism to dynamically adjust the weights of various categories, solves the problem of class imbalance, and by calculating the weighted loss in each leaf node, the classifier can better classify a few categories, thereby improving the robustness of the overall classifier. Finally, the overall improvement of the classifier's ability to determine the energy consumption level of new real building water data is improved, thereby improving the accuracy of data analysis.
[0095] Therefore, the data analysis accuracy of the building water intelligent management and control method and system provided by the present invention is relatively high. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION
[0097] The specific implementation modes of the present invention are further described in detail below in conjunction with the accompanying drawings.
[0098] like Figure 1 As shown, the present invention provides a method for intelligent management and control of building water, including:
[0099] S1. Data collection and preprocessing
[0100] S101. Collect real-time building water use data through water quality monitoring sensors, flow meters, temperature control valves and other equipment, and supplement the operation logs and user control behavior records in the central control system. Building water use data includes sensor data, system logs, user behavior data and environmental factors;
[0101] For example, in a specific application case, the attributes of building water use data include:
[0102] Qa is the flow rate, which indicates the volume of water flowing per unit time;
[0103] Pa is the pressure, the pressure value of water flowing in the pipe;
[0104] Ta is the temperature, the temperature of the water point;
[0105] Ca is water quality, the chemical composition and purity of water;
[0106] Va is velocity, the speed of water flow in the pipe;
[0107] Ea is the ambient temperature, the temperature of the surrounding environment;
[0108] Wa is the weather condition, corresponding to the weather conditions when the building water use data was collected;
[0109] Sa is seasonal variation, marking the season when the building water use data was collected;
[0110] Ua is user behavior, which refers to the user’s water use habits such as water use time and water volume;
[0111] Ra is the maintenance and alarm record, which records the maintenance and abnormal conditions of the system.
[0112] In practical applications, the attributes of building water use data are usually more than ten, and the number of attributes of building water use data may reach dozens or even hundreds.
[0113] S102. Manually label the energy consumption levels of real building water use data. The energy consumption levels include level 1, level 2, level 3, level 4 and level 5. From level 1 to level 5, the energy consumption increases continuously. Level 5 has the highest energy consumption and level 1 has the lowest energy consumption.
[0114] S103, storing the annotated real building water use data in a structured format;
[0115] S2. Use the annotated real building water use data to train a data augmentation model based on a conditional generative adversarial network algorithm using a dynamic recoding strategy. After the training is completed, use the data augmentation model to generate simulated building water use data to obtain augmented training building water use data.
[0116] The dynamic recoding strategy automatically adjusts the encoding of conditional variables according to the current training stage and the feedback of the discriminator. The conditional generative adversarial network algorithm using the dynamic recoding strategy can improve the diversity and adaptability of simulated building water use data.
[0117] The expanded building water use data for training includes real building water use data and simulated building water use data;
[0118] The data expansion model based on conditional generative adversarial network trained with labeled building water data includes:
[0119] S201, the generator of the conditional generative adversarial network receives the noise signal and the conditional variables, and generates simulated building water use data based on these inputs. The conditional variables can be transformation vectors of conditions such as user behavior categories and environmental states. The mathematical model of the generation process is expressed as:
[0120] ,
[0121] In the formula, Simulated building water use data generated for the generator; The generator network is responsible for generating simulated building water use data based on the input noise and conditional variables; is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding;
[0122] The generator function takes the conditional variable concatenated with a random vector of noise as its input, expressed as:
[0123] ,
[0124] In the formula, is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding, is the Sigmoid activation function, is the weight of the generator of the conditional generative adversarial network, is the vector concatenation operation, Bias for the generator of a conditional generative adversarial network; and All are learned during the training process.
[0125] The traditional conditional generative adversarial network uses static conditional variables to guide the generation process. These conditional variables remain unchanged during the training process. The present invention adopts a dynamic recoding strategy to automatically adjust the encoding of the conditional variables according to the current training stage and the feedback of the discriminator, thereby improving the diversity and adaptability of generating building water samples. The method of obtaining conditional variables using the dynamic recoding strategy is expressed as:
[0126] ,
[0127] In the formula, is the vector of conditional variables before dynamic recoding, is a dynamic adjustment factor based on the discriminator output;
[0128] Dynamic adjustment factor based on discriminator output The calculation method is expressed as:
[0129] ,
[0130] In the formula, is the hyperbolic tangent function, is a hyperparameter used to adjust the sensitivity of the adjustment factor, is the classification accuracy of the discriminator.
[0131] S202, the discriminator evaluates the degree of distinction between the simulated building water use data and the real building water use data, the discriminator input is the first input or the second input, the first input is the dynamically recoded conditional variable and the simulated building water use data, the second input is the real building water use data (the discriminator does not need the conditional variable when discriminating the real building water use data), and the output is the authenticity score of the building water use data, which is expressed as:
[0132] ,
[0133] In the formula, Score the authenticity of building water samples for the discriminator; The discriminator network aims to correctly identify the authenticity of the input building water samples; is the discriminator function, The simulated building water use data generated by the generator, is the conditional variable after dynamic recoding;
[0134] S203. According to the feedback from the discriminator, the parameters of the generator and the discriminator are updated through the gradient descent algorithm. The goal of the generator is to improve the fidelity of the generated building water samples so that the discriminator cannot distinguish between the real and the fake. The discriminator strives to improve its discrimination accuracy. The loss function in the adversarial training process between the generator and the discriminator is expressed as:
[0135] ,
[0136] In the formula, is the loss of the generator, For the expected operation, is the random noise sampled from the noise distribution, To obey a specific distribution, is the noise distribution, is the natural logarithm, is the discriminator function, is the generator function, is the conditional variable after dynamic recoding; It is the adjustment parameter of the generator loss function, which is used to balance the impact of adversarial loss and content loss; For content loss, is the loss of the discriminator, is a building water sample obtained from the real building water data distribution. is the real building water consumption data distribution, is the feature weight vector;
[0137] Content loss is used to ensure that the generated building water samples are consistent with the real building water samples in terms of functional characteristics. norm, thereby measuring their similarity, content loss The calculation formula is:
[0138] ,
[0139] In the formula, for norm, is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding, It is a real building water sample;
[0140] The feature weight vector is a feature selection method based on the feedback mechanism. It dynamically adjusts the participation of each feature in the generation process according to the performance feedback of the discriminator, thereby optimizing the relevance and quality of the generated building water samples. The feature weight vector The calculation formula is:
[0141] ,
[0142] In the formula, is the Softmax function, is a hyperparameter used to adjust the sensitivity of weight adjustment, is the classification accuracy of the discriminator.
[0143] S204. During the adversarial training process, each iteration fine-tunes the performance of the generator and the discriminator in an adversarial manner until the model reaches a stable state, that is, the quality of the building water data generated by the generator is close enough to the real building water data. During the iteration process, the generator and the discriminator update parameters alternately to achieve Nash equilibrium. The process is expressed as the following recursive relationship:
[0144] ,
[0145] In the formula, is the parameter of the generator for the t+1th iteration, is the parameter of the generator for the tth iteration, is the learning rate of the conditional generative adversarial network, The parameters of the generator for the conditional generative network, is the gradient with respect to the generator parameters, is the loss function of the generator, is the parameter of the discriminator at the tth iteration, is the parameter of the discriminator at the t+1th iteration, are the parameters of the discriminator of the conditional generative network, is the gradient with respect to the discriminator parameters, is the loss function of the discriminator;
[0146] The learning rate of the conditional generative adversarial network is dynamically adjusted based on the discriminator performance. The learning rate of the traditional Tiojian generative adversarial network is fixed, which may lead to insufficient learning of the generator in the early stage of training or over-optimization of the generator in the later stage of training. When dynamically adjusting based on the discriminator performance, the classification accuracy of the discriminator is first defined as , which is used to indicate the current performance level of the discriminator, expressed as:
[0147] ,
[0148] In the formula, is the number of building water samples correctly classified by the discriminator, is the total number of building water samples;
[0149] The way to dynamically adjust the learning rate of the conditional generative adversarial network based on the discriminator performance is expressed as:
[0150] ,
[0151] In the formula, The learning rate of the conditional generative adversarial network for the tth iteration; is the learning rate of the conditional generative adversarial network, Is a parameter that controls the speed at which the learning rate decays; represents the deviation of the discriminator performance from the ideal performance of 0.5 (i.e. completely random guessing). When the discriminator behaves like a random guesser , the learning rate of the generator remains high, promoting the generator to learn faster; when the discriminator accuracy deviates from 0.5, the learning rate of the generator gradually decreases, slowing down the learning to avoid over-optimization.
[0152] S205, repeat iterations S201-S204 until the preset stop iteration condition is met. The preset stop iteration condition is to reach the preset maximum number of iterations, and the preset maximum number of iterations is set to 1000. After the conditional generative adversarial network training is completed, the number of samples is increased using the trained conditional generative adversarial network model. Assuming that the original collected samples are 800, the conditional generative adversarial network is used to perform data expansion model expansion to generate 200 samples, and the expanded data set contains 1000 samples.
[0153] S3. Using the expanded training building water use data to train a feature extraction model based on a 6-layer fully connected neural network algorithm to obtain the training building water use data after feature extraction; using the expanded training building water use data to train a feature extraction model based on a 6-layer fully connected neural network algorithm includes:
[0154] S301, initializing the weight and bias parameters of the neural network;
[0155] Neural network weights The initialization method is expressed as:
[0156] ,
[0157] In the formula, To generate the shape Normally distributed random numbers, is the number of neurons in the input layer, is the number of neurons in the output layer.
[0158] S302. In each round of training, the training data is forward propagated through the neural network. The neural network calculates the output of each layer according to the current weights and biases. The output calculation of each layer is expressed as:
[0159] ,
[0160] In the formula, is the output of the lth layer of the neural network, is the Sigmoid activation function, is the weight of the lth layer of the neural network, is the output of the l-1th layer of the neural network, is the bias of the lth layer of the neural network;
[0161] The input of the neural network ensures that it can nonlinearly combine the input building water use data features and extract more complex building water use data patterns.
[0162] S303, calculate the loss between the current output and the actual label. The loss function of the neural network not only includes the cross entropy loss, but also combines the additional loss based on divergence to improve the model's ability to handle complex building water data. The loss function of the neural network The calculation formula is:
[0163] ,
[0164] In the formula, is a hyperparameter used to balance the contribution of the two losses, is the cross entropy loss function, y is the true label, For model prediction, is the KL divergence function, It is used to measure the difference between the true distribution P and the model predicted distribution Q;
[0165] It is used to measure the difference between the true distribution P and the model predicted distribution Q The calculation method is expressed as:
[0166] ,
[0167] In the formula, C is the total number of categories; is the importance weight of the building water use data feature of the i-th category, which is obtained through network learning to emphasize the importance of certain categories in training; and are the probabilities of the true distribution and the predicted distribution on the i-th category respectively.
[0168] S304, using the back propagation algorithm to calculate the gradient of the loss function for each weight of the neural network, and updating the weights according to these gradients. The updating method is expressed as:
[0169] ,
[0170] In the formula, is the weight of the lth layer of the neural network, is the parameter update operation, is the constraint strength of the tth iteration; is the learning rate of the neural network, Set to 0.01; is the loss function of the neural network About weight The gradient of
[0171] S305. After each training phase, the performance of the model is tested using the building water use data validation set. The network parameters or training strategy are adjusted according to the validation results. The constraint strength of the tth iteration is The calculation formula is:
[0172] ,
[0173] In the formula, is the initial constraint strength, Adjust the sensitivity of the convergence measure to the effects of adjustments, is the convergence measure, To determine the threshold for the intensity of the adjustment; is the constraint strength decay rate, Set to 3; is the current iteration number;
[0174] This dynamic constraint allows the model to quickly adapt to building water use data early in training, and gradually strengthens the regularization control of weights as training progresses to avoid overfitting.
[0175] The convergence metric of a neural network evaluates the convergence state of the model by comparing the rate of change of the loss with the rate of change of the weight. The calculation formula is:
[0176] ,
[0177] In the formula, is the loss change of the neural network for two consecutive iterations, is the change of neural network weights, is the number of features of the building water use data input to the neural network, is the hyperbolic tangent function, Score the importance of the i-th feature of building water use data;
[0178] The importance score of building water data features is based on the influence of the gradient of the discriminator output on the building water data feature extraction layer. The importance score of the i-th feature of building water data is The calculation formula is:
[0179] ,
[0180] In the formula, is the symbol of partial derivative, is the loss function of the neural network, is the i-th building water use data feature input into the neural network, Define the calculation function of anomaly score for statistical-based methods;
[0181] The feature anomaly detection mechanism is used to identify potential anomalies in the input building water use data. Then, the parameters of the building water use data feature extraction layer are adjusted according to the detection results to optimize the model's response to abnormal building water use data. The implementation method of defining the calculation function of the anomaly score based on the statistical method is expressed as follows:
[0182] ,
[0183] In the formula, is the i-th building water use data feature input into the neural network, Define the calculation function of anomaly score for statistical-based methods, and are the mean and variance of the building water use data characteristics, respectively.
[0184] S306 , repeating iterations S302 - S304 until a preset stop iteration condition is met, the preset stop iteration condition being that a preset maximum number of iterations is reached, and the preset maximum number of iterations is set to 1000 times.
[0185] S4, using the training building water use data after feature extraction to train a classifier based on a deep neural decision tree algorithm based on local structural entropy;
[0186] The local structural entropy selects the features that can best improve the classification accuracy for splitting by evaluating the information distribution of each feature on the data set of the current node. The role of the local structural entropy is to enhance the measure of information gain, thereby optimizing the splitting strategy of the decision tree. The deep neural decision tree algorithm is a decision tree structure in which each decision node not only relies on the value of the feature to make a decision, but also conducts deep learning of the feature through a deep neural network. The deep neural decision tree uses the idea of deep learning to construct the neural decision tree into a multi-layer form, in which the output of the neural decision tree of the previous layer is used as the input of the neural decision tree of the next layer until the last layer. The number of layers of the deep neural decision tree used in the present invention is 6 layers.
[0187] The classifier uses an adaptive learning rate adjustment mechanism based on discriminator performance feedback to dynamically adjust the learning rate (see S405 for details). The adaptive learning rate adjustment mechanism based on discriminator performance feedback dynamically adjusts the learning rate by real-time monitoring of the discriminator's training effect. When the discriminator's performance decreases, the mechanism automatically increases the learning rate to accelerate the convergence of the model; otherwise, the learning rate automatically decreases to avoid overfitting or unstable training, thereby achieving more stable model training. The class weight adaptive update mechanism is used to dynamically adjust the weights of each category (see S406 for details). The class weight adaptive update mechanism is to dynamically adjust the weight update strategy according to the change of the model's loss function during the training process of the deep neural decision tree, and automatically adjust the learning rate through the back propagation algorithm combined with the second-order derivative information of the loss function, thereby optimizing the update of weights and biases, ensuring that the model can converge quickly and stably, while solving the problems of overfitting or slow learning that may occur during the training process.
[0188] The classifiers of the deep neural decision tree algorithm based on local structural entropy are trained using the building water use data after feature extraction, including:
[0189] S401, initialize the structure of the deep neural decision tree model, and set the number of layers of the deep neural decision tree to , the number of nodes per layer of the deep neural decision tree is , the weight of the lth layer of the deep neural decision tree is , the bias of the lth layer of the deep neural decision tree is , the initialization method is expressed as:
[0190] ,
[0191] In the formula, To obey a specific distribution; The mean is 0 and the variance is Normal distribution of is the variance of the deep neural decision tree initialization, Set to 0.01;
[0192] S402, at each decision node, select the feature that can best improve the classification accuracy for splitting. The present invention adopts the local structural entropy method to evaluate the information gain of each feature on the current node data set, and selects the feature with the largest information gain for splitting. At the i-th decision node, the feature is selected to split by maximizing the local structural entropy gain, which is expressed as:
[0193] ,
[0194] In the formula, is the information gain function, is the local structural entropy gain function of the feature of the i-th input to the deep neural decision tree, is the metric function of the feature, is the feature of the i-th input to the deep neural decision tree, is the metric balance parameter of the feature, is the entropy of the candidate feature set S, is the entropy calculation function, S is the candidate feature set, is the characteristic element in the left and right child node sets, By feature The subsets obtained after segmentation are and Through the characteristics The left and right subsets obtained after segmentation, L and R are the left and right child nodes respectively. is the relative frequency of the kth category in the candidate feature set S;
[0195] Entropy of the candidate feature set S The relative frequency of the kth category in the candidate feature set S in the calculation formula The calculation formula is:
[0196] ,
[0197] In the formula, It is the relative frequency adjustment parameter to control the influence of weight; is the water use data sample to be classified, To pass the sample The set obtained after segmentation of all features; For sample The weight of is the training parameter, determined through training; S is the candidate feature set;
[0198] The feature measurement function takes into account the intra-class similarity and inter-class difference of samples, and the calculation formula is:
[0199] ,
[0200] In the formula, is the metric function of the feature, is the feature of the i-th input to the deep neural decision tree, are two non-overlapping feature indexes, S is the candidate feature set, is the jth feature of the water use data sample to be classified, is the first sample of water use data to be classified Features.
[0201] S403, split the node according to the selected feature and its threshold, and distribute the data to the left and right child nodes. The splitting process is based on the comparison result of the feature value and its threshold, and is an iterative process until the termination condition is met. The termination condition can be that the amount of data under the node is less than the preset threshold or the maximum depth of the tree is reached. According to the selected feature and its optimal splitting point, the data is split. The splitting function is expressed as:
[0202] ,
[0203] In the formula, is a decision function, indicating whether the data point should be assigned to the left child node; is the index of the i-th feature, is the feature of the i-th input to the deep neural decision tree, is the optimal threshold for the feature of the i-th input to the deep neural decision tree;
[0204] S404, perform leaf node calibration. At the leaf nodes of the decision tree, the node categories are calibrated according to the majority categories of the samples in the nodes. The node categories are determined using a strategy based on majority voting, which is expressed as:
[0205] ,
[0206] In the formula, To determine the node category based on the majority voting strategy, In order to make the function take the maximum value corresponding to the sample category, is the water use data sample to be classified, S is the candidate feature set, is the indicator function, is the true label of the sample input to the deep neural decision tree, is the category of the k-th water use data;
[0207] S405, perform model training and adaptive learning rate adjustment, update parameters through the back propagation algorithm, combine the adaptive learning rate strategy of the neural differential equation, dynamically adjust the learning rate according to the loss change of each round of training, ensure that the model converges quickly and stably during the training process, consider the second-order derivative information of the loss function to adjust the learning rate, calculate the parameter update amount of the deep neural decision tree, and the calculation formula of the parameter update amount of the deep neural decision tree is:
[0208] ,
[0209] In the formula, is the rate of change of the learning rate, is the learning rate adjustment coefficient; is the loss function of the deep neural decision tree, specifically the cross entropy loss function; is the learning rate of the deep neural decision tree, is the second-order learning rate of the parameters of the deep neural decision tree, is the weight parameter increment of the deep neural decision tree, is the weight of the deep neural decision tree, is the bias parameter increment of the deep neural decision tree, is the bias of the deep neural decision tree, is the gradient of the loss function of the deep neural decision tree with respect to the weight, is the gradient of the loss function of the deep neural decision tree with respect to the bias;
[0210] S406, calculate the loss function of the deep neural decision tree. When the node is split, an adaptive category weight update mechanism is used to dynamically adjust the weight according to the sample distribution of each category to solve the problem that the split decision is biased towards the majority category due to category imbalance. For the feature vector input to the deep neural decision tree, a new category weight update function is used to calculate the category weight, which is expressed as:
[0211] ,
[0212] In the formula, is the category weight of the kth category; To adjust the coefficient of weight change, Set to 0.1; To pass the sample The set obtained after all feature segmentation, S is the candidate feature set, is the preset proportion of class sample balance, Set to 0.5;
[0213] After calculating the category weights, the structural gain is calculated based on the category weights. The calculation formula is:
[0214] ,
[0215] In the formula, is the structural gain calculation function, is the feature of the i-th input to the deep neural decision tree, is the category weight of the k-th category, is the metric function of the feature, is the feature of the i-th input to the deep neural decision tree; is the structural gain adjustment factor, Set to 0.3; is the entropy calculation function, and Through the characteristics The left and right subsets obtained after segmentation;
[0216] A dynamic loss adjustment strategy is adopted to calculate the weighted loss of the category in each leaf node. The sensitivity of the model to minority categories is improved by dynamically adjusting the misclassification loss of each category. The loss function of the deep neural decision tree The calculation formula is:
[0217] ,
[0218] In the formula, is the category weight of the k-th category, is the number of samples in the kth category, is the probability that the true label of the sample input to the deep neural decision tree is the same as the category of the k-th water use data, is the true label of the sample input to the deep neural decision tree, is the category of the k-th water use data, is the structural gain calculation function, is the feature of the i-th input to the deep neural decision tree.
[0219] S407 , repeating iterations S402 to S406 until a preset stop iteration condition is met. The stop iteration condition may be that the amount of data under the node is less than a preset threshold or reaches the maximum depth of the tree.
[0220] S5. Collect new real building water use data through sensor equipment (such as water quality monitoring sensors, flow meters, temperature control valves, etc.);
[0221] S6. Inputting the new real building water use data into the trained feature extraction model to perform feature extraction, thereby obtaining the new real building water use data after feature extraction;
[0222] The feature extraction model is a trained fully connected neural network that is responsible for extracting representative features from complex input data. The result of feature extraction is a high-dimensional feature vector.
[0223] S7, inputting the new real building water consumption data after feature extraction into the trained classifier to obtain the energy consumption level of the new real building water consumption data;
[0224] Through previous training, the deep neural decision tree classifier has the ability to classify the building water energy consumption level based on different features. The classifier evaluates the energy consumption level of new real building water data by evaluating the eigenvalues of the input high-dimensional feature vector and combining the information gain method of local structural entropy, and classifies the current data into one of five different energy consumption levels.
[0225] S8. Identify the energy consumption level of the new real building water use data. If the energy consumption level of the new real building water use data is level four or level five, determine that the water use situation is abnormal, start the water-saving mode and trigger an alarm to notify maintenance personnel; if the energy consumption level of the new real building water use data is level one, level two or level three, determine that the water use situation is normal and maintain the current water supply mode.
[0226] Abnormal water use means that the system believes that the current water use may involve energy waste or unreasonable water use;
[0227] In water-saving mode, the execution module will automatically adjust the working parameters of water-using equipment according to the established water-saving strategy. For example, the system may automatically reduce the water flow (by adjusting the flow meter), lower the temperature (by adjusting the temperature control valve), or reduce the water supply time to reduce unnecessary waste of water resources.
[0228] The alarm is triggered to notify maintenance personnel, who will check whether the equipment operating status or user behavior patterns are abnormal.
[0229] The water use situation is normal, which means that the current water use mode is reasonable, and the system can continue to maintain the current water supply status without making additional adjustments. In particular, when the energy consumption level is level 1 or level 2, the current water use mode is not only reasonable but also energy-saving. The system can record the characteristic data of such low-energy consumption modes, and use these modes as water-saving references in the future to optimize the system's water-saving control strategy.
[0230] The present invention provides an intelligent building water management and control system comprising:
[0231] A storage module, used for storing data;
[0232] A collection module is used to collect real building water use data and send it to the storage module for storage. The building water use data includes sensor data, system logs, user behavior data and environmental factors;
[0233] A data expansion module, used to generate simulated building water use data based on real building water use data, and the data expansion model of the data expansion module is based on a conditional generative adversarial network algorithm using a dynamic recoding strategy;
[0234] The feature extraction module is used to extract features from building water use data. The feature extraction model of the feature extraction module is based on a 6-layer fully connected neural network algorithm;
[0235] The classification module is used to label the energy consumption level of building water data. The energy consumption levels include level 1, level 2, level 3, level 4 and level 5. The classifier of the classification module is based on the deep neural decision tree algorithm of local structural entropy. The classifier uses an adaptive learning rate adjustment mechanism based on discriminator performance feedback to dynamically adjust the learning rate, and adopts a category weight adaptive update mechanism to dynamically adjust the weight of each category.
[0236] The execution module is used to identify the energy consumption level of building water data and adjust the water supply mode, and can control various water equipment.
Claims
1. A method for intelligent management and control of building water, characterized in that: include: S1. Collecting real building water use data, marking the energy consumption level of the real building water use data, and storing the marked real building water use data; The energy consumption levels include level 1, level 2, level 3, level 4 and level 5; S2, using the annotated real building water use data to train a data expansion model based on a conditional generative adversarial network algorithm using a dynamic recoding strategy, and after the training is completed, using the data expansion model to generate simulated building water use data to obtain expanded training building water use data; The expanded training building water use data includes the real building water use data and the simulated building water use data; S3, using the expanded training building water use data to train a feature extraction model to obtain training building water use data after feature extraction; The adopting the expanded training building water use data to train the feature extraction model comprises: S301, initializing the weight and bias parameters of the neural network; S302. In each round of training, the training data is forward propagated through the neural network. The training data includes real building water use data and simulated building water use data. The neural network calculates the output of each layer according to the current weight and bias. The output calculation of each layer is expressed as: , In the formula, For the neural network The output of the layer, is the Sigmoid activation function, For the neural network The weight of the layer, For the neural network -1 layer output, For the neural network Bias of the layer; S303, calculate the loss between the current output and the actual label, the loss function of the neural network The calculation formula is: , In the formula, is a hyperparameter used to balance the contribution of the two losses, is the cross entropy loss function, y is the true label, For model prediction, is the KL divergence function, It is used to measure the difference between the true distribution P and the model predicted distribution Q; S304, using the back propagation algorithm to calculate the gradient of the loss function for each weight of the neural network, and updating the weights according to these gradients. The updating method is expressed as: , In the formula, For the neural network The weight of the layer, is the parameter update operation, is the constraint strength of the tth iteration, is the learning rate of the neural network, is the loss function of the neural network About weight The gradient of S305. After each training phase, the performance of the model is tested using the building water use data validation set. The network parameters or training strategy are adjusted according to the validation results. The constraint strength of the tth iteration is The calculation formula is: , In the formula, is the initial constraint strength, Adjust the sensitivity of the convergence measure to the effects of adjustments, is the convergence measure, To determine the threshold for adjusting the intensity, is the constraint strength decay rate, is the current iteration number; S306, repeating iterations S302 to S304 until a preset stop iteration condition is met; S4, using the training building water data after the feature extraction to train a classifier based on a deep neural decision tree algorithm based on local structural entropy; the classifier evaluates the classification contribution of the feature through the local structural entropy, and at each decision node, selects the feature that can best improve the classification accuracy for splitting; uses an adaptive learning rate adjustment mechanism based on discriminator performance feedback to dynamically adjust the learning rate; uses a category weight adaptive update mechanism to dynamically adjust the weight of each category; S5. Collect new real building water use data; S6, inputting the new real building water use data into the trained feature extraction model to perform feature extraction, and obtaining new real building water use data after feature extraction; S7, inputting the new real building water use data after the feature extraction into the trained classifier to obtain the energy consumption level of the new real building water use data; S8. Identify the energy consumption level of the new real building water use data. If the energy consumption level of the new real building water use data is level four or level five, determine that the water use situation is abnormal, start the water-saving mode and trigger an alarm to notify maintenance personnel; if the energy consumption level of the new real building water use data is level one, level two or level three, determine that the water use situation is normal and maintain the current water supply mode.
2. The intelligent management and control method for building water use according to claim 1, characterized in that: The building water use data in S1 includes sensor data, system logs, user behavior data and environmental factors.
3. The intelligent management and control method for building water use according to claim 1 is characterized in that: The step of using the labeled building water use data to train a data expansion model based on a conditional generative adversarial network in S2 includes: S201, the generator of the conditional generative adversarial network receives the noise signal and the conditional variable, generates simulated building water use data, and the mathematical model of the generation process is expressed as: , In the formula, The simulated building water use data generated by the generator, is the generator network, is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding; The generator function takes the conditional variable concatenated with a random vector of noise as its input, expressed as: , In the formula, is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding, is the Sigmoid activation function, is the weight of the generator of the conditional generative adversarial network, is the vector concatenation operation, Bias for the generator of a conditional generative adversarial network; The method of obtaining conditional variables using dynamic recoding strategy is expressed as: , In the formula, is the vector of conditional variables before dynamic recoding, is a dynamic adjustment factor based on the discriminator output; S202, the discriminator evaluates the discrimination between the simulated building water use data and the real building water use data, the discriminator input is the first input or the second input, the first input is the dynamically recoded conditional variable and the simulated building water use data, the second input is the real building water use data, and the output is the authenticity score of the building water use data, which is expressed as: , In the formula, Score the authenticity of the building water samples for the discriminator, is the discriminator network, is the discriminator function, The simulated building water use data generated by the generator, is the conditional variable after dynamic recoding; S203. According to the feedback from the discriminator, the parameters of the generator and the discriminator are updated through the gradient descent algorithm. The loss function in the adversarial training process between the generator and the discriminator is expressed as: , In the formula, is the loss of the generator, For the expected operation, is the random noise sampled from the noise distribution, To obey a specific distribution, is the noise distribution, is the natural logarithm, is the discriminator function, is the generator function, is the conditional variable after dynamic recoding, is the adjustment parameter of the generator loss function, For content loss, is the loss of the discriminator, is a building water sample obtained from the real building water data distribution. is the real building water consumption data distribution, is the feature weight vector; S204. In the adversarial training process, each iteration finely adjusts the performance of the generator and the discriminator in an adversarial manner. In the iterative process, the generator and the discriminator update parameters alternately to achieve Nash equilibrium. The process is expressed as the following recursive relationship: , In the formula, is the parameter of the generator for the t+1th iteration, is the parameter of the generator for the tth iteration, is the learning rate of the conditional generative adversarial network, The parameters of the generator for the conditional generative network, is the gradient with respect to the generator parameters, is the loss function of the generator, is the parameter of the discriminator at the tth iteration, is the parameter of the discriminator at the t+1th iteration, are the parameters of the discriminator of the conditional generative network, is the gradient with respect to the discriminator parameters, is the loss function of the discriminator; S205, repeating iterations S201 to S204 until a preset stop iteration condition is met.
4. The intelligent management and control method for building water use according to claim 3 is characterized in that: The content loss in S203 The calculation formula is: , In the formula, for norm, is the generator function, is a random vector sampled from a predefined noise distribution, is the conditional variable after dynamic recoding, This is a real building water sample.
5. The intelligent management and control method for building water use according to claim 1, characterized in that: The method of using the training building water use data after feature extraction to train a classifier based on a deep neural decision tree algorithm based on local structural entropy in S4 includes: S401, initializing the structure of the deep neural decision tree model; S402, at each decision node, select the feature that can best improve the classification accuracy for splitting. At the i-th decision node, select the feature to split by maximizing the local structural entropy gain, expressed as: , In the formula, is the information gain function, is the local structural entropy gain function of the feature of the i-th input to the deep neural decision tree, is the feature measurement function, is the feature of the i-th input to the deep neural decision tree, is the metric balance parameter of the feature, is the entropy of the candidate feature set S, is the entropy calculation function, S is the candidate feature set, is the characteristic element in the left and right child node sets, By feature The subsets obtained after segmentation are and Through the characteristics The left and right subsets obtained after segmentation, L and R are the left and right child nodes respectively; S403, split the node according to the selected feature and its threshold, distribute the data to the left and right child nodes, and split the data according to the selected feature and its optimal splitting point. The splitting function is expressed as: , In the formula, is the decision function, is the index of the i-th feature, is the feature of the i-th input to the deep neural decision tree, is the optimal threshold for the feature of the i-th input to the deep neural decision tree; S404, performing leaf node calibration, at the leaf nodes of the decision tree, calibrating the node category according to the majority category of the samples in the node, and using a strategy based on majority voting to determine the node category; S405, perform model training and adaptive learning rate adjustment, update parameters through back propagation algorithm, combine adaptive learning rate strategy of neural differential equation, dynamically adjust learning rate according to loss change of each round of training, consider second-order derivative information of loss function to adjust learning rate, and calculate parameter update amount of deep neural decision tree; S406, calculate the loss function of the deep neural decision tree. When the node is split, an adaptive category weight update mechanism is used to dynamically adjust the weight of each category according to the sample distribution of each category. For the feature vector input to the deep neural decision tree, a new category weight update function is used to calculate the category weight, which is expressed as: , In the formula, is the category weight of the kth category; is the coefficient for adjusting weight changes; To pass the sample The set obtained after all feature segmentation, S is the candidate feature set, The preset proportions for class sample balance; S407, repeating iterations S402 to S406 until a preset stop iteration condition is met.
6. The intelligent management and control method for building water use according to claim 5, characterized in that: The structure of the initialization deep neural decision tree model in S401 includes: Set the number of layers of the deep neural decision tree to , the number of nodes per layer of the deep neural decision tree is , deep neural decision tree The layer weight is , deep neural decision tree The layer bias is , the initialization method is expressed as: , In the formula, To obey a specific distribution; The mean is 0 and the variance is Normal distribution of Variance when initializing a deep neural decision tree.
7. The intelligent management and control method for building water use according to claim 5, characterized in that: The entropy of the set S in S402 The calculation formula is: , In the formula, is the relative frequency of the kth category in the candidate feature set S; The entropy of the candidate feature set S The relative frequency of the kth category in the candidate feature set S in the calculation formula The calculation formula is: , In the formula, is the relative frequency adjustment parameter, is the water use data sample to be classified, To pass the sample The set obtained after all feature segmentation is For sample The weight of , S is the set of candidate features.
8. The intelligent management and control method for building water use according to claim 5, characterized in that: The node category is determined based on the majority voting strategy described in S404. The calculation formula is: , In the formula, To determine the node category based on the majority voting strategy, In order to make the function take the maximum value corresponding to the sample category, is the water use data sample to be classified, S is the candidate feature set, is the indicator function, is the true label of the sample input to the deep neural decision tree, is the category of the k-th water use data.
9. An intelligent building water management and control system, characterized in that: A method for intelligent building water management and control according to any one of claims 1 to 8 is applied, comprising: A storage module, used for storing data; A collection module, used to collect real building water use data and send it to the storage module for storage, wherein the building water use data includes sensor data, system logs, user behavior data and environmental factors; A data expansion module, used to generate simulated building water use data based on the real building water use data, wherein the data expansion model of the data expansion module is based on a conditional generative adversarial network algorithm using a dynamic recoding strategy; A feature extraction module, used for extracting features from the building water use data; A classification module is used to mark the energy consumption level of the building water use data, and the energy consumption level includes level 1, level 2, level 3, level 4 and level 5; the classifier of the classification module is based on a deep neural decision tree algorithm of local structural entropy, and the classifier adopts an adaptive learning rate adjustment mechanism based on discriminator performance feedback to dynamically adjust the learning rate, and adopts a category weight adaptive update mechanism to dynamically adjust the weight of each category; The execution module is used to identify the energy consumption level of the building water use data and adjust the water supply mode.
Citation Information
Patent Citations
Energy consumption prediction method based on elastodynamic neural network
CN117010576A
Railway catastrophe trend prediction method based on machine learning
CN118504791A