Training method and device of electricity consumption information prediction model and electricity consumption information prediction method
Through the deep learning power consumption information prediction model, the problem of balance of prediction accuracy and efficiency in the power market is solved, and intelligent completion and efficient prediction of missing information in the power consumption information database is achieved.
Patent Information
- Application Number
- CN202510920172.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-07-04
AI Technical Summary
How to balance prediction accuracy and computing efficiency in the power market, especially in the prediction of electricity consumption information, to deal with the problem of missing information in the database.
The power consumption information prediction model based on deep learning is adopted. By inputting sample quadruples into neural networks, the sensitivity feature change rate is calculated, and the model parameters are adjusted using training losses to achieve intelligent completion of missing information.
It improves the accuracy and efficiency of power consumption information prediction, can intelligently complete missing information in the database, and provide more efficient prediction results.
Smart Images

Figure CN120409854B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, in particular to the fields of artificial intelligence and deep learning, and more specifically to a training method and device for an electricity consumption information prediction model and an electricity consumption information prediction method. Background Art
[0002] With the opening of power markets and the increasing share of renewable energy, electricity price volatility has intensified. Research is focusing on hybrid forecasting models that combine decomposition algorithms with deep learning, as well as methods that consider external variables such as weather and policies. Furthermore, probabilistic forecasting and uncertainty quantification techniques are also gaining traction as a way to address power market risks.
[0003] However, how to balance prediction accuracy and computational efficiency remains a key challenge in the field of electricity consumption information forecasting. Summary of the Invention
[0004] In view of this, the present invention provides a method and device for training an electricity usage information prediction model and an electricity usage information prediction method.
[0005] One aspect of the present invention provides a method for training an electricity consumption information prediction model, comprising: inputting a sample quadruple consisting of a head entity object representing an electricity consumption area, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity total value attribute, and a time object representing timestamp information into a first neural network of the electricity consumption information prediction model to obtain a sample embedding matrix representation of the sample quadruple; inputting the sample embedding matrix representation into a second neural network of the electricity consumption information prediction model to obtain a sensitivity feature change rate of each of the electricity consumption area, the electricity consumption unit value attribute, and the electricity total value attribute represented by the sample quadruple relative to a target moment represented by the time object; and inputting the sensitivity feature change rate into a second neural network of the electricity consumption information prediction model to obtain a sensitivity feature change rate of each of the electricity consumption area, the electricity consumption unit value attribute, and the electricity total value attribute represented by the sample quadruple relative to a target moment represented by the time object. The third neural network of the electricity consumption information prediction model calculates a matching evaluation value prediction result of the prediction information determined for the target entity object in the sample quadruple relative to the real information represented by other objects in the sample quadruple, the target entity object represents the head entity object or the tail entity object, the other objects represent objects other than the target entity object in the sample quadruple, and the sample quadruple has a matching evaluation value real label; the training loss is calculated based on the sample embedding matrix representation, the matching evaluation value real label and the matching evaluation value prediction result; the training loss is used to adjust the model parameters of the first neural network, the second neural network and the third neural network to obtain a trained electricity consumption information prediction model.
[0006] Another aspect of the present invention provides an electricity consumption information prediction method, including: obtaining a to-be-completed quadruple consisting of a head entity object representing an electricity consumption area, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity consumption total value attribute, and a time object representing timestamp information, wherein the information represented by the to-be-completed object in the to-be-completed quadruple is empty, and the to-be-completed object represents the head entity object or the tail entity object; inputting the to-be-completed quadruple into an electricity consumption information prediction model to obtain a target completed result determined for the to-be-completed object, and outputting a completed quadruple including the target completed result, wherein the electricity consumption information prediction model is trained using the training method of the electricity consumption information prediction model disclosed herein.
[0007] Another aspect of the present invention provides a training device for an electricity consumption information prediction model, comprising: a first neural network module for inputting a sample quadruple consisting of a head entity object representing an electricity consumption area, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity total value attribute, and a time object representing timestamp information into the first neural network of the electricity consumption information prediction model to obtain a sample embedding matrix representation of the sample quadruple; a second neural network module for inputting the sample embedding matrix representation into the second neural network of the electricity consumption information prediction model to obtain the sensitivity feature change rate of the electricity consumption area, the electricity consumption unit value attribute, and the electricity total value attribute represented by the sample quadruple relative to the target moment represented by the time object; a third neural network module for inputting The sensitivity feature change rate is input into the third neural network of the electricity consumption information prediction model, and a matching evaluation value prediction result of the prediction information determined for the target entity object in the sample quadruple relative to the real information represented by other objects in the sample quadruple is calculated, the target entity object represents the head entity object or the tail entity object, and the other objects represent objects other than the target entity object in the sample quadruple, and the sample quadruple has a matching evaluation value real label; a loss module is used to calculate the training loss based on the sample embedding matrix representation, the matching evaluation value real label and the matching evaluation value prediction result; a training module is used to use the training loss to adjust the model parameters of the first neural network, the second neural network and the third neural network to obtain a trained electricity consumption information prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0009] Figure 1 An exemplary system architecture is shown in which at least one of a training method for a power consumption information prediction model and a power consumption information prediction method according to an embodiment of the present invention can be applied;
[0010] Figure 2A flowchart of a method for training a power consumption information prediction model according to an embodiment of the present invention is shown;
[0011] Figure 3 A flowchart of a method for predicting electricity consumption information according to an embodiment of the present invention is shown;
[0012] Figure 4 A model architecture diagram of a sensitivity-driven method based on differential equations for predicting power consumption information according to an embodiment of the present invention is shown;
[0013] Figure 5A A functional module diagram of a power consumption information prediction system constructed based on a sensitivity driven method of differential equations according to an embodiment of the present invention is shown;
[0014] Figure 5B The figure shows an overall flow chart of power consumption information prediction based on a sensitivity driven method based on differential equations according to an embodiment of the present invention;
[0015] Figure 6 A block diagram of a training device for a power consumption information prediction model according to an embodiment of the present invention is shown;
[0016] Figure 7 A block diagram of a device for predicting power consumption information according to an embodiment of the present invention is shown;
[0017] Figure 8 A block diagram of an electronic device suitable for implementing at least one of a training method for a power usage information prediction model and a power usage information prediction method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0018] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concept of the present invention.
[0019] The electricity usage prediction system can be understood as a task of predicting unknown facts based on existing facts, thereby assisting in cost calculation. Therefore, as a structured representation of real-world quadruple data, the electricity usage prediction system can provide support for many fields, including search, recommendation systems, natural language processing, and question answering.
[0020] Typically, a quadruple is in the form of (head entity, relationship, tail entity, timestamp). Existing quadruple databases already accommodate highly complex information, but most still suffer from significant information gaps. This missing information severely limits data accuracy, necessitating urgent improvement. Related technologies often rely on manual search and completion. However, due to significant cost and accuracy constraints, the application of algorithms to intelligent search and completion is crucial.
[0021] Figure 1 An exemplary system architecture 100 is shown to which at least one of the training method for a power consumption information prediction model and the power consumption information prediction method according to an embodiment of the present invention can be applied. Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present invention may be applied, to help those skilled in the art understand the technical content of the present invention, but do not mean that the embodiments of the present invention cannot be used in other devices, systems, environments or scenarios.
[0022] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0023] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software (for example only).
[0024] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0025] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.
[0026] It should be noted that at least one of the methods for training an application power consumption information prediction model and the power consumption information prediction method provided in the embodiments of the present invention can generally be executed by the server 105. Accordingly, at least one of the methods for training an application power consumption information prediction model and the power consumption information prediction device provided in the embodiments of the present invention can generally be set in the server 105. At least one of the methods for training an application power consumption information prediction model and the power consumption information prediction method provided in the embodiments of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, at least one of the methods for training an application power consumption information prediction model and the power consumption information prediction device provided in the embodiments of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Alternatively, at least one of the methods for training an application power consumption information prediction model and the power consumption information prediction method provided in the embodiments of the present invention may also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may also be executed by a terminal device other than the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, at least one of the apparatus for training an application power consumption information prediction model and the apparatus for power consumption information prediction provided in the embodiments of the present invention may also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may be provided in a terminal device other than the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0027] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0028] Figure 2 A flowchart of a method for training an electricity consumption information prediction model according to an embodiment of the present invention is shown.
[0029] like Figure 2As shown, the method includes operations S201 to S205.
[0030] In operation S201, a sample quadruple consisting of a head entity object representing an electricity consumption area, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity total value attribute, and a time object representing timestamp information is input into the first neural network of an electricity consumption information prediction model to obtain a sample embedding matrix representation of the sample quadruple.
[0031] According to an embodiment of the present invention, in an electricity consumption information prediction scenario, a sample quadruple can be represented as (electricity consumption region, electricity unit value attribute, total electricity consumption value attribute, timestamp). The first neural network can use various encoding networks to encode the sample quadruple to obtain a sample embedding matrix representation. The specific encoding method is not limited here. For example, the sample quadruple can be encoded as a whole to obtain a sample embedding matrix representation. Alternatively, the four elements in the sample quadruple can be encoded separately to obtain four encoding vectors, and the sample embedding matrix representation can be obtained by performing matrix transformation on the four encoding vectors.
[0032] In operation S202, the sample is embedded into the matrix representation of the second neural network of the input electricity consumption information prediction model to obtain the sensitivity characteristic change rate of the electricity consumption area, electricity unit value attribute and total electricity value attribute represented by the sample quadruple relative to the target moment represented by the time object.
[0033] According to an embodiment of the present invention, the second neural network may use various feature extraction networks to perform feature extraction on the sample embedding matrix representation to obtain the sensitivity feature change rate.
[0034] According to an embodiment of the present invention, the electricity consumption region, the unit value attribute of electricity consumption, and the total value attribute of electricity consumption can each have a certain sensitivity characteristic relative to any moment. The sensitivity characteristic can reflect the instantaneous response of the electricity consumption region, the unit value attribute of electricity consumption, and the total value attribute to changes over time, that is, their "sensitivity." The sensitivity characteristic change rate can indicate the speed at which the sensitivity characteristics of the electricity consumption region, the unit value attribute of electricity consumption, and the total value attribute change over time, that is, "how fast the sensitivity changes."
[0035] In operation S203, the sensitivity feature change rate is input into the third neural network of the electricity consumption information prediction model, and a matching evaluation value prediction result of the prediction information determined for the target entity object in the sample quadruple relative to the real information represented by other objects in the sample quadruple is calculated, the target entity object represents the head entity object or the tail entity object, and the other objects represent objects other than the target entity object in the sample quadruple, and the sample quadruple has a matching evaluation value real label.
[0036] According to an embodiment of the present invention, the third neural network can utilize various deep learning networks with learning capabilities. The sample quadruple input to the electricity usage information prediction model is (electricity usage region, electricity unit value attribute, total electricity value attribute, timestamp). The electricity usage region, electricity unit value attribute, total electricity value attribute, and timestamp all use real information. The matching evaluation value and real label can be calculated based on the real information of the electricity usage region, electricity unit value attribute, and total electricity value attribute.
[0037] According to an embodiment of the present invention, during the processing stage of the third neural network, prediction information for each target entity object prediction can be determined based on the real information of the target entity object learned from the training set. The training set can represent a set of multiple sample quads. Then, for each piece of prediction information, the degree of match between it and the real information can be calculated to obtain the predicted matching evaluation value.
[0038] For example, based on the learned real-world information about total electricity value, the predicted total electricity value attribute for the tail entity object in the sample quad can be determined. The degree of match between the predicted total electricity value attribute and the real-world information about the electricity consumption region and the real-world information about the electricity consumption unit value attribute in the sample quad can then be calculated to obtain the predicted matching evaluation value.
[0039] For example, based on the learned real-world information about electricity consumption regions, predicted electricity consumption region information for the head entity object in the sample quadruple can be determined. The degree of match between the electricity consumption region and the real-world information about the unit value attribute, the real-world information about the total value attribute, and / or the real-world timestamp information in the sample quadruple can then be calculated to obtain the predicted matching evaluation value.
[0040] It should be noted that in some embodiments, in the process of calculating the matching evaluation value prediction result, the matching degree between the predicted information and the real information of the timestamp can also be calculated, and then the matching degree between the predicted information and other real information can be combined to obtain the above-mentioned matching evaluation value prediction result, which is not limited here.
[0041] In operation S204, the training loss is calculated based on the sample embedding matrix representation, the true label of the matching evaluation value, and the matching evaluation value prediction result.
[0042] In operation S205 , the model parameters of the first neural network, the second neural network, and the third neural network are adjusted using the training loss to obtain a trained power usage information prediction model.
[0043] According to an embodiment of the present invention, based on actual business needs, the regularization loss can be constructed by combining the sample embedding matrix representation, the true label of the matching evaluation value and the matching evaluation value prediction result, and the regularization loss value can be calculated. The regularization loss value can then be used to adjust the model parameters of each network in the electricity consumption information prediction model until the loss converges, and a trained electricity consumption information prediction model can be obtained.
[0044] The above-described embodiments of the present invention combine data prediction and model training with the sensitivity feature change rate, effectively integrating differential theory and better learning the relevant features of each object from the perspective of the sensitivity feature change rate. The trained electricity usage information prediction model obtained through this learning process can reasonably supplement or predict facts in a more efficient, transparent, and explainable manner, and can more accurately solve the electricity usage information prediction problem.
[0045] In conjunction with specific embodiments, Figure 2 The method shown is further explained.
[0046] According to an embodiment of the present invention, encoding based on the first neural network may employ one-hot encoding. Operation S201 may include: performing one-hot encoding on the electricity consumption region represented by the head entity object, the electricity consumption unit value attribute represented by the relationship object, the electricity consumption total value attribute represented by the tail entity object, and the timestamp information represented by the time object, respectively, to obtain a region binary vector, a unit value attribute binary vector, a total value attribute binary vector, and a time binary vector. Matrix conversion is then performed on the region binary vector, the unit value attribute binary vector, the total value attribute binary vector, and the time binary vector to obtain a sample embedding matrix representation.
[0047] For example, for a dataset of sample quads, one-hot encoding can be used to encode the sample quads. Specifically, each entity object in the dataset Expressed as dimensional one-hot binary vector, including: let the head entity object The i-th element and the tail entity object The i-th element of is equal to 1, and the other elements are set to 0. For each relationship object Represented as an l-dimensional one-hot binary vector, including: let the relationship object The jth element of is set to 1, and the rest of the elements are set to 0. Similarly, the event object can be encoded accordingly to obtain the corresponding one-hot binary vector. The encoding process is then completed. The one-hot binary vectors of the four objects are transformed into a matrix to obtain the sample embedding matrix representation. For example, it can be expressed as .in, It can represent the one-hot binary vector related to the electricity consumption area in the sample embedding matrix representation. It can represent the one-hot binary vector related to the value attribute of the electricity unit in the sample embedding matrix representation. It can represent the one-hot binary vector related to the total value of electricity consumption in the sample embedding matrix representation. It can represent the one-hot binary vector associated with the timestamp information in the sample embedding matrix representation.
[0048] According to an embodiment of the present invention, operation S202 may include: performing feature extraction on the sample embedding matrix representation to obtain sensitivity characteristics of the electricity consumption region, the unit value attribute, and the total value attribute at the target time. Extracting state change characteristics of the sample quadruple at the target time based on the sensitivity characteristics and the target embedding matrix representation of at least one target quadruple representing the target time obtained from the quadruple dataset. Noising the state change characteristics to obtain a sensitivity characteristic change rate.
[0049] According to an embodiment of the present invention, the four-tuple dataset may include the aforementioned training set, or may include other datasets having corresponding formats, without limitation herein. The target embedding matrix representation may have the same or similar technical features as the sample embedding matrix representation, without limitation herein.
[0050] According to embodiments of the present invention, the real information about the electricity consumption region, unit value attribute, and total value attribute at any given moment can be used to reflect the state characteristics of the electricity consumption region, unit value attribute, and total value attribute at that moment, i.e., the "real information." The state change characteristics can represent the speed at which the state characteristics of the electricity consumption region, unit value attribute, and total value attribute change over time, i.e., the "speed of change of the real information."
[0051] For example, for a given training set, we can first use the sensitivity-driven stochastic delay differential equations (SDDE) to divide its sensitivity and perform feature interaction, so that we can use the sensitivity of entities and relationships to find a more accurate answer in the final prediction. The specific formula is shown in Formula (1).
[0052] (1)
[0053] in, Indicates that the electricity consumption area, electricity consumption unit value attribute, and total electricity consumption value attribute in the sample quadruple are The sensitivity of the moment, The matrix representation of the one-hot binary vectors of the three attributes of electricity consumption area, electricity unit value attribute, and total electricity value attribute with time-sensitive dependency in the sample embedding matrix representation is represented. Represents the sample embedding matrix representation The electricity consumption area, electricity consumption unit value attribute and total electricity consumption value attribute in the represented sample quadruple are State characteristics at the moment.
[0054] By performing derivative operations on the sample embedding matrix representation in the differential equation, the SDDE solution can be used to obtain the state change characteristics and sensitivity characteristic change rate at a specific moment. The form of the SDDE in a continuous time period can be shown in Formula (2), for example.
[0055] (2)
[0056] in, Indicates the starting time point, Indicates the output time point, express The sensitivity of the moment, express The sensitivity of the moment, is the drift term, which represents the time interval and The characteristic changes between is the diffusion term, which represents random changes, is a random noise function, represents a small increment of Brownian motion.
[0057] After taking the derivative of formula (2), we can get the SDDE expression as shown in formula (3).
[0058] (3)
[0059] in, Indicates that the time part of the quadruple data set is The target embedding matrix representation of the target quadruple at the moment is, It represents the rate of change of the sensitivity characteristics of the electricity consumption area, electricity consumption unit value attribute and total electricity consumption value attribute in continuous time changes. Indicates that the sample quadruple is The state change characteristics of the moment, Indicates the noise part.
[0060] According to business needs, the noise part in formula (3) Can be used or deleted selectively.
[0061] According to an embodiment of the present invention, performing noise processing on the state change feature to obtain the sensitivity feature change rate may include calculating a random noise vector based on the sensitivity feature, the target time, and the target embedding matrix representation. Noising the state change feature using the random noise vector to obtain the sensitivity feature change rate.
[0062] In this embodiment, the random noise vector can be, for example, the noise part in formula (3) , and may not be limited thereto.
[0063] According to an embodiment of the present invention, other objects may include relationship objects and other entity objects other than the target entity object in the sample quadruple, and the sensitivity feature change rate may include the relationship sensitivity feature change rate related to the relationship object and the entity sensitivity feature change rate related to other entity objects. The above operation S203 may include: extracting the state features exhibited by the sample quadruple at the target moment according to the sensitivity features and the sample embedding matrix representation. Calculate the relationship sensitivity matching evaluation value between the predicted information and the real information represented by the relationship object based on the predicted information and the relationship sensitivity feature change rate. Calculate the entity sensitivity matching evaluation value between the predicted information and the real information represented by other entity objects based on the predicted information and the entity sensitivity feature change rate. Calculate the matching evaluation value prediction result of the predicted information relative to the real information based on the relationship sensitivity matching evaluation value, the entity sensitivity matching evaluation value and the state features.
[0064] Based on the above formula (1), the state characteristics can be obtained Based on this, for example, a scoring function can be constructed to calculate the predicted matching evaluation value. The scoring function can rely on the joint embedding and sensitivity characteristics of the electricity consumption region, the unit value attribute of electricity consumption, the total value attribute of electricity consumption, and time, and can be dynamically updated over time.
[0065] Based on the target entity object being the tail entity object representing the total value of electricity consumption, other objects may include the head entity object representing the electricity consumption region and the relationship object representing the unit value of electricity consumption. For this embodiment, the scoring function may be specifically shown as formula (4).
[0066] (4)
[0067] in, A scoring function is used to calculate the compatibility between the electricity consumption region, the electricity consumption unit value attribute and the total electricity consumption value attribute. is the training round, Indicates the round. Indicates the rate of change of the sensitivity feature of the head entity, Indicates the rate of change of the relationship sensitivity feature. and They are Processing and application of entity and relationship sensitivity features at all times, It represents the entity sensitivity matching evaluation value between the predicted information of the total value of electricity consumption and the real information of the electricity consumption area. Represents the sensitivity matching evaluation value of the relationship between the total value attribute prediction information of electricity consumption and the unit value attribute of electricity consumption. 、 is the weight coefficient.
[0068] According to business needs, the formula (4) 、 and Can be used or deleted selectively.
[0069] According to an embodiment of the present invention, there may be multiple prediction results for the target entity object prediction. On this basis, based on the above formula (4), there may be multiple matching evaluation value prediction results. The above operation S204 may include: normalizing the multiple matching evaluation value prediction results to obtain matching evaluation value normalization results. Based on the matching evaluation value true label and the matching evaluation value normalization result, the conditional probability of the matching evaluation value true label under the conditions represented by the multiple matching evaluation value normalization results is calculated. Based on the conditional probability, the relationship-sensitive matching evaluation value and the entity-sensitive matching evaluation value, the training loss is calculated.
[0070] Corresponding to the above embodiment in which the target entity object is the tail entity object representing the total value attribute of electricity consumption, other objects include the head entity object representing the electricity consumption area and the relationship object representing the value attribute of the electricity consumption unit. The conditional probability of the total value attribute of electricity consumption can be determined by scoring using the scoring function shown in formula (4). The conditional probability function for predicting the total value attribute of electricity consumption can be shown in formula (5).
[0071] (5)
[0072] in, Represents the total value attribute prediction information of electricity consumption, It is the collection of all predicted electricity consumption total value attribute prediction information, and the sum in the denominator is the normalization of all electricity consumption total value attribute prediction information. It represents the conditional probability of the true information of the total value of electricity consumption attribute under the condition represented by the normalized result of the matching evaluation value of all the predicted information of the total value of electricity consumption attribute.
[0073] The loss function defined for the electricity consumption information prediction model can be shown as formula (6).
[0074] (6)
[0075] in, represents the training loss. is a four-tuple dataset, 、 is the regularization parameter.
[0076] It should be noted that, based on the target entity object being the head entity object representing the electricity consumption region, other objects may include a tail entity object representing the total electricity consumption value attribute and a relationship object representing the unit electricity consumption value attribute. For this embodiment, the above formulas (4) to (6) can be transformed accordingly to facilitate the prediction of the electricity consumption region and the calculation of the matching evaluation value between the predicted electricity consumption region information and the actual information of the unit electricity consumption value attribute and the actual information of the total electricity consumption value attribute.
[0077] The model uses the sensitivity features and the matching evaluation value of the target entity object prediction results in the sample quadruple to produce the final training loss, which is used as the training target for optimizing the model.
[0078] According to an embodiment of the present invention, the relationship sensitivity matching evaluation value has a relationship sensitivity weight coefficient, and the entity sensitivity matching evaluation value has an entity sensitivity weight coefficient. The above operation S205 may include: using training loss to adjust the relationship sensitivity weight coefficient and the entity sensitivity weight coefficient.
[0079] For example, for formula (4) 、 , which can be learned and updated at each time step during training.
[0080] It should be noted that the model parameters updated during the training process are not limited to 、 In actual implementation, other model parameters in the electricity consumption information prediction model may also be included, which are not limited here.
[0081] Through the above embodiments of the present invention, a mine power consumption information prediction model based on differential equations can be trained. Based on the power consumption information prediction model, a power consumption information prediction system can be constructed to implement power consumption information prediction.
[0082] Figure 3 A flow chart of a method for predicting electricity usage information according to an embodiment of the present invention is shown.
[0083] like Figure 3 As shown, the method includes operations S301-S302.
[0084] In operation S301, a quadruple to be completed is obtained, which is composed of a head entity object representing the electricity consumption area, a relationship object representing the value attribute of the electricity consumption unit, a tail entity object representing the total value attribute of electricity consumption, and a time object representing the timestamp information, wherein the information represented by the object to be completed in the quadruple to be completed is empty, and the object to be completed represents the head entity object or the tail entity object.
[0085] In operation S302 , the quadruple to be completed is input into the electricity consumption information prediction model to obtain a target completed result determined for the object to be completed, and a completed quadruple including the target completed result is output.
[0086] For the electricity consumption information prediction system, its main task focuses on completing the missing four-tuple (head entity, relationship, tail entity, timestamp). Missing information can be represented by the null value NULL, that is, the prediction and completion of the missing four-tuples (head entity, relationship, NULL, timestamp) and (NULL, relationship, tail entity, timestamp) waiting to be completed.
[0087] According to an embodiment of the present invention, the above-mentioned operation S302 may include: inputting the quadruple to be completed into the electricity consumption information prediction model to obtain multiple candidate completed results determined for the object to be completed. Calculating a candidate matching evaluation value prediction result for each candidate completed result relative to the real information represented by other objects in the quadruple to be completed to obtain multiple candidate matching evaluation value prediction results, where the other objects represent objects other than the object to be completed in the quadruple to be completed. The candidate completed result used to calculate the target matching evaluation value prediction result with the largest value among the multiple candidate matching evaluation value prediction results is determined as the target completed result.
[0088] It should be noted that the object to be completed has the same or similar technical features as the aforementioned target entity object. The candidate completed result has the same or similar technical features as the aforementioned prediction result. The candidate matching evaluation value prediction result has the same or similar technical features as the aforementioned matching evaluation value prediction result. No further details will be given here.
[0089] For each quadruple to be completed in a given test set, the trained electricity consumption information prediction model can be used to calculate the scoring function shown in formula (4). The candidate completed result with the highest score is automatically identified as the target completed result. By traversing all the quadruple to be completed in the test set, the test set inference and data completion can be completed.
[0090] Through the above-described embodiments of the present invention, a differential equation-based electricity consumption information prediction method is implemented, which can perform real-time intelligent prediction and completion of the database, and can intelligently infer future facts and present the results. Compared with other methods, this method can reasonably complete or predict facts with higher efficiency and interpretability. In addition, by introducing mathematical models into system applications and presenting them in a black box format, the system interface is simple and does not require any technical skills from the operator.
[0091] Figure 4 A model architecture diagram for predicting electricity consumption information using a sensitivity-driven method based on differential equations according to an embodiment of the present invention is shown.
[0092] like Figure 4 As shown, the electricity consumption information prediction model 400 includes an embedding processing module 410 , a sensitivity perception module 420 , and a result prediction module 430 .
[0093] During model training, the embedding processing module 410 receives (electricity usage region, electricity unit value attribute, total electricity value attribute, timestamp) as input and outputs an embedding matrix representation of (electricity usage region, electricity unit value attribute, total electricity value attribute, timestamp). The sensitivity perception module 420 receives the embedding matrix representation as input, performs vector sensitivity partitioning, and outputs the sensitivity feature change rate of the electricity usage region, electricity unit value attribute, and total electricity value attribute relative to the timestamp. The result prediction module 430 receives the sensitivity feature change rate as input and outputs a predicted match evaluation value for the electricity usage region or total electricity value attribute in (electricity usage region, electricity unit value attribute, total electricity value attribute, timestamp) relative to other real information. Subsequently, the training loss can be calculated in conjunction with the loss function to adjust the model parameters in the electricity usage information prediction model 400, resulting in a trained electricity usage information prediction model.
[0094] During model application, the entity and relationship embedding processing module 410 is configured to receive, for example, (electricity consumption region, electricity unit value attribute, NULL, timestamp) as input and output an embedding matrix representation of (electricity consumption region, electricity unit value attribute, NULL, timestamp). The sensitivity perception module 420 is configured to receive the embedding matrix representation as input and output the sensitivity feature change rate of the electricity consumption region and electricity unit value attribute relative to the timestamp. The result prediction module 430 can receive the sensitivity feature change rate as input and output the predicted total electricity value attribute with the highest matching evaluation value, as the completion result for the NULL value in (electricity consumption region, electricity unit value attribute, NULL, timestamp).
[0095] Figure 5AThe figure shows a functional module diagram of a power consumption information prediction system constructed based on a sensitivity driving method of differential equations according to an embodiment of the present invention.
[0096] like Figure 5A As shown, the power consumption information prediction system 500 constructed based on the sensitivity-driven method of differential equations includes a database module 510 , a data import and processing module 520 , a sensitivity-driven prediction module 530 and a system maintenance module 540 .
[0097] The following will be combined Figure 5B right Figure 5A The functions of each module are described in the following.
[0098] Figure 5B The figure shows an overall flow chart of electricity consumption information prediction based on a sensitivity driven method based on differential equations according to an embodiment of the present invention.
[0099] like Figure 5B As shown, the method includes operations S501 to S509.
[0100] In operation S501 , the data set to be completed is divided into a training set, a validation set, and a test set.
[0101] This operation imports and stores the dataset to be completed into database module 510. This includes clicking "Import Data" on the page, selecting the dataset to be imported from the folder, and clicking "Upload" to complete the data import operation. The dataset can then be divided into a training set T, a validation set V, and a test set S in a ratio of 8:1:1.
[0102] In operation S502 , the data set is structured.
[0103] Corresponding to this operation, the data import and processing module 520 can be combined to read the data set selected in the database module 510, and the imported data can be organized into a structured form to facilitate subsequent model processing. Specific steps for structuring: Use the Language Technology Plantform (LTP) to perform entity extraction, relationship extraction, entity unification, and reference resolution on the data set in sequence. Among them: entity extraction, that is, entity recognition, including entity detection and classification. Relation extraction can be generally understood as quadruple extraction, that is, a data set can be represented as a quadruple form of (head entity, relationship, tail entity, timestamp). Entity unification, unify the entity names of the same entity referred to by different names. Reference resolution, represent the object referred to by the pronoun as the entity name of the object.
[0104] In operation S503 , the structured data set is encoded.
[0105] Corresponding to this operation, one-hot encoding can be used to implement encoding.
[0106] In operation S504 , a power consumption information prediction model is established. The model includes two parts: a score function and a loss function.
[0107] Corresponding to this operation, the construction of the electricity consumption information prediction model can be achieved by establishing a relationship interaction block decomposition model and driving the prediction module 530 based on the sensitivity.
[0108] In operation S505 , model hyperparameters are set based on the sensitivity-driven differential equation.
[0109] Corresponding to this operation, you can set the initial model parameters learning rate, including: learning rate, batch size, ent_vec_dim, rel_vec_dim, tem_vec_dim, epoch, etc., but not limited to these, as shown in Table 1.
[0110] Table 1:
[0111]
[0112] In operation S506 , the model is trained using the training set until the model loss function converges.
[0113] Corresponding to this operation, model training can be implemented based on the above formulas (1) to (6), which will not be described in detail here.
[0114] In operation S507 , the trained model is used to complete the test set.
[0115] Corresponding to this operation, the trained electricity consumption information prediction model can be used to complete the test set S, including: inputting the quadruple to be completed into the model, calculating the matching evaluation value prediction result based on the scoring function, and the one with the highest evaluation value is the search result.
[0116] In operation S508 , the model is evaluated using evaluation indicators.
[0117] Corresponding to this operation, the effectiveness of the above-mentioned electricity consumption information prediction model based on differential equations can be evaluated and verified through experiments, including: calculating correlation coefficients such as the mean reciprocal rank (MRR) of experimental evaluation indicators, the proportion of correct answers appearing in the first result (Hit@1), the proportion of correct answers appearing in the first three results (Hit@3), and the proportion of correct answers appearing in the first ten results (Hit@10), so as to evaluate the model. Comparative experiments are used to evaluate and verify the calculation results to achieve evaluation of the model.
[0118] The summary table of experimental evaluation indicators is shown in Table 2, which shows the performance of SDDE with a classic model for knowledge graph representation learning (TransE), a knowledge graph embedding model based on bilinear transformation (DistMult, DisMult), a knowledge graph embedding model (RotatE), a knowledge graph embedding model based on complex vector space (Complex Embeddings, ComplEx), a knowledge graph embedding model based on convolutional neural network (ConvE), a graph neural network model specifically for processing multi-relational graph data (Relational Graph Convolutional Network, R-GCN), a temporal knowledge graph reasoning model based on graph convolutional network (Recurrent Evolutionary Graph Convolutional Network, RE-GCN), a model for image processing and computer vision (Generalized Hough Transform, GHT), an advanced artificial intelligence model that combines retrieval-augmented generation technology and language transformation model (Retrieval-Augmented Generation Language Transformer (rGalT for short) comparison results.
[0119] Table 2:
[0120]
[0121] In operation S509 , the search prediction results are visually displayed.
[0122] In the entire process of the above operations S501 to S509 , real-time maintenance can be performed in conjunction with the system maintenance module 540 .
[0123] Figure 6 A block diagram of a training device for an electricity usage information prediction model according to an embodiment of the present invention is shown.
[0124] like Figure 6 As shown, the training device 600 for the electricity consumption information prediction model includes a first neural network module 610, a second neural network module 620, a third neural network module 630, a loss module 640 and a training module 650.
[0125] The first neural network module 610 is used to input a sample quadruple consisting of a head entity object representing an electricity consumption area, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity total value attribute, and a time object representing timestamp information into the first neural network of the electricity consumption information prediction model to obtain a sample embedding matrix representation of the sample quadruple.
[0126] The second neural network module 620 is used to embed the sample into the matrix representation of the second neural network of the input electricity consumption information prediction model, and obtain the sensitivity characteristic change rate of the electricity consumption area, electricity unit value attribute and total electricity value attribute represented by the sample quadruple relative to the target moment represented by the time object.
[0127] The third neural network module 630 is used to input the sensitivity feature change rate into the third neural network of the electricity consumption information prediction model, and calculate the matching evaluation value prediction result of the prediction information determined for the target entity object in the sample quadruple relative to the real information represented by other objects in the sample quadruple, where the target entity object represents the head entity object or the tail entity object, and the other objects represent objects other than the target entity object in the sample quadruple, and the sample quadruple has a matching evaluation value real label.
[0128] The loss module 640 is used to calculate the training loss based on the sample embedding matrix representation, the true label of the matching evaluation value, and the matching evaluation value prediction result.
[0129] The training module 650 is used to adjust the model parameters of the first neural network, the second neural network and the third neural network respectively by using the training loss to obtain a trained electricity consumption information prediction model.
[0130] According to an embodiment of the present invention, the second neural network module includes a sensitivity feature extraction unit, a state change feature extraction unit and a noise addition unit.
[0131] The sensitivity feature extraction unit is used to extract features from the sample embedding matrix representation to obtain the sensitivity features of the electricity consumption area, electricity consumption unit value attribute and total electricity consumption value attribute at the target time.
[0132] The state change feature extraction unit is used to extract the state change features of the sample quadruple at the target moment based on the sensitivity feature and the target embedding matrix representation of at least one target quadruple representing the target moment of the time object obtained from the quadruple data set.
[0133] The noise adding unit is used to perform noise processing on the state change feature to obtain the sensitivity feature change rate.
[0134] According to an embodiment of the present invention, the noise adding unit includes a random noise vector calculation subunit and a noise adding subunit.
[0135] The random noise vector calculation subunit is used to calculate the random noise vector according to the sensitivity feature, the target moment and the target embedding matrix representation.
[0136] The noise adding subunit is used to perform noise adding processing on the state change feature using a random noise vector to obtain the sensitivity feature change rate.
[0137] According to an embodiment of the present invention, other objects include relationship objects and other entity objects in the sample quadruple except the target entity object, and the sensitivity feature change rate includes the relationship sensitivity feature change rate related to the relationship object and the entity sensitivity feature change rate related to other entity objects. The third neural network module includes a state feature extraction unit, a relationship sensitivity matching evaluation value calculation unit, an entity sensitivity matching evaluation value calculation unit, and a matching evaluation value prediction result calculation unit.
[0138] The state feature extraction unit is used to extract the state features of the sample quadruple at the target time based on the sensitivity features and the sample embedding matrix representation.
[0139] The relationship sensitivity matching evaluation value calculation unit is used to calculate the relationship sensitivity matching evaluation value between the predicted information and the real information represented by the relationship object based on the predicted information and the relationship sensitivity feature change rate.
[0140] The entity sensitivity matching evaluation value calculation unit is used to calculate the entity sensitivity matching evaluation value between the predicted information and the real information represented by other entity objects based on the predicted information and the change rate of the entity sensitivity feature.
[0141] The matching evaluation value prediction result calculation unit is used to calculate the matching evaluation value prediction result of the predicted information relative to the real information based on the relationship sensitivity matching evaluation value, the entity sensitivity matching evaluation value and the state characteristics.
[0142] According to an embodiment of the present invention, there are multiple matching evaluation value prediction results. The loss module includes a normalization unit, a conditional probability calculation unit and a training loss calculation unit.
[0143] The normalization unit is used to normalize the multiple matching evaluation value prediction results to obtain a matching evaluation value normalization result.
[0144] The conditional probability calculation unit is used to calculate the conditional probability of the true label of the matching evaluation value under the conditions represented by multiple matching evaluation value normalization results based on the true label of the matching evaluation value and the matching evaluation value normalization result.
[0145] The training loss calculation unit is used to calculate the training loss based on the conditional probability, the relationship sensitivity matching evaluation value and the entity sensitivity matching evaluation value.
[0146] According to an embodiment of the present invention, the relationship-sensitive matching evaluation value has a relationship-sensitive weight coefficient, and the entity-sensitive matching evaluation value has an entity-sensitive weight coefficient. The training module includes an adjustment unit.
[0147] The adjustment unit is used to adjust the relationship sensitivity weight coefficient and the entity sensitivity weight coefficient using the training loss.
[0148] According to an embodiment of the present invention, the first neural network module includes an encoding unit and a matrix conversion unit.
[0149] The encoding unit is used to perform unique-hot encoding on the electricity consumption area represented by the head entity object, the electricity consumption unit value attribute represented by the relationship object, the total electricity consumption value attribute represented by the tail entity object, and the timestamp information represented by the time object, respectively, to obtain a region binary vector, a unit value attribute binary vector, a total value attribute binary vector, and a time binary vector.
[0150] The matrix conversion unit is used to perform matrix conversion on the region binary vector, the unit value attribute binary vector, the total value attribute binary vector, and the time binary vector to obtain the sample embedding matrix representation.
[0151] Figure 7 A block diagram of a power consumption information prediction device according to an embodiment of the present invention is shown.
[0152] like Figure 7 As shown, the power consumption information prediction device 700 includes a quadruple acquisition module 710 to be completed and a completion module 720 .
[0153] The to-be-completed quadruple acquisition module 710 is used to obtain a to-be-completed quadruple consisting of a head entity object representing an electricity consumption area, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity consumption total value attribute, and a time object representing timestamp information, wherein the information represented by the to-be-completed object in the to-be-completed quadruple is empty, and the to-be-completed object represents a head entity object or a tail entity object.
[0154] The completion module 720 is used to input the four-tuple to be completed into the electricity consumption information prediction model, obtain the target completed result determined for the object to be completed, and output the completed four-tuple including the target completed result, wherein the electricity consumption information prediction model is trained using the above-mentioned electricity consumption information prediction model training method.
[0155] According to an embodiment of the present invention, the completion module includes a candidate completed result obtaining unit, a candidate matching evaluation value prediction result calculating unit, and a target completed result determining unit.
[0156] The candidate completed result obtaining unit is used to input the to-be-completed quadruple into the electricity consumption information prediction model to obtain a plurality of candidate completed results determined for the to-be-completed object.
[0157] The candidate matching evaluation value prediction result calculation unit is used to calculate the candidate matching evaluation value prediction result of each candidate completed result relative to the real information represented by other objects in the quadruple to be completed, and obtain multiple candidate matching evaluation value prediction results, where the other objects represent objects in the quadruple to be completed other than the object to be completed.
[0158] The target completed result determining unit is configured to determine the candidate completed result of the target matching evaluation value prediction result having the largest value among the plurality of candidate matching evaluation value prediction results as the target completed result.
[0159] Any number of the modules, units, and sub-units according to the embodiments of the present invention, or at least part of the functions of any number of them, can be implemented in a single module. Any one or more of the modules, units, and sub-units according to the embodiments of the present invention can be split into multiple modules for implementation. Any one or more of the modules, units, and sub-units according to the embodiments of the present invention can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware through any other reasonable method of circuit integration or packaging, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, one or more of the modules, units, and sub-units according to the embodiments of the present invention can be at least partially implemented as a computer program module, which can perform the corresponding functions when executed.
[0160] For example, any of the first neural network module 610, the second neural network module 620, the third neural network module 630, the loss module 640, and the training module 650, or the to-be-completed quadruple acquisition module 710 and the completion module 720 can be combined into one module / unit / sub-unit for implementation, or any of these modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functionality of one or more of these modules / units / sub-units can be combined with at least part of the functionality of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present invention, at least one of the first neural network module 610, the second neural network module 620, the third neural network module 630, the loss module 640, and the training module 650, or the to-be-completed quad-tuple acquisition module 710 and the completion module 720 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware through any other reasonable means of circuit integration or packaging, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the first neural network module 610, the second neural network module 620, the third neural network module 630, the loss module 640, and the training module 650, or the to-be-completed quad-tuple acquisition module 710 and the completion module 720 can be at least partially implemented as a computer program module, which can perform the corresponding function when executed.
[0161] Figure 8 A block diagram of an electronic device suitable for implementing at least one of a training method for a power usage information prediction model and a power usage information prediction method according to an embodiment of the present invention is shown. Figure 8 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0162] like Figure 8As shown, an electronic device 800 according to an embodiment of the present invention includes a processor 801, which can perform various appropriate actions and processes based on a program stored in a read-only memory (ROM) 802 or a program loaded from a storage unit 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0163] Various programs and data required for the operation of the electronic device 800 are stored in the RAM 803. The processor 801, ROM 802, and RAM 803 are connected to each other via a bus 804. The processor 801 executes the programs in the ROM 802 and / or RAM 803 to perform various operations according to the method flow of the embodiment of the present invention. It should be noted that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also execute the programs stored in the one or more memories to perform various operations according to the method flow of the embodiment of the present invention.
[0164] According to an embodiment of the present invention, electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to bus 804. System 800 may also include one or more of the following components connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 808 including a hard disk; and a communication section 809 including a network interface card such as a LAN card or modem. Communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. Removable media 811, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 810 as needed, so that computer programs read from the removable media can be installed into storage section 808 as needed.
[0165] According to an embodiment of the present invention, the method flow according to an embodiment of the present invention can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-mentioned functions defined in the system of the embodiment of the present invention are executed. According to an embodiment of the present invention, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.
[0166] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.
[0167] According to embodiments of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples include, but are not limited to, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0168] For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 802 and / or the RAM 803 described above and / or one or more memories other than the ROM 802 and the RAM 803 .
[0169] An embodiment of the present invention also includes a computer program product, which includes a computer program, which contains program code for executing the method provided by the embodiment of the present invention. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement at least one of the training method of the electricity consumption information prediction model and the electricity consumption information prediction method provided by the embodiment of the present invention.
[0170] When the computer program is executed by the processor 801, the above functions defined in the system / device of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0171] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0172] The above describes embodiments of the present invention. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. The scope of the present invention is defined by the appended claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which are intended to fall within the scope of the present invention.
Claims
1. A method for training an electricity consumption information prediction model, characterized in that: The method comprises: Inputting a sample quadruple consisting of a head entity object representing an electricity consumption region, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity consumption total value attribute, and a time object representing timestamp information into a first neural network of an electricity consumption information prediction model, thereby obtaining a sample embedding matrix representation of the sample quadruple; The sample embedding matrix representation is input into a second neural network of the electricity consumption information prediction model, and the sensitivity characteristic change rate of the electricity consumption area, the unit value attribute of electricity consumption, and the total value attribute of electricity consumption represented by the sample quadruple relative to the target time represented by the time object is obtained; Inputting the sensitivity feature change rate into a third neural network of the electricity consumption information prediction model, calculating a matching evaluation value prediction result of the prediction information determined for the target entity object in the sample quadruple relative to the real information represented by other objects in the sample quadruple, wherein the target entity object represents the head entity object or the tail entity object, and the other objects represent objects other than the target entity object in the sample quadruple, and the sample quadruple has a real label with a matching evaluation value; Calculating the training loss based on the sample embedding matrix representation, the true label of the matching evaluation value, and the matching evaluation value prediction result; The training loss is used to adjust the model parameters of the first neural network, the second neural network, and the third neural network to obtain a trained electricity consumption information prediction model.
2. The method according to claim 1, characterized in that The sample embedding matrix representation is input into the second neural network of the electricity consumption information prediction model to obtain the sensitivity feature change rate of the electricity consumption area, electricity unit value attribute, and total electricity value attribute represented by the sample quadruple relative to the target time represented by the time object, including: Performing feature extraction on the sample embedding matrix representation to obtain sensitivity features of the electricity consumption region, electricity consumption unit value attribute, and total electricity consumption value attribute at the target time; Extracting state change features of the sample quadruple at the target moment based on the sensitivity feature and the target embedding matrix representation of each of at least one target quadruple of the time object representing the target moment obtained from the quadruple data set; Noise processing is performed on the state change feature to obtain the sensitivity feature change rate.
3. The method according to claim 2, characterized in that The noise processing is performed on the state change feature to obtain the sensitivity feature change rate, which includes: Calculating a random noise vector based on the sensitivity feature, the target moment, and the target embedding matrix representation; The random noise vector is used to perform noise processing on the state change feature to obtain the sensitivity feature change rate.
4. The method according to claim 2, characterized in that The other objects include the relationship object and other entity objects in the sample quadruple except the target entity object, and the sensitivity feature change rate includes the relationship sensitivity feature change rate related to the relationship object and the entity sensitivity feature change rate related to the other entity objects; Inputting the sensitivity feature change rate into the third neural network of the electricity usage information prediction model, and calculating a matching evaluation value prediction result of the predicted information determined for the target entity object in the sample quadruple relative to the real information represented by other objects in the sample quadruple includes: Extracting state features of the sample quadruple at the target moment according to the sensitivity features and the sample embedding matrix representation; Calculating a relationship sensitivity matching evaluation value between the predicted information and the real information represented by the relationship object based on the predicted information and the relationship sensitivity feature change rate; Calculating an entity sensitivity matching evaluation value between the predicted information and the real information represented by the other entity object based on the predicted information and the entity sensitivity feature change rate; According to the relationship sensitivity matching evaluation value, the entity sensitivity matching evaluation value and the state feature, a matching evaluation value prediction result of the predicted information relative to the real information is calculated.
5. The method according to claim 4, characterized in that There are multiple matching evaluation value prediction results; Calculating the training loss according to the sample embedding matrix representation, the true label of the matching evaluation value, and the matching evaluation value prediction result includes: Normalizing the plurality of matching evaluation value prediction results to obtain a matching evaluation value normalized result; Calculating, based on the true label of the matching evaluation value and the normalized result of the matching evaluation value, the conditional probability of the true label of the matching evaluation value under conditions represented by a plurality of normalized results of the matching evaluation value; The training loss is calculated based on the conditional probability, the relationship sensitivity matching evaluation value, and the entity sensitivity matching evaluation value.
6. The method according to claim 4, characterized in that The relationship sensitivity matching evaluation value has a relationship sensitivity weight coefficient, and the entity sensitivity matching evaluation value has an entity sensitivity weight coefficient; The adjusting the model parameters of the first neural network, the second neural network, and the third neural network respectively by using the training loss includes: The relationship sensitivity weight coefficient and the entity sensitivity weight coefficient are adjusted using the training loss.
7. The method according to claim 1, characterized in that The step of inputting a sample quadruple consisting of a head entity object representing an electricity consumption region, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity consumption total value attribute, and a time object representing timestamp information into a first neural network of an electricity consumption information prediction model to obtain a sample embedding matrix representation of the sample quadruple includes: Performing unique-hot encoding on the electricity consumption region represented by the head entity object, the electricity consumption unit value attribute represented by the relationship object, the electricity consumption total value attribute represented by the tail entity object, and the timestamp information represented by the time object, respectively, to obtain a region binary vector, a unit value attribute binary vector, a total value attribute binary vector, and a time binary vector; Perform matrix transformation on the region binary vector, unit value attribute binary vector, total value attribute binary vector, and time binary vector to obtain the sample embedding matrix representation.
8. A method for predicting electricity consumption information, characterized in that: The method comprises: Obtaining a to-be-completed quadruple consisting of a head entity object representing an electricity consumption region, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity consumption total value attribute, and a time object representing timestamp information, wherein the information represented by the to-be-completed object in the to-be-completed quadruple is empty, and the to-be-completed object represents the head entity object or the tail entity object; The to-be-completed quadruple is input into an electricity consumption information prediction model to obtain a target completed result determined for the to-be-completed object, and a completed quadruple including the target completed result is output, wherein the electricity consumption information prediction model is trained using the method described in any one of claims 1-7.
9. The method according to claim 8, characterized in that Inputting the to-be-completed quadruple into the electricity consumption information prediction model to obtain a target completed result determined for the to-be-completed object includes: Inputting the to-be-completed quadruple into the electricity consumption information prediction model to obtain a plurality of candidate completed results determined for the to-be-completed object; Calculating a candidate matching evaluation value prediction result for each candidate completed result relative to real information represented by other objects in the to-be-completed quadruple to obtain a plurality of candidate matching evaluation value prediction results, wherein the other objects represent objects in the to-be-completed quadruple other than the to-be-completed object; The candidate completed result used to calculate the target matching evaluation value prediction result with the largest value among the plurality of candidate matching evaluation value prediction results is determined as the target completed result.
10. A training device for an electricity consumption information prediction model, characterized in that: The device comprises: a first neural network module, configured to input a sample quadruple consisting of a head entity object representing an electricity consumption region, a relationship object representing an electricity consumption unit value attribute, a tail entity object representing an electricity consumption total value attribute, and a time object representing timestamp information into a first neural network of an electricity consumption information prediction model, and obtain a sample embedding matrix representation of the sample quadruple; a second neural network module, configured to embed the sample into a matrix representation and input it into a second neural network of the electricity consumption information prediction model, and obtain a sensitivity characteristic change rate of each of the electricity consumption region, the unit value attribute of electricity consumption, and the total value attribute of electricity consumption represented by the sample quadruple relative to the target moment represented by the time object; a third neural network module, configured to input the sensitivity feature change rate into a third neural network of the electricity consumption information prediction model, and calculate a matching evaluation value prediction result of the prediction information determined for the target entity object in the sample quadruple relative to the real information represented by other objects in the sample quadruple, wherein the target entity object represents the head entity object or the tail entity object, and the other objects represent objects other than the target entity object in the sample quadruple, and the sample quadruple has a real label of the matching evaluation value; A loss module, configured to calculate a training loss based on the sample embedding matrix representation, the true label of the matching evaluation value, and the matching evaluation value prediction result; A training module is used to adjust the model parameters of the first neural network, the second neural network and the third neural network respectively using the training loss to obtain a trained electricity consumption information prediction model.
Citation Information
Patent Citations
Entity relationship prediction method and device for time sequence knowledge graph
CN119647567A
Method and apparatus for completing knowledge graph, electronic device, and computer-readable medium
WO2024120385A1