Classification network model training method, computing device, storage medium and computer program product

By dynamically adjusting the regularization parameters and super gradient strategy to optimize the training process of the classification network model, and combining the whale optimization algorithm to train the feature extractor, the accuracy and training efficiency problems of energy consumption data prediction are solved, and efficient energy consumption management is achieved.

CN120705642APending Publication Date: 2025-09-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410358846.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-26
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing technology, the classification network model has insufficient accuracy in predicting energy consumption data, and the training process consumes a lot of resources and has low training efficiency, which is particularly evident under large-scale data.

Method used

By dynamically adjusting the regularization parameters and introducing the super gradient strategy, the feature extraction and dimensionality reduction processes are optimized, and the feature extractor is trained in combination with the whale optimization algorithm to improve the training efficiency and accuracy of the classifier.

Benefits of technology

The accuracy of energy consumption prediction is improved, training time and computing resource consumption are reduced, and efficient energy use is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705642A_ABST
    Figure CN120705642A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a training method of a classification network model for performing category prediction on energy consumption data, the classification network model comprises a feature extractor, a feature dimension reducer and a classifier, and the classifier comprises an input layer, a hidden layer and an output layer. The training method comprises the following steps of iteratively executing the following steps: providing dimension reduction features output by a feature dimension reduction device to an input layer of a classifier so as to output hidden layer data from a hidden layer; determining a weight parameter for an output layer for the target output of the classifier and the regularization parameter based on the hidden layer data; and determining an updated value for the regularization parameter according to a current prediction error rate and a previous prediction error rate of the classifier and a current value of the regularization parameter, the updated value of the regularization parameter representing a value of the regularization parameter in a next round of iteration of the current iteration, and the current prediction error rate representing a prediction error of the classifier in the current iteration, the previous prediction error rate represents a prediction error of the classifier in a previous round of iteration of the current iteration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a training method, computing device, computer-readable storage medium, and computer program product for a classification network model for class prediction of energy consumption data. Background Art

[0002] With growing global attention to energy consumption and environmental impact, industrial enterprises are facing the challenges of improving energy efficiency, reducing energy costs, and meeting environmental regulations. Against this backdrop, accurately predicting and effectively managing the energy consumption of industrial equipment is crucial for improving energy efficiency, reducing operating costs, and supporting sustainable development strategies. Traditional energy management methods often rely on simple historical data analysis and empirical judgment, lacking precise prediction capabilities and in-depth analysis of complex data. With the development of industrial automation and information technology, vast amounts of energy consumption-related data are being collected and stored, paving the way for the adoption of more advanced data analysis and machine learning techniques. However, extracting useful information from this vast and complex data set and transforming it into accurate energy consumption prediction models remains a major challenge facing existing technologies. Furthermore, the complexity of industrial equipment and systems requires prediction models to be not only accurate but also capable of processing diverse data types and adapting to changing operating conditions. Several existing classification network models exist for predicting data categories. However, the accuracy of data classification by trained classification network models remains to be improved. Furthermore, the efficient utilization of computing resources is often not fully considered during training, resulting in high resource consumption during model training and prediction. In addition, when using large-scale data to train classification network models, it often takes a lot of training time and the training efficiency is low. Summary of the Invention

[0003] The present application provides a training method for a classification network model for predicting the category of energy consumption data, the classification network model comprising: a feature extractor for extracting features from the energy consumption data to obtain extracted features; a feature dimension reducer for reducing the dimensions of the extracted features to obtain reduced-dimensional features; and a classifier for predicting the category of energy consumption data based on the reduced-dimensional features, the classifier comprising an input layer, a hidden layer, and an output layer, wherein the training method comprises at least iteratively performing the following steps: providing the reduced-dimensional features output by the feature dimension reducer to the input layer of the classifier to output hidden layer data from the hidden layer; determining a weight parameter for the output layer based on the hidden layer data, a target output for the classifier, and a regularization parameter; and determining an updated value for the regularization parameter based on a current prediction error rate and a previous prediction error rate of the classifier and a current value of the regularization parameter, the updated value of the regularization parameter representing the value of the regularization parameter in the next iteration of the current iteration, the current prediction error rate representing the prediction error of the classifier in the current iteration, and the previous prediction error rate representing the prediction error of the classifier in the previous iteration of the current iteration.

[0004] Another embodiment of the present application provides a device for predicting the category of energy consumption data, comprising: a feature extraction module, which is configured to extract features from the energy consumption data to obtain extracted features; a feature dimension reduction module, which is configured to reduce the dimensions of the extracted features to obtain reduced-dimensional features; a classification module, which is configured to receive the reduced-dimensional features to predict the category of the energy consumption data, wherein the classification module comprises an input layer, a hidden layer, and an output layer, wherein the training process of the classification module at least comprises iteratively executing the following steps: providing the reduced-dimensional features output by the feature reducer to the input layer of the classifier to obtain the reduced-dimensional features from the feature reducer; The hidden layer outputs hidden layer data; a weight parameter for the output layer is determined based on the hidden layer data, a target output for the classifier, and a regularization parameter; and an updated value for the regularization parameter is determined based on a current prediction error rate and a previous prediction error rate of the classifier and a current value of the regularization parameter, wherein the updated value of the regularization parameter represents a value of the regularization parameter in a next iteration of a current iteration, the current prediction error rate represents a prediction error of the classifier in the current iteration, and the previous prediction error rate represents a prediction error of the classifier in a previous iteration of the current iteration.

[0005] Another embodiment of the present application further provides a computing device, comprising: a memory configured to store computer-executable instructions; and a processor configured to execute a method as described in any of the aforementioned method embodiments when the computer-executable instructions are executed by the processor.

[0006] Yet another embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed, the method described in any one of the aforementioned method embodiments is executed.

[0007] Yet another embodiment of the present application provides a computer program product, including a computer program, which implements the method described in any one of the aforementioned method embodiments when executed by a processor.

[0008] Based on the training method for a classification network model for classifying energy consumption data provided in an embodiment of the present application, during the training of the classifier in the classification network model, the regularization parameter therein can be updated as the training steps are iteratively executed. That is, the value of the regularization parameter can be dynamically adjusted based on the training effect. As a result, the weight parameters of the output layer can also be adaptively adjusted based on the training effect. Compared to the conventional situation of keeping the value of the regularization parameter unchanged, the accuracy of energy consumption prediction by the trained classification network model can be improved, thereby facilitating efficient energy use.

[0009] These and other advantages of the application will be apparent from and elucidated with reference to the embodiments described hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Embodiments of the present application will now be described in more detail and with reference to the accompanying drawings, in which:

[0011] Figure 1 FIGURE 1 illustrates a structural block diagram of a classification network model provided according to an embodiment of the present application;

[0012] Figure 2 An example of a network structure of a classifier in a classification network model provided according to an embodiment of the present application is illustrated;

[0013] Figure 3 Some steps involved in a method for training a classifier in a classification network model according to one embodiment of the present application are illustrated;

[0014] Figure 4 The diagram illustrates some steps involved in determining the weight parameters of the output layer of a classifier in a process of training a classifier in a classification network model according to one embodiment of the present application;

[0015] Figure 5 Some steps involved in a method for obtaining synthetic sample data based on original sample data according to an embodiment of the present application are illustrated;

[0016] Figure 6Some steps involved in a method for obtaining synthetic sample data based on original sample data according to another embodiment of the present application are illustrated;

[0017] Figure 7 Some steps included in a method for training a feature extractor based on an improved whale optimization algorithm according to another embodiment of the present application are shown;

[0018] Figure 8 The network structure of the autoencoder is schematically shown;

[0019] Figure 9 Diagram showing some of the steps involved in training a feature dimensionality reducer;

[0020] Figure 10 We outline the steps involved in training a classification network model for class prediction of energy consumption data.

[0021] Figure 11 The present invention schematically illustrates a device for predicting energy consumption data by category according to the present application;

[0022] Figure 12 An example system is illustrated that includes an example computing device that represents one or more systems and / or devices that may implement the various methods or apparatus described herein. DETAILED DESCRIPTION

[0023] The following description provides the specific details of various embodiments of the present application so that those skilled in the art can fully understand and implement the various embodiments of the present application. It should be understood that the technical scheme of the present application can be implemented without some of these details. In some cases, the present application does not illustrate or describe in detail some well-known structures or functions to avoid these unnecessary descriptions from obscuring the description of the embodiments of the present application. The terms used in this application should be understood in their broadest reasonable manner, even if they are used in conjunction with the specific embodiments of the present application.

[0024] The terminology used in this application should be interpreted in its broadest reasonable manner, even if it is used in connection with specific embodiments of the application.

[0025] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0026] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, smart transportation, and automated control.

[0027] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and inductive learning.

[0028] Existing training methods for classifier network models typically keep the value of the regularization parameter constant during training. This is detrimental to improving the classification accuracy of the trained classifier network model, especially when training with large data samples. Furthermore, training efficiency needs to be improved, resulting in a high consumption of computing resources during the training process.

[0029] The embodiment of the present application provides a training method for a classification network model for class prediction of energy consumption data. Figure 1 The structural diagram of the classification network model is shown schematically. Figure 1As shown, the classification network model may include a feature extractor 110, a feature dimension reducer 120, and a classifier 130. The feature extractor 110 may perform feature extraction on the energy consumption data to obtain extracted features. The feature dimension reducer 120 may perform dimension reduction on the extracted features output by the feature extractor to obtain reduced dimension features. The classifier 130 receives the reduced dimension features from the dimension reducer 120 to perform category prediction of the energy consumption data. For example, in some embodiments, the categories of energy consumption data may include three categories: Category 1 - High Efficiency, Category 2 - Normal, and Category 3 - Low Efficiency. Based on the results of the category prediction of energy consumption data, efficient energy consumption monitoring and energy consumption analysis can be provided for factories or production equipment, thereby providing a good foundation for optimizing energy allocation and utilization and reducing energy consumption costs, thereby improving production efficiency. The feature extractor 110, feature dimension reducer 120, and classifier 130 mentioned here can also be implemented in the form of a neural network model, which can be understood as a subnetwork model of the classification network model.

[0030] In some embodiments, the classifier may comprise a single hidden layer feed-forward neural network. Figure 2 The diagram shows an example of the network structure of the classifier 130. The classifier 130 includes an input layer, a hidden layer, and an output layer. The training sample provided to the input layer is the reduced dimension feature x output by the feature dimensionality reducer. The input layer and the hidden layer are connected to each other. The output of the hidden layer is the input data (i.e., the reduced dimension feature x) multiplied by the corresponding weight plus the bias, and then the result of all nodes is summed up through a nonlinear function. The output H of the hidden layer can be expressed by the following formula:

[0031] H=σe(W (h) ·p x +b (h) )

[0032] where p x is the input data (i.e., the dimension-reduced feature x), and σe is the Sigmoid activation function. (h) and b (h) denote the hidden layer weights and biases respectively. Figure 2 In the example, the number of training samples provided to the input layer is D, the hidden layer includes L nodes, and the output layer includes m nodes, where β represents the weight parameter between the hidden layer and the output layer, that is, the output layer weight parameter, that is, β = [β1,…,β L ] T .

[0033] like Figure 3The training method for the classification network model at least includes iteratively executing the following steps: S310, providing the dimension reduction features output by the feature dimension reducer to the input layer of the classifier to output hidden layer data from the hidden layer. S320, determining the weight parameters for the output layer based on the hidden layer data, the target output of the classifier, and the regularization parameter; and S330, determining the updated value for the regularization parameter based on the current prediction error rate and the previous prediction error rate of the classifier and the current value of the regularization parameter, the updated value of the regularization parameter represents the value of the regularization parameter in the next iteration of the current iteration, the current prediction error rate represents the prediction error of the classifier in the current iteration, and the previous prediction error rate represents the prediction error of the classifier in the previous iteration of the current iteration.

[0034] In step S310, the hidden layer data can be obtained according to the above formula for the hidden layer output H. The target output of the classifier mentioned in step S320 can be a sample label, for example, including the above-mentioned "efficient", "normal" and "inefficient". In some embodiments, the calculation method of the output layer weight β can be expressed as:

[0035] β=(H T H+λI) -1 H T p y

[0036] Among them, p y is the target output, λ is the regularization parameter, and I is the identity matrix. In one embodiment, the initial value of λ can be set to 0.001.

[0037] The above steps S310 to S330 can be iteratively executed in a loop, and in each iteration, the current prediction error rate and the previous prediction error rate of the classifier are determined, and in step S330, the value of the regularization parameter λ is updated to obtain the updated value λ of the regularization parameter for the next iteration. new For example, the updated value of the regularization parameter λ new It can be obtained by the following formula:

[0038] λ new =λ·(1+ρ·(error current -error previous ))

[0039] Among them, ρ is the adjustment rate, error current and error previousThe current prediction error rate and the previous prediction error rate represent the classifier's prediction error in the current iteration, respectively. The current prediction error rate represents the classifier's prediction error in the current iteration, and the previous prediction error rate represents the classifier's prediction error in the previous iteration. The current prediction error rate and the previous prediction error rate are calculated based on the classifier's prediction results and the actual data. For example, if the classifier predicts 100 sample data and the prediction results for 80 of them are correct, then the prediction error rate is 20%.

[0040] That is, based on the training method for a classification network model for classifying energy consumption data provided in an embodiment of the present application, during the training of the classifier in the classification network model, the regularization parameter therein can be updated as the training steps are iteratively executed. Specifically, the value of the regularization parameter can be dynamically adjusted based on the training effect, thereby enabling the weight parameters of the output layer to be adaptively adjusted based on the training effect. Compared to the conventional situation of keeping the value of the regularization parameter unchanged, the accuracy of energy consumption prediction by the trained classification network model can be improved, thereby facilitating efficient energy use.

[0041] It can be understood that when training the classifier, before the above step S310, the network parameters of the classifier (ie, hidden layer weights and biases) can be initialized. (h) and bias b (h) The initialization method can be expressed as:

[0042]

[0043]

[0044] in, is the weight between the i-th neuron in the hidden layer and the j-th input node, is the bias of the i-th neuron in the hidden layer.

[0045] In some embodiments, as Figure 4 As shown, the above-mentioned step S320 may include the following steps: S410, using the hidden layer data, the target output and the regularization parameter to determine the initial weight parameter for the output layer; S420, determining the super gradient of the weight parameter for the output layer based on the initial weight parameter and the hidden layer weight parameter for the hidden layer; and S430, determining the dot product of the super gradient and the initial weight parameter to obtain the weight parameter for the output layer. In step S410, the initial weight parameter β for the output layer can be determined according to the above-mentioned calculation formula for the output layer weight β s , and then, in step 420, according to the initial weight parameter β s, the hidden layer weight parameter W for the hidden layer (h) 、b (h) Determine the super gradient Θ for the weight parameters of the output layer. In some embodiments, the calculation of the super gradient Θ can be achieved by numerical approximation, and Θ can be expressed as:

[0046]

[0047] Wherein, ∈ represents a preset smaller positive number, which is used to calculate the approximate value of the gradient. In step S430, by calculating the super gradient Θ and the initial weight parameter β s The dot product of is used to obtain the weight parameters for the output layer.

[0048] In conventional classifier training methods, the calculation of the weight parameters of the classifier's output layer involves solving a linear system, which can require a large amount of computing resources. In this embodiment, by introducing a super-gradient strategy, the impact of weight updates on subsequent iterations is considered during training, making the training process more efficient and conserving computing resources. This method can significantly reduce training time while maintaining the classification accuracy of the trained classifier, especially when training with large-scale data.

[0049] As mentioned above, the feature extractor can also be implemented based on a neural network model. Therefore, the feature extractor can also be obtained based on the training of training samples. In some embodiments, the feature extractor is obtained by training a training sample data set, and the training sample data set includes an original sample data set and a synthetic sample data set obtained based on the original sample data set, such as Figure 5As shown, the synthetic sample data set is obtained by at least the following steps: S510, generating corresponding synthetic sample data based on each original sample data in the original sample data set and the adjacent sample data of the original sample data in the feature space, thereby obtaining the synthetic sample data set; S520, obtaining a quality assessment value for the synthetic sample data based on the distribution consistency and sample diversity of the synthetic sample data in the feature space in the synthetic sample data set; and S530, adjusting the strategy for generating the synthetic sample data based on the quality assessment value for the synthetic sample data. In conventional model training methods, the collection, acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor model generalization ability and affect the accuracy of the model. In the embodiment of the present application, the training samples for training the feature extractor include not only the actual energy consumption data collected, but also synthetic sample data obtained based on the actual energy consumption data collected, thereby effectively solving the problem of insufficient sample quantity or sample imbalance. Moreover, in the embodiment of the present application, the quality assessment value for the synthetic sample data is obtained based on the distribution consistency and sample diversity of the synthetic sample data in the feature space in the synthetic sample data set, and the strategy for generating the synthetic sample data is adjusted based on the quality assessment value for the synthetic sample data. Therefore, the embodiment of the present application optimizes the generation process of synthetic samples, so that the synthetic sample data obtained based on the collected data can better reflect the actual distribution of the collected data.

[0050] In some embodiments, the process of obtaining the synthetic sample data set may include the following steps: determining a set of neighboring sample data of the original sample data in the feature space; determining the difference between the original sample data and the neighboring sample data in the set of neighboring sample data; obtaining a sample data difference based on the product of the difference and a proportional coefficient; and adding the original sample data and the sample data difference in the feature space to obtain the synthetic sample data. For example, assuming that each original data corresponds to a data point di in the feature space, it can be determined that each data point d i The set of neighboring points N in the feature space i , and then generate synthetic sample data s based on the neighboring points i , the synthetic sample data can be obtained by the following formula:

[0051] s i =d i +δ·(n i -d i )

[0052] Among them, n i ∈N i It is d i A neighboring point of , δ is a random number, which is the above-mentioned proportional coefficient, δ·(ni -d i ) is the sample data difference, the original sample data d i and sample data difference δ·(n i -d i ) are added in the feature space to obtain the synthetic sample data s i .

[0053] In some embodiments, the raw data sample represents energy consumption, that is, the raw data sample is an energy consumption data sample. An example of a raw data sample is given below. In one embodiment, the raw data is collected from a sensor on an electric pump, and the attributes of the data include:

[0054] a x1 : Timestamp, indicating the specific time when the data was collected.

[0055] a x2 : Current value, unit ampere (A), indicates the current intensity when the electric pump is running.

[0056] a x3 : Voltage value, unit volt (V), represents the voltage level when the electric pump is running.

[0057] a x4 : Speed, unit revolutions per minute (rpm), indicates the operating speed of the electric pump.

[0058] a x5 : Temperature, unit: Celsius (℃), indicates the temperature when the electric pump is running.

[0059] a x6 : Vibration frequency, in Hertz (Hz), reflects the mechanical stability of the electric pump during operation.

[0060] a x7 : Pressure, unit Pascal (Pa), indicates the pressure level of the electric pump when it is working.

[0061] a x8 : Flow rate, in cubic meters per hour (m3 / h), indicates the flow rate of the electric pump.

[0062] a x9 : Power consumption, in kilowatt-hours (kWh), directly reflects the energy consumption level of the electric pump.

[0063] a x10 : Operation status labels, including "Efficient", "Normal" and "Inefficient".

[0064] Therefore, the original sample data can be represented by a vector as The categories of the sample data may include “high efficiency”, “normal” and “low efficiency”. Table 1 below shows an example of the original sample data (energy consumption data).

[0065]

[0066] In some embodiments, before obtaining the synthetic sample data set, the original sample data in the original sample data set may be pre-processed (e.g., cleaned and standardized) to ensure data quality and consistency. Specifically, assuming that the original data sample set is D = {d1, d2, ..., d n}, where each data point d i It is a vector that represents multiple attributes of the data. The goal of data preprocessing is to standardize these raw data samples to the same scale. The standardized raw sample data is represented by D norm , then the standardization process is:

[0067]

[0068] Among them, μ(D) and σ(D) are the mean and standard deviation of the original sample data set D, respectively.

[0069] Furthermore, the calculation method of the mean μ(D) can be expressed as:

[0070]

[0071] Where n is the total number of data points in the original sample dataset D, d i is the i-th data point in the original sample dataset.

[0072] The calculation method of standard deviation σ(D) can be expressed as:

[0073]

[0074] The following is an example explanation of the distribution consistency and sample diversity mentioned in step S520. k When performing quality assessment, a sample quality assessment function Q(S) can be defined. The sample quality assessment function takes into account the distribution consistency C(S,M) and sample diversity D(S) of the samples in the feature space.

[0075] The distribution consistency C(S,M) can be evaluated by calculating the distance difference between the synthetic sample data and the original sample data in the feature space using the following formula:

[0076]

[0077] m ijRepresents the data points in the feature space M, that is, the normalized original sample data D norm A data in , s ij represents the j-th feature of the synthetic sample data i in the feature space M, m is the total number of features, which may correspond to the number of attributes of the original sample data, and k is a positive integer.

[0078] Sample diversity D(S) is evaluated by calculating the average distance between synthetic sample data:

[0079]

[0080] where s il is the lth feature of synthetic sample data i, s jl is the lth feature of synthetic sample data j.

[0081] In some embodiments, the above-mentioned step S520—obtaining a quality assessment value for the synthetic sample data based on the distribution consistency and sample diversity of the synthetic sample data in the feature space in the synthetic sample data set includes: determining the quality assessment value based on a weighted sum of the distribution consistency and the sample diversity. That is, the sample quality assessment function Q(S) can be:

[0082] Q(S)=α·C(S,M)+(1-α)·D(S)

[0083] Where α is a balancing coefficient used to balance distribution consistency and diversity. In one embodiment, α can be set to 0.5.

[0084] In some embodiments, step S530—adjusting the strategy for generating the synthetic sample data based on the quality assessment value of the synthetic sample data—may include: increasing the proportional coefficient δ in response to the quality assessment value being less than a first threshold. Thus, the sample generation strategy can be adaptively adjusted based on the sample quality assessment results. In one embodiment, adjusting the generation strategy includes changing the value range of δ or adjusting the neighboring point selection strategy. The adjustment strategy can be expressed as:

[0085] δ′=β·δ

[0086] Wherein, β is an adjustment coefficient used to control the variation range of the synthesized sample data. In one embodiment, the first threshold value for the quality evaluation value is 0.8.

[0087] By iteratively executing the above steps S510-S530, a high-quality synthetic sample dataset can be obtained. The synthetic sample dataset obtained by this method takes into account the inherent structure and potential relationships of the original sample dataset, and the obtained new samples (i.e., the synthetic sample dataset) can better reflect the true distribution of the original sample data. norm Merge it with the synthetic sample dataset S to obtain the training sample data for the feature extractor.

[0088] In some embodiments, in addition to the above-mentioned steps S510-S530, the method for obtaining a synthetic sample data set based on the original sample data set further includes the following steps: determining a first evaluation value for the synthetic sample data based on the quality evaluation value and the predicted classification accuracy for the synthetic sample data; in response to the first evaluation value being greater than a second threshold, discarding the synthetic sample data corresponding to the first evaluation value greater than the second threshold. The predicted classification accuracy for the synthetic sample data mentioned here is a prediction of the classification accuracy of the currently obtained synthetic sample data. The Softmax function can be used to calculate the predicted classification accuracy for the synthetic sample data, that is, the synthetic sample data can be input into the Softmax function to obtain data representing the predicted classification accuracy for the synthetic sample data. This is conducive to ensuring the consistency between the expansion process of the training sample data and the overall training objectives of the classification network model. In some embodiments, the first evaluation value can be determined based on the weighted sum of the quality evaluation value and the predicted classification accuracy. For example, the first evaluation value can be calculated by defining a feedback function F(S,M) to evaluate the impact of the synthetic sample data on the overall performance of the classification network model. The first evaluation value (i.e., the feedback function) can be expressed as:

[0089] F(S,M)=γ·Q(S)+(1-γ)·P(S,M)

[0090] Where P(S, M) represents the predicted classification accuracy for the synthetic sample data, and γ is a balancing coefficient, for example, set to 0.7. In some embodiments, if the first evaluation value F(S, M) obtained for the synthetic sample data is greater than a second threshold, the synthetic sample data is discarded. This can further improve the quality of the obtained synthetic sample data and promote consistency between the sample data expansion process based on the original sample data and the classification network model training objectives.

[0091] Furthermore, in some embodiments, the process of obtaining the synthetic sample data set may also include the following steps: determining the similarity between each synthetic sample data set in the synthetic sample data set and the original sample data based on the alternating least squares method; and removing synthetic sample data whose similarity is less than a similarity threshold from the synthetic sample data set. Based on the alternating least squares method, the similarity between each synthetic sample data set in the synthetic sample data set and the original sample data is determined. The alternating least squares algorithm can be used to analyze the original sample data and the synthetic sample data in the feature space to understand the potential structure and distribution of the original sample data. In this way, the quality of the synthetic sample data in the obtained synthetic sample data set can be further improved. Some steps included in the method for obtaining a synthetic sample data set based on an original sample data set based on this embodiment can be as follows: Figure 6 As shown, the method for obtaining a synthetic sample data set based on an original sample data set can iteratively execute the following steps S610 to S670: S610, generating corresponding synthetic sample data according to each original sample data in the original sample data set and the neighboring sample data of the original sample data in the feature space, thereby obtaining a synthetic sample data set; S620, obtaining a quality assessment value for the synthetic sample data according to the distribution consistency and sample diversity of the synthetic sample data in the feature space in the synthetic sample data set; S630, adjusting the strategy for generating the synthetic sample data based on the quality assessment value for the synthetic sample data; S640, determining a first assessment value for the synthetic sample data according to the quality assessment value and the predicted classification accuracy for the synthetic sample data; S650, in response to the first assessment value being greater than a second threshold, discarding the synthetic sample data corresponding to the first assessment value greater than the second threshold; S660, determining the similarity between each synthetic sample data set in the synthetic sample data set and the original sample data based on the alternating least squares method; S670, removing synthetic sample data whose similarity is less than the similarity threshold from the synthetic sample data set.

[0092] In step S660, determining the similarity between each synthetic sample data set in the synthetic sample data set and the original sample data based on the alternating least squares method may include calculating the following loss function L(M, U, V) for the synthetic sample data and the original data samples:

[0093]

[0094] Where λ is a regularization parameter used to prevent overfitting. In one embodiment, λ is set to 0.1.

[0095] u i Represents the i-th feature in the sample feature matrix of the synthetic sample data, which can be expressed as:

[0096] u i =(V T V+λI) -1 V T m i

[0097] Among them, V is the attribute feature matrix, which represents the attribute values ​​of the original sample data, I is the unit matrix, m i Represents the score vector of synthetic sample data i for all attributes.

[0098] v j Represents the jth feature in the attribute feature matrix of the synthetic sample data, which can be expressed as:

[0099] v j =(U T U+λI) -1 U T m j

[0100] Where U is the sample feature matrix, which represents the sample features of the original sample data, m j is the score vector of attribute j from all synthetic sample data.

[0101] The smaller the value of the above-mentioned loss function L(M,U,V), the higher the similarity between the synthesized sample data and the original sample data. Therefore, the above-mentioned loss function L(M,U,V) can be calculated for each synthesized sample data, and each synthesized sample data can be sorted according to the value of the loss function L(M,U,V). Synthetic sample data with similarity less than the similarity threshold can be removed from the synthetic sample data set, thereby making the synthetic sample data retained in the synthetic sample data set have a higher similarity with the original sample data.

[0102] Therefore, in this embodiment, the retained synthetic sample data forms a synthetic sample dataset S, and the synthetic sample dataset S is consistent with the original sample dataset D. norm The merging can obtain the training sample data for the feature extractor.

[0103] The following is an example of how to train the feature extractor using the obtained training sample data.

[0104] In some embodiments, the feature extractor can be trained using a whale optimization algorithm. The Whale Optimization Algorithm (WOA) is a meta-heuristic optimization algorithm inspired by observations and simulations of humpback whale hunting behavior, particularly their bubble net feeding method. The core of the Whale Optimization Algorithm consists of three main operations: search, encirclement, and predation. These operations simulate different behaviors of humpback whales during hunting. In the search phase, humpback whales explore the problem space through random selection, searching for potential solutions. In the encirclement phase, humpback whales adjust their positions to surround the target fish school for more efficient capture. In the predation phase, humpback whales use bubble nets to trap the fish school, preventing them from escaping. In the algorithm, this corresponds to generating new solutions by merging candidate solutions. The Whale Optimization Algorithm features simple control parameter settings and high optimization efficiency. It does not require manual setting of multiple control parameters, which improves the algorithm's efficiency and reduces its application difficulty. This application does not impose any specific restrictions on the network structure of the feature extractor; any appropriate neural network can be used as the feature extractor. In some embodiments, the feature extractor comprises a three-layer fully connected neural network.

[0105] Another embodiment of the present application provides a method for training a feature extractor based on an improved whale optimization algorithm. Figure 7As shown, the process of training the feature extractor includes at least iteratively executing the following steps: S710, determining the updated position of the whale based on the current position and the historical optimal position of the whale, wherein the current position represents the position of the whale in the current iteration, the historical optimal position represents the optimal whale position in each iteration before the current iteration, and the updated position represents the position of the whale in the next iteration, and each whale position represents the parameters of the feature extractor; S720, determining the search step size based on the set total number of iterations and the current number of iterations; and S730, adjusting the updated position of the whale based on the current position of the whale, the difference between the previous position and the current position, the search step size, and an adjustment coefficient for the difference, wherein the previous position represents the position of the whale in the previous iteration. In this training process, the whale's position update depends not only on the current optimal solution but also on the historical optimal solution, thereby enhancing the algorithm's exploration ability in the multi-modal search space. In this mechanism, the position updates of the whales are no longer performed synchronously in each iteration, but asynchronously according to the fitness score of each whale. Whales with better performance may update their positions more frequently, while whales with poorer performance may update less frequently. This can reduce the waste of computing resources and improve the training efficiency of the feature extractor. The feature extractor training method provided by this embodiment can effectively improve the convergence speed and solution quality when processing complex data feature extraction tasks, and is suitable for feature extraction of energy consumption data in the process of large-scale industrial equipment energy consumption prediction.

[0106] During the training of the feature extractor based on the whale optimization algorithm, the position of each whale represents the parameters of the vital sign extractor. That is, the position of each whale in the whale group corresponds to a set of complete parameters of the feature extractor. According to the above step S710, in each iteration, the position of the whale is actually updated according to the asynchronous dynamic rules. An example of the formula for updating the whale position is as follows:

[0107]

[0108] Where t represents the current iteration number, represents the historical optimal position, that is, the optimal whale position in each iteration before the current iteration. represents the updated position of the whale, that is, the position in the next iteration, Indicates the whale's position in the current iteration. Historical optimal position The fitness of all whales can be compared during the iteration process. That is, after each iteration, the fitness of all whales can be calculated, and then the whale position with the highest fitness in the previous iterations can be determined as the historical optimal position. The fitness is the fitness function in the whale algorithm. In one embodiment, it can be the inverse of the loss function for the feature extractor.

[0109] In step S720, the search step size is determined based on the set total number of iterations and the current number of iterations. The search step size d(t) can be used to control the search range. For example, it can be defined as follows:

[0110]

[0111] Among them, d start is the initial search step, T is the total number of iterations, and t represents the current number of iterations. In one embodiment, the initial search step is set to 0.5. In another embodiment, the initial search step is set to d start It is determined based on the initial search range and the expected convergence speed, and its calculation method can be expressed as:

[0112]

[0113] Among them, γ is a pre-set scaling factor that determines the size of the initial search range. and are the lower and upper bounds of the feature space respectively.

[0114] In step SS730, the updated position of the whale is adjusted according to the current position of the whale, the difference between the previous position and the current position, the search step size, and the adjustment coefficient for the difference. The previous position represents the position of the whale in the previous iteration. In order to distinguish it from the symbols in the previous formula, the updated position of the whale is adjusted here. Indicates the current position of the whale, represents the previous position of the whale, Indicates the updated position of the whale. In some embodiments, the updated position of the whale Can be expressed as:

[0115]

[0116] in, Both represent the whale position, i.e., the parameter vector of the feature extractor, and δ represents the adjustment coefficient.

[0117] The above steps S710-S730 can be executed in a loop, and the number of iterations for the above steps can be pre-set when training the feature extractor. When the training process reaches the preset number of iterations, the training is stopped to obtain the optimal parameter combination of the feature extractor and complete the training of the feature extractor.

[0118] In some embodiments, the adjustment coefficient δ comprises the quotient of the standard deviation of the change in the whale's fitness between consecutive iterations and the mean of the change. That is, the calculation method of the adjustment coefficient δ can be expressed as:

[0119]

[0120] Where Δf is the vector of whale fitness changes between consecutive iterations, η is a pre-set scaling factor, std(Δf) and mean(Δf) are the standard deviation and mean of Δf, respectively. In one embodiment, the scaling factor η is set to 0.01.

[0121] It is understood that before starting the training process of the feature extractor, the positions of the whales can be initialized. The initialization of the initial position of each whale in the whale group can be expressed by the following formula:

[0122]

[0123] in, and are the lower and upper bounds of the feature space respectively, rand(0,1) is a function that generates random numbers between [0,1], represents the position of each whale, is an N-dimensional vector, where N is the number of extracted features.

[0124] Moreover, during each iteration, the current optimal position of the whale can be selected based on the fitness of each whale in the whale group, that is, the whale position of the whale with the highest fitness is selected as the current optimal position. On this basis, the above-mentioned historical optimal position can be obtained in subsequent iterations.

[0125] According to another embodiment of the present application, the process of training a feature extractor further includes the step of updating the learning rate for the feature extractor based on an initial learning rate and a number of iterations, wherein the initial learning rate is determined based on the variance and mean of the fitness of all whales. In other words, the learning rate can be adaptively adjusted based on an iterative process to adapt to a changing search environment.

[0126] In one embodiment, the learning rate α(t) is dynamically adjusted according to the progress of the current iteration and can be expressed as:

[0127] α(t)=α start ·e -βt

[0128] Among them, α start is the initial learning rate, β is a preset hyperparameter, and in one embodiment, the value of β is 0.05.

[0129] In another embodiment, α start Based on the variance and mean of the fitness of all whales, the initial learning rate can be expressed as:

[0130]

[0131] Among them, ζ is a regulatory factor, and are the variance and mean of the fitness of all whales, respectively.

[0132] The extracted features output by the feature extractor can be provided to the feature dimension reducer in the classification network model to output reduced dimensionality features, thereby reducing the number of features, improving the accuracy of the classification network model, and reducing the running time of the classification network model when performing data classification, thereby also reducing the waste of computing resources.

[0133] According to some embodiments of the present application, a feature dimensionality reducer in a classification network model is trained using extracted features output by a feature extractor, and the feature dimensionality reducer may employ an autoencoder network structure. An autoencoder neural network is an unsupervised machine learning algorithm whose primary purpose is to compress input layer data into a shorter format and, through decoding, decode the compressed features into a form that is closest to the original input. Figure 8 The network structure of an autoencoder is schematically shown. The autoencoder consists of an encoder and a decoder. The encoder encodes the input and generates an intermediate result. The decoder restores the intermediate result to make the output as close to the input as possible.

[0134] Figure 9 The diagram shows some of the steps involved in training a feature reducer, such as Figure 9As shown, training the feature dimensionality reducer includes iteratively performing the following steps: S910, the encoder generates encoded data based on the extracted features; S920, the decoder outputs a reconstructed feature based on the encoded data to reconstruct the extracted features; S930, determining the reconstruction error between the extracted features and the reconstructed features; S940, determining the updated weight parameters for the encoder and decoder based on the current weight parameters, current gradients, and previous gradients of the encoder and decoder, wherein the current weight parameters represent the weight parameters of the encoder and decoder under the current iteration, the current gradient represents the gradient information under the current iteration, the previous gradient represents the gradient information of the previous iteration of the current iteration, and the updated weight parameters represent the weight parameters for the next iteration of the encoder and decoder; S950, determining the feature importance of each extracted feature based on the reconstruction error, wherein the feature importance represents the degree of influence of the extracted feature on the reconstruction error; and S960, removing the extracted features whose feature importance is lower than a threshold. The above steps can be repeated until the convergence condition is met or the predetermined number of iterations is reached.

[0135] The network parameters of the encoder and decoder include weight parameters and biases. It is understood that before iterating through steps S910 to S960, the weight parameters and biases of the encoder and decoder may be initialized. In one embodiment, the weight parameters are initialized to small random values ​​and the biases are initialized to zero. The encoder weight parameter W (e) and decoder weight parameters W (d) The initialization can be initialized using uniform distribution or normal distribution, and the encoder weight parameter W (e) and decoder weight parameters W (d) It can be expressed as:

[0136]

[0137] in, is the element in the i-th row and j-th column of the weight parameter matrix of the l-th layer, randn(μ,σ 2 ) means the mean is μ and the variance is σ 2 In one embodiment, the mean μ is set to 0 and the standard deviation σ is set to 0.1. Next, steps S910 to S960 are exemplarily described.

[0138] In step S910, for the input data (i.e., the extracted features output by the feature extractor), the encoder produces the encoded data It can be expressed as:

[0139]

[0140] Among them, W (e) and b (e) are the weight parameter matrix and bias vector of the encoder respectively, and σs is the ReLU activation function.

[0141] In step S920, the input data is reconstructed by the decoder The decoder uses the encoded data Reconstructing the input It can be expressed as:

[0142]

[0143] Among them, W (d) and b (d) is the decoder's weight parameter matrix and bias vector.

[0144] In step S930, the reconstruction error is usually calculated using the mean square error (MSE) It can be expressed as:

[0145]

[0146] Where n is the input data dimension.

[0147] In step S940, based on the current weight parameters W of the encoder and decoder t , current gradient g t and the previous gradient g t-1 Determine the updated weight parameters W for the encoder and decoder t+1 , the current weight parameter W t Represents the weight parameters of the encoder and decoder in the current iteration, the current gradient table g t Shows the gradient information of the current iteration, the previous gradient g t-1 Represents the gradient information of the previous iteration of the current iteration, and updates the weight parameter W t+1 In some embodiments, the above step S940 may include the following steps: t , previous gradient g t-1 and the previous gradient g t-2 Determine the historical gradient impact factor, and then the previous gradient g t-2 Represents the gradient information of the previous iteration of the previous iteration; Determine the historical gradient impact factor and the previous gradient g t-1 The product of the previous gradient component is obtained; according to the previous gradient component and the current gradient g t The sum of the weight parameter adjustment components is determined; the current weight parameter W is determined t The difference between the weight parameter adjustment component and the weight parameter adjustment component is used to obtain the updated weight parameter Wt+1 In some embodiments, determining the weight parameter adjustment component based on the sum of the previous gradient component and the current gradient includes: determining the product of the sum of the previous gradient component and the current gradient and a learning rate to obtain the weight parameter adjustment component.

[0148] Therefore, according to the above embodiment, the weight parameter W is updated t+1 can be expressed as:

[0149] W t+1 =W t -η(g t +αg t-1 )

[0150] Where η is the learning rate and α is the historical gradient influence factor. In one embodiment, the learning rate η is set to 0.01. The historical gradient influence factor α is dynamically adjusted based on the gradient change rate of the previous iterations. The historical gradient influence factor α under the current iteration is t It can be expressed as:

[0151]

[0152] Among them, κ is a scaling factor used to adjust the influence of historical gradients on the current update and can be set in advance.

[0153] In step S950, the feature importance of each extracted feature is determined based on the reconstruction error, where the feature importance represents the degree of influence of the extracted feature on the reconstruction error. In some embodiments, the importance of each extracted feature is calculated by its contribution to the reconstruction error, and the calculation method can be expressed as:

[0154]

[0155] Among them, Importance(i) represents the importance of the i-th extracted feature, It is the partial derivative of the reconstruction error L with respect to the i-th extracted feature, indicating the influence of the extracted feature on the reconstruction error.

[0156] In step S960, the extracted features may be sorted according to their importance, and the extracted features whose importance is lower than a threshold may be removed. The above steps may be repeated until a convergence condition is met or a predetermined number of iterations is reached.

[0157] The autoencoder learns a low-dimensional representation of the data by minimizing the reconstruction error between the input and output. In conventional technical solutions, a simple gradient descent method is usually used to update the weight parameters of the encoder and decoder. In this embodiment of the present application, not only the current gradient information is taken into account, but also the historical gradient information, so that the feature dimensionality reducer converges to the optimal solution more effectively, reducing the waste of computing resources and making the model training of the feature extractor more efficient. Moreover, this embodiment integrates a redundant elimination mechanism to effectively remove insignificant features, thereby improving the representativeness of the features.

[0158] The above embodiments illustrate some steps or processes involved in the training method of the classification network model for class prediction of energy consumption data. The classification network model includes a feature extractor, a feature dimension reducer and a classifier. The above training process can be summarized as follows: Figure 10 The steps shown. In step S1010, energy consumption sample data can be collected, and the categories of at least a part of the sample data can be labeled. The labeled categories include, for example, "high efficiency", "low efficiency" and "normal". In step S1020, synthetic sample data is generated based on the collected energy consumption sample data, and the collected energy consumption sample data is merged with the obtained synthetic sample data to obtain a training sample data set, that is, in this step, the collected energy consumption sample data is expanded to obtain a training sample data set. In step S1030, the feature extractor is trained using the training sample data set. In step S1040, the feature dimension reducer is trained using the extracted features output by the feature extractor. In step S1050, the classifier is trained using the reduced dimensionality features output by the feature dimension reducer. After the above steps, a trained classification network model is obtained.

[0159] Using the trained classification network model, the category of newly collected energy consumption data can be predicted. Specifically, the feature extractor in the classification network model first extracts features from the newly collected energy consumption data to obtain extracted features. The feature dimension reducer in the classification network model then reduces the dimensionality of the extracted features to obtain reduced dimensionality features. The reduced dimensionality features are then fed into the classifier to output the corresponding category.

[0160] Another embodiment of the present application provides a device for classifying energy consumption data. Figure 11The present invention schematically illustrates an apparatus 1100 for predicting the category of energy consumption data according to the present application, which comprises: a feature extraction module 1110 configured to extract features from the energy consumption data to obtain extracted features; a feature dimension reduction module 1120 configured to reduce the dimensions of the extracted features to obtain reduced-dimensional features; a classification module 1130 configured to receive the reduced-dimensional features to predict the category of the energy consumption data, wherein the classification module comprises an input layer, a hidden layer, and an output layer, wherein the training process of the classification module at least comprises iteratively executing the following steps: providing the reduced-dimensional features output by the feature reducer to a classifier; An input layer to output hidden layer data from the hidden layer; determining a weight parameter for the output layer based on the hidden layer data, a target output for the classifier, and a regularization parameter; and determining an updated value for the regularization parameter based on a current prediction error rate and a previous prediction error rate of the classifier and a current value of the regularization parameter, the updated value of the regularization parameter representing the value of the regularization parameter in the next iteration of the current iteration, the current prediction error rate representing the prediction error of the classifier in the current iteration, and the previous prediction error rate representing the prediction error of the classifier in the previous iteration of the current iteration.

[0161] Each step in the method for training a classification network model for classifying energy consumption data according to the above-mentioned embodiments can be implemented in the form of computer software, which can be executed by a computing device. Therefore, another embodiment of the present application provides a computing device comprising a memory and a processor, wherein the memory is configured to store computer-executable instructions, and the processor is configured to execute the method for training a classification network model for classifying energy consumption data according to any of the above-mentioned method embodiments when the computer-executable instructions are executed by the processor.

[0162] In particular, the method described above with reference to the flowchart can be implemented as a computer program. For example, an embodiment of the present application provides a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing at least one step of the method for training a classification network model for class prediction of energy consumption data described in the above embodiment.

[0163] Another embodiment of the present application provides one or more computer-readable storage media having computer-readable instructions stored thereon, which, when executed, implement a method for training a classification network model for classifying energy consumption data according to some embodiments of the present application. The various steps of the method for training a classification network model for classifying energy consumption data can be converted into computer-readable instructions through programming and stored in a computer-readable storage medium. When such a computer-readable storage medium is read or accessed by a computing device, the computer-readable instructions therein are executed by a processor on the computing device to implement the method for training a classification network model for classifying energy consumption data.

[0164] Figure 12 An example system 1200 is illustrated, which includes an example computing device 1210 that represents one or more systems and / or devices that can implement the various techniques described herein. The computing device 1210 can be, for example, a server of a service provider, a device associated with a server, a system on a chip, and / or any other suitable computing device or computing system. Figure 11 The apparatus 1100 for predicting the category of energy consumption data may be implemented as a computing device 1210. Alternatively, the apparatus 1100 for predicting the category of energy consumption data may be implemented as a computer program in the form of an application 1216.

[0165] The example computing device 1210 as shown includes a processing system 1211, one or more computer-readable media 1212, and one or more I / O interfaces 1213 that are communicatively coupled to each other. Although not shown, the computing device 1210 may also include a system bus or other data and command transmission system that couples various components to each other. The system bus may include any one or a combination of different bus structures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and / or a processor or local bus utilizing any one of a variety of bus architectures. Various other examples are also contemplated, such as control and data lines.

[0166] Processing system 1211 represents functionality that uses hardware to perform one or more operations. Thus, processing system 1211 is illustrated as including hardware elements 1214 that can be configured as processors, functional blocks, and the like. This can include hardware implemented as application-specific integrated circuits or other logic devices formed using one or more semiconductors. Hardware elements 1214 are not limited by the materials from which they are formed or the processing mechanisms employed therein. For example, a processor can be comprised of (a plurality of) semiconductors and / or transistors (e.g., electronic integrated circuits (ICs)). In such a context, processor-executable instructions can be electronically executable instructions.

[0167] Computer-readable media 1212 is illustrated as including memory / storage 1215. Memory / storage 1215 represents memory / storage capacity associated with one or more computer-readable media. Memory / storage 1215 may include volatile media (such as random access memory (RAM)) and / or non-volatile media (such as read-only memory (ROM), flash memory, optical disks, magnetic disks, etc.). Memory / storage 1215 may include fixed media (e.g., RAM, ROM, fixed hard drives, etc.) and removable media (e.g., flash memory, removable hard drives, optical disks, etc.). Computer-readable media 1212 may be configured in various other ways, as further described below.

[0168] One or more I / O interfaces 1213 represent functionality that allows a user to input commands and information to the computing device 1210 using various input devices, and optionally also allows information to be presented to the user and / or other components or devices using various output devices. Examples of input devices include a keyboard, a cursor control device (e.g., a mouse), a microphone (e.g., for voice input), a scanner, touch functionality (e.g., a capacitive or other sensor configured to detect physical touch), a camera (e.g., that can use visible or invisible wavelengths (such as infrared frequencies) to detect motion that does not involve touch as gestures), and the like. Examples of output devices include a display device (e.g., a monitor or projector), speakers, a printer, a network card, a tactile response device, and the like. Thus, the computing device 1210 can be configured in various ways, as further described below, to support user interaction.

[0169] The computing device 1210 also includes an application 1216. The application 1216 may be, for example, a software instance of the apparatus 1100 for performing category prediction on energy consumption data, and may be combined with other elements in the computing device 1210 to implement the techniques described herein.

[0170] Various techniques may be described herein in the general context of software, hardware, or program modules. Generally, these modules include routines, programs, objects, elements, components, data structures, and the like that perform specific tasks or implement specific abstract data types. As used herein, the terms "module," "function," and "component" generally refer to software, firmware, hardware, or a combination thereof. The techniques described herein are platform-independent, meaning that these techniques can be implemented on a variety of computing platforms with a variety of processors.

[0171] An implementation of the described modules and techniques may be stored on or transmitted across some form of computer-readable media. Computer-readable media may include various media accessible by computing device 1210. By way of example, and not limitation, computer-readable media may include "computer-readable storage media" and "computer-readable signal media."

[0172] As opposed to a mere signal transmission, carrier wave, or signal itself, "computer-readable storage medium" refers to a medium and / or device, and / or tangible storage device, capable of persistently storing information. Thus, computer-readable storage media refers to non-signal-bearing media. Computer-readable storage media include hardware such as volatile and non-volatile, removable and non-removable media and / or storage devices implemented in a method or technology suitable for storing information (such as computer-readable instructions, data structures, program modules, logic elements / circuits, or other data). Examples of computer-readable storage media may include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage devices, hard disks, cassettes, magnetic tape, magnetic disk storage devices or other magnetic storage devices, or other storage devices, tangible media, or articles of manufacture suitable for storing desired information and accessible by a computer.

[0173] "Computer-readable signal media" refers to signal-bearing media that is configured to send instructions to the hardware of the computing device 1210, such as via a network. Signal media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, data signal, or other transport mechanism. Signal media also includes any information delivery media. The term "modulated data signal" refers to a signal that has one or more of its characteristics set or changed so as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wire connection, and wireless media such as acoustic, RF, infrared, and other wireless media.

[0174] As previously described, hardware elements 1214 and computer-readable media 1212 represent instructions, modules, programmable device logic, and / or fixed device logic implemented in hardware form, which in some embodiments can be used to implement at least some aspects of the technology described herein. Hardware elements can include integrated circuits or systems on a chip, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), and other implementations in silicon or other hardware devices. In this context, hardware elements can be used as processing equipment for executing program tasks defined by the instructions, modules, and / or logic embodied by the hardware elements, as well as hardware devices for storing instructions for execution, such as the computer-readable storage media described previously.

[0175] The aforementioned combinations may also be used to implement the various techniques and modules described herein. Thus, software, hardware or program modules and other program modules may be implemented as one or more instructions and / or logic embodied on some form of computer-readable storage medium and / or by one or more hardware elements 1214. Computing device 1210 may be configured to implement specific instructions and / or functions corresponding to software and / or hardware modules. Thus, for example, by using a computer-readable storage medium and / or hardware elements 1214 of a processing system, a module may be implemented as a module executable by computing device 1210 as software, at least in part, in hardware. Instructions and / or functions may be executable / operable by one or more articles of manufacture (e.g., one or more computing devices 1210 and / or processing systems 1211) to implement the techniques, modules, and examples described herein.

[0176] In various embodiments, computing device 1210 can be implemented in a variety of different configurations. For example, computing device 1210 can be implemented as a computer-type device including a personal computer, a desktop computer, a multi-screen computer, a laptop computer, a netbook, etc. Computing device 1210 can also be implemented as a mobile device-type device including mobile devices such as mobile phones, portable music players, portable gaming devices, tablet computers, multi-screen computers, etc. Computing device 1210 can also be implemented as a television-type device, which includes devices having or connected to generally larger screens in casual viewing environments. These devices include televisions, set-top boxes, game consoles, etc.

[0177] The techniques described herein can be supported by these various configurations of computing device 1210 and are not limited to the specific examples of the techniques described herein. Functionality can also be implemented in whole or in part on the "cloud" 1220 using a distributed system, such as through platform 1222 as described below.

[0178] Cloud 1220 includes and / or represents a platform 1222 for resources 1224. Platform 1222 abstracts the underlying functionality of the hardware (e.g., servers) and software resources of cloud 1220. Resources 1224 may include applications and / or data that can be used when executing computer processing on servers remote from computing device 1210. Resources 1224 may also include services provided over the Internet and / or over a subscriber network such as a cellular or Wi-Fi network.

[0179] The platform 1222 can abstract resources and functionality to connect the computing device 1210 with other computing devices. The platform 1222 can also be used to abstract hierarchies of resources to provide a corresponding level of hierarchy in the demand encountered for resources 1224 implemented via the platform 1222. Thus, in an interconnected device embodiment, the implementation of the functionality described herein can be distributed throughout the system 1200. For example, functionality can be implemented partially on the computing device 1210 and through the platform 1222 that abstracts the functionality of the cloud 1220.

[0180] The present disclosure provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed, any of the above methods is implemented.

[0181] The present disclosure provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computing device to perform any of the methods provided in the various optional implementations described above.

[0182] It should be understood that, for the sake of clarity, embodiments of the present disclosure have been described with reference to different functional units. However, it will be apparent that, without departing from the present disclosure, the functionality of each functional unit can be implemented in a single unit, in multiple units, or as a part of other functional units. For example, the functionality described as being performed by a single unit can be performed by multiple different units. Therefore, reference to a specific functional unit is only considered as a reference to the appropriate unit for providing the described functionality, rather than indicating a strict logical or physical structure or organization. Therefore, the present disclosure can be implemented in a single unit, or can be physically and functionally distributed between different units and circuits.

[0183] It will be understood that although the terms first, second, third, etc. may be used herein to describe various devices, elements, parts, or portions, these devices, elements, parts, or portions should not be limited by these terms. These terms are only used to distinguish one device, element, part, or portion from another device, element, part, or portion.

[0184] Although the present disclosure has been described in conjunction with some embodiments, it is not intended to be limited to the specific forms set forth herein. On the contrary, the scope of the present disclosure is limited only by the appended claims. Additionally, although individual features may be included in different claims, these may possibly be advantageously combined, and the inclusion in different claims does not imply that a combination of features is not feasible and / or advantageous. The order of the features in the claims does not imply any specific order in which the features must work. Furthermore, in the claims, the word "comprising" does not exclude other elements, and the term "a" or "an" does not exclude a plurality. The reference signs in the claims are provided merely as clear examples and should not be construed as limiting the scope of the claims in any way.

Claims

1. A training method for a classification network model for class prediction of energy consumption data, the classification network model comprising: A feature extractor for performing feature extraction on the energy consumption data to obtain extracted features; A feature dimension reducer that performs dimension reduction on the extracted features to obtain reduced-dimensional features; as well as A classifier for predicting energy consumption data categories based on the dimensionality reduction features, the classifier comprising an input layer, a hidden layer, and an output layer, wherein the training method comprises at least iteratively executing the following steps: providing the dimension-reduced features output by the feature dimension reducer to an input layer of a classifier, so as to output hidden layer data from the hidden layer; determining weight parameters for the output layer based on the hidden layer data, a target output for the classifier, and a regularization parameter; as well as An updated value for the regularization parameter is determined based on the current prediction error rate and the previous prediction error rate of the classifier and the current value of the regularization parameter, wherein the updated value of the regularization parameter represents the value of the regularization parameter in the next iteration of the current iteration, the current prediction error rate represents the prediction error of the classifier in the current iteration, and the previous prediction error rate represents the prediction error of the classifier in the previous iteration of the current iteration.

2. The training method of claim 1 , wherein determining weight parameters for the output layer based on the hidden layer data, a target output for the classifier, and a regularization parameter comprises: Determining initial weight parameters for the output layer using the hidden layer data, the target output, and the regularization parameter; Determining a super gradient of a weight parameter for the output layer based on the initial weight parameter and a hidden layer weight parameter for the hidden layer; as well as A dot product of the super gradient and the initial weight parameters is determined to obtain weight parameters for the output layer.

3. The training method according to claim 1, wherein the feature extractor is trained using a training sample dataset, wherein the training sample dataset includes an original sample dataset and a synthetic sample dataset obtained based on the original sample dataset, wherein the synthetic sample dataset is obtained by at least the following steps: Generate corresponding synthetic sample data according to each original sample data in the original sample data set and the adjacent sample data of the original sample data in the feature space, thereby obtaining a synthetic sample data set; Obtaining a quality assessment value for the synthetic sample data according to the distribution consistency and sample diversity of the synthetic sample data in the feature space in the synthetic sample data set; and A strategy for generating the synthetic sample data is adjusted based on a quality assessment value for the synthetic sample data.

4. The method according to claim 3, wherein generating corresponding synthetic sample data according to each original sample data in the original sample data set and the adjacent sample data of the original sample data in the feature space comprises: Determining a set of adjacent sample data of the original sample data in the feature space; determining a difference between the original sample data and neighboring sample data in the set of neighboring sample data; Obtaining a sample data difference according to a product of the difference and a proportional coefficient; The original sample data and the sample data difference are added in a feature space to obtain the synthesized sample data.

5. The method according to claim 4, wherein adjusting the strategy for generating the synthetic sample data based on the quality assessment value of the synthetic sample data comprises: In response to the quality assessment value being less than a first threshold, the scaling factor is increased.

6. The training method according to claim 3, wherein the process of obtaining the synthetic sample data set further comprises: determining a first evaluation value for the synthetic sample data according to the quality evaluation value and the predicted classification accuracy for the synthetic sample data; In response to the first evaluation value being greater than a second threshold, the synthetic sample data corresponding to the first evaluation value greater than the second threshold is discarded.

7. The training method according to claim 6, wherein the process of obtaining the synthetic sample data set further comprises: Determining the similarity between each synthetic sample data set in the synthetic sample data set and the original sample data based on the alternating least squares method; The synthetic sample data with similarity less than a similarity threshold is removed from the synthetic sample data set.

8. The training method according to claim 7, wherein obtaining a quality assessment value for the synthetic sample data according to the distribution consistency and sample diversity of the synthetic sample data in the feature space in the synthetic sample data set comprises: determining the quality assessment value based on a weighted sum of the distribution consistency and the sample diversity, Wherein determining the first evaluation value for the synthetic sample data according to the quality evaluation value and the predicted classification accuracy for the synthetic sample data comprises: The first evaluation value is determined based on a weighted sum of the quality evaluation value and the predicted classification accuracy.

9. The training method according to claim 1, wherein the feature extractor is obtained by training the training sample data set based on the whale optimization algorithm, and the process of training the feature extractor comprises at least iteratively performing the following steps: Determining an updated position of the whale based on the current position and the historical optimal position of the whale, wherein the current position represents the position of the whale in the current iteration, the historical optimal position represents the optimal position of the whale in each iteration before the current iteration, and the updated position represents the position of the whale in the next iteration. The position of each whale represents the parameters of the feature extractor; Determine the search step size based on the set total number of iterations and the current number of iterations; as well as The updated position of the whale is adjusted according to the difference between the previous position and the current position of the whale, the current position, the search step size, and an adjustment coefficient for the difference, wherein the previous position represents the position of the whale in the previous iteration.

10. The training method of claim 9, wherein the adjustment coefficient comprises a quotient between a standard deviation of changes in the fitness of the whale between successive iterations and a mean value of the changes.

11. The training method according to claim 9, wherein the process of training the feature extractor further comprises: A learning rate for the feature extractor is updated according to an initial learning rate and an iteration number, wherein the initial learning rate is determined based on the variance and the mean of the fitness of all whales.

12. The training method according to claim 9, wherein the historical optimal position comprises the position of the whale with the highest fitness in each round of iterations before the current iteration.

13. The training method according to claim 1, wherein the feature dimensionality reducer is obtained by training using the extracted features output by the feature extractor, the feature dimensionality reducer comprises an encoder and a decoder, and training the feature dimensionality reducer comprises iteratively performing the following steps: An encoder generates encoded data based on the extracted features; The decoder outputs a reconstructed feature based on the encoded data to reconstruct the extracted feature; determining a reconstruction error between the extracted features and the reconstructed features; Determining updated weight parameters for the encoder and decoder based on current weight parameters, current gradients, and previous gradients of the encoder and decoder, wherein the current weight parameters represent weight parameters of the encoder and decoder at a current iteration, the current gradient represents gradient information at the current iteration, the previous gradient represents gradient information of an iteration previous to the current iteration, and the updated weight parameters represent weight parameters for a next iteration of the encoder and decoder; Determining the feature importance of each extracted feature according to the reconstruction error, wherein the feature importance represents the degree of influence of the extracted feature on the reconstruction error; and Remove the extracted features whose feature importance is lower than the threshold.

14. The training method according to claim 13, wherein determining updated weight parameters for the encoder and decoder based on current weight parameters, current gradients, and previous gradients of the encoder and decoder comprises: Determining a historical gradient influencing factor based on the current gradient, the previous gradient, and the previous gradient, where the previous gradient represents gradient information of the previous iteration before the previous iteration; Determine the product of the historical gradient influence factor and the previous gradient to obtain a previous gradient component; Determine a weight parameter adjustment component according to the sum of the previous gradient component and the current gradient; A difference between the current weight parameter and the weight parameter adjustment component is determined to obtain the updated weight parameter.

15. The training method according to claim 14, wherein determining the weight parameter adjustment component according to the sum of the previous gradient component and the current gradient comprises: The weight parameter adjustment component is obtained by determining the product of the sum of the previous gradient component and the current gradient and the learning rate.

16. A device for predicting energy consumption data by category, comprising: a feature extraction module configured to perform feature extraction on the energy consumption data to obtain extracted features; A feature dimensionality reduction module, configured to perform dimensionality reduction on the extracted features to obtain dimensionality-reduced features; A classification module is configured to receive the dimensionality reduction features to predict the energy consumption data category, wherein the classification module includes an input layer, a hidden layer, and an output layer, wherein the training process for the classification module includes at least iteratively executing the following steps: providing the dimension-reduced features output by the feature dimension reducer to an input layer of a classifier, so as to output hidden layer data from the hidden layer; determining weight parameters for the output layer based on the hidden layer data, a target output for the classifier, and a regularization parameter; as well as An updated value for the regularization parameter is determined based on the current prediction error rate and the previous prediction error rate of the classifier and the current value of the regularization parameter, wherein the updated value of the regularization parameter represents the value of the regularization parameter in the next iteration of the current iteration, the current prediction error rate represents the prediction error of the classifier in the current iteration, and the previous prediction error rate represents the prediction error of the classifier in the previous iteration of the current iteration.

17. A computing device comprising: a memory configured to store computer-executable instructions; as well as A processor configured to perform the method according to any one of claims 1 to 15 when the computer executable instructions are executed by the processor.

18. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions implement the method according to any one of claims 1 to 15 when executed.

19. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 15.