Transfer plan generation method, model training method, device, equipment and medium
By training the grid load transfer scheme generation model including large models and small models, the problem of inaccurate generation of load transfer schemes under solidified configuration parameters is solved, and the power supply reliability of the power grid in the event of failure is improved.
Patent Information
- Application Number
- CN202411909002.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-24
AI Technical Summary
In the event of a comprehensive failure of the power grid, the load transfer scheme formed under the solidified configuration parameters is difficult to meet the actual needs, which affects the accuracy of the transfer scheme generation and the reliability of the power supply.
A training method for generating a grid load transfer scheme is provided. By obtaining the historical transfer scheme data of the power grid, a transfer scheme sample pair is generated, an initial model including large models and small models is constructed, and a training-completed grid load transfer scheme generation model is obtained.
It improves the accuracy of the generation of power grid load transfer schemes, improves the reliability of power supply, and ensures that appropriate load transfer schemes can be generated quickly and accurately in the event of a fault.
Smart Images

Figure CN119362452B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric power technology, and in particular to a training method for a power grid load transfer scheme generation model, a power grid load transfer scheme generation method, a device, a computer device and a storage medium. Background Art
[0002] Distribution network usually refers to the power grid that transmits electricity from the transmission network or regional power plant to various users. It is responsible for reducing high-voltage electric energy to various voltage levels suitable for users and distributing it to various users. The distribution network consists of overhead lines, cables, poles, distribution transformers, disconnectors, reactive compensation capacitors, and some ancillary facilities. In the power system, the distribution network is the link that is directly connected to the user and distributes electric energy to the user. It is a key link to ensure that electricity is "distributed and used". Load transfer is an important technology in the power system. When the system fails or planned maintenance is carried out, it can transfer the load from one power source to another under the premise of no or less power outages through the closing and opening of the ring, thereby ensuring the continuity and reliability of power supply. Load transfer is a key task in the handling of distribution network faults. Accurately completing load transfer can improve customers' sense of power consumption, reduce power outage losses, and improve the power supply reliability of the system.
[0003] In the current business process, after a fault occurs, the dispatcher manually generates a load transfer plan based on scenario information and fixed configuration parameters.
[0004] However, when a comprehensive fault occurs, the transfer plan formed under the fixed configuration parameters is difficult to meet the actual load transfer needs, affecting the accuracy of the transfer plan generation and further affecting the power supply reliability. Summary of the invention
[0005] Based on this, it is necessary to provide a training method for a power grid load transfer plan generation model, a power grid load transfer plan generation method, device, computer equipment and storage medium that can improve the accuracy of power grid load transfer plan generation in response to the above-mentioned technical problems.
[0006] A training method for a power grid load transfer scheme generation model comprises: obtaining historical transfer scheme data of a power grid distribution network, the historical transfer scheme data comprising a plurality of historical transfer schemes; generating corresponding transfer scheme sample pairs based on each historical transfer scheme; constructing a power grid load transfer scheme generation initial model, the power grid load transfer scheme generation initial model comprising a large model and a small model, the large model being used to generate a model parameter adjustment scheme of the small model, the small model being used to generate a power grid load transfer scheme; inputting the transfer scheme sample pairs into the power grid load transfer scheme generation initial model to iteratively train the power grid load transfer scheme generation initial model, and obtaining a trained power grid load transfer scheme generation model, the power grid load transfer scheme generation model comprising the trained large model and the small model.
[0007] A method for generating a power grid load transfer plan includes: acquiring power grid data of a faulty power grid; based on the power grid data, generating a power grid load transfer plan corresponding to the faulty power grid using a small model trained by any of the above training methods.
[0008] A training device for a power grid load transfer scheme generation model comprises: a historical data acquisition module for acquiring historical transfer scheme data of a power grid distribution network, the historical transfer scheme data comprising a plurality of historical transfer schemes; a sample pair generation module for generating corresponding transfer scheme sample pairs based on each historical transfer scheme; a construction module for constructing an initial model for generating a power grid load transfer scheme, the initial model for generating a power grid load transfer scheme comprising a large model and a small model, the large model being used to generate a model parameter adjustment scheme for the small model, the small model being used to generate a power grid load transfer scheme; a training module for inputting the transfer scheme sample pairs into the initial model for generating a power grid load transfer scheme, so as to iteratively train the initial model for generating a power grid load transfer scheme, and obtain a trained power grid load transfer scheme generation model, the power grid load transfer scheme generation model comprising the trained large model and the small model.
[0009] A power grid load transfer plan generating device comprises: a power grid data acquisition module for acquiring power grid data of a faulty power grid; a transfer plan generating module for generating a power grid load transfer plan corresponding to the faulty power grid based on the power grid data and a small model trained by any of the above-mentioned training methods.
[0010] A computer device comprises a memory and a processor, wherein the memory stores a computer program and the processor implements the steps of any of the methods described above when executing the computer program.
[0011] A computer-readable storage medium stores a computer program, which implements the steps of any of the above methods when executed by a processor.
[0012] The training method, device, computer equipment and storage medium of the power grid load transfer plan generation model are as follows: by obtaining historical transfer plan data of the power grid distribution network, the historical transfer plan data includes multiple historical transfer plans; based on each historical transfer plan, a corresponding transfer plan sample pair is generated; an initial model for generating a power grid load transfer plan is constructed, the initial model for generating a power grid load transfer plan includes a large model and a small model, the large model is used to generate a model parameter adjustment plan for the small model, and the small model is used to generate a power grid load transfer plan; the transfer plan sample pair is input into the initial model for generating a power grid load transfer plan to iteratively train the initial model for generating a power grid load transfer plan, and a trained power grid load transfer plan generation model is obtained, the power grid load transfer plan generation model includes the trained large model and the small model. Therefore, by training the power grid load transfer plan generation model including the large model and the small model, the trained large model outputs the model parameter adjustment plan of the small model, and the small model is used to generate the power grid load transfer plan, so that the large model and the small model respectively undertake different training tasks, which can improve the effectiveness and accuracy of model training, and then when the power grid load transfer plan generated by the trained model is used in the subsequent use, the accuracy of the generated power grid load transfer plan can be improved, and the reliability of power supply can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is an application scenario diagram of a method for generating a power grid load transfer scheme and a training method for a power grid load transfer scheme generation model in one embodiment;
[0014] Figure 2 A schematic flow chart of a training method for a power grid load transfer scheme generation model in one embodiment;
[0015] Figure 3 A schematic diagram of a flow chart of sample pair generation in one embodiment;
[0016] Figure 4 A schematic diagram of a flow chart of a model training method in one embodiment;
[0017] Figure 5 A schematic diagram of the structure of a large model in an embodiment;
[0018] Figure 6 A schematic diagram of a flow chart of a method for generating a power grid load transfer scheme in one embodiment;
[0019] Figure 7 A structural block diagram of a training device for generating a model for a power grid load transfer scheme in one embodiment;
[0020] Figure 8 It is a structural block diagram of a device for generating a power grid load transfer scheme in one embodiment;
[0021] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0023] The power grid load transfer scheme generation method and the power grid load transfer scheme generation model training method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The server 104 can obtain the historical transfer plan data of the power distribution network through the user instructions on the terminal 102, and generate corresponding transfer plan sample pairs based on each historical transfer plan. Further, the server 104 can construct an initial model for generating a power grid load transfer plan, and the initial model for generating a power grid load transfer plan includes a large model and a small model. The large model is used to generate a model parameter adjustment plan for the small model, and the small model is used to generate a power grid load transfer plan. Further, the server 104 can input the transfer plan sample pair into the initial model for generating a power grid load transfer plan to iteratively train the initial model for generating a power grid load transfer plan, and obtain a trained power grid load transfer plan generation model, and the power grid load transfer plan generation model includes a trained large model and a small model. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0024] In one embodiment, Figure 2 As shown in FIG, a training method for a power grid load transfer scheme generation model is provided, and the method is applied to Figure 1 Taking the server in as an example, the following steps can be included:
[0025] Step S202, obtaining historical power transfer plan data of the power distribution network, the historical power transfer plan data including a plurality of historical power transfer plans.
[0026] The historical power transfer scheme data may be power transfer scheme data formed based on historical power distribution network failures. The historical power transfer scheme data may include multiple historical power transfer schemes, and the multiple historical power transfer schemes may correspond to different power grid failures. For any power distribution network failure, the historical power transfer scheme data may have one or more historical power transfer schemes corresponding thereto.
[0027] Step S204: Generate corresponding power transfer plan sample pairs based on each historical power transfer plan.
[0028] Among them, the sample pairs of the transfer plan are sample pairs used for subsequent model training, and the sample pairs of the transfer plan can be used as training data for the model.
[0029] In this embodiment, the transfer plan sample pair may include 2 or more transfer plan samples.
[0030] In this embodiment, after obtaining the historical power transfer plan data, the server can generate a pair of historical power transfer plans corresponding to each power grid distribution network failure based on the historical power transfer plans corresponding to each power grid distribution network failure, and use them for subsequent model training.
[0031] In one of the embodiments, the sample pairs of power transfer plans can be obtained directly based on the historical power transfer plan data, that is, multiple historical power transfer plans in the same power grid distribution network failure are used as the sample pairs of power transfer plans, or the corresponding sample pairs of power transfer plans can be derived based on any historical power transfer plan, such as by weighting the historical power transfer plans with different weights to generate sample pairs of power transfer plans.
[0032] Step S206, constructing a power grid load transfer scheme to generate an initial model.
[0033] Among them, the initial model for generating the power grid load transfer plan may include a large model and a small model, the large model is used to generate a model parameter adjustment plan for the small model, and the small model can be used to generate the power grid load transfer plan.
[0034] In this embodiment, the model parameter adjustment scheme can correspond one-to-one to the model parameters of the small model, and the server can adjust and update the model parameters of the small model based on the model parameter adjustment scheme to achieve iterative training of the small model.
[0035] In one embodiment, the model parameters of the small model may include but are not limited to the corresponding switch states in the power distribution network (controlling the opening and closing states of the switches in the distribution network to achieve load transfer), voltage levels (distribution networks of different voltage levels need to consider voltage matching issues during loop operation, such as high, medium and low voltages), flow limitations (ensuring that the power flow does not exceed the equipment rating during the transfer process) and phase consistency (phase consistency must be confirmed before loop operation to avoid equipment damage), etc.
[0036] In this embodiment, the large model can be a machine model with autonomous learning ability, and the large model has the ability to understand intentions, strong autonomous evaluation and autonomous decision-making capabilities. The output of the large model is the small model parameters used to configure the small model.
[0037] In this embodiment, the small model may specifically be a small model for generating power grid load transfer plans applicable to different fault scenarios, and the small model may generate power grid load transfer plans corresponding to different power grid distribution network fault scenarios.
[0038] In this embodiment, the server can build corresponding large models and small models based on business needs and perform model training.
[0039] Step S208, input the transfer plan sample into the initial model for generating the power grid load transfer plan, so as to iteratively train the initial model for generating the power grid load transfer plan, and obtain a trained power grid load transfer plan generation model, wherein the power grid load transfer plan generation model includes a trained large model and a small model.
[0040] In this embodiment, after constructing the initial model for generating the power grid load transfer plan, the server can generate transfer plan sample pairs based on the historical transfer plan data obtained previously, and then perform model iterative training on the initial model for generating the power grid load transfer plan.
[0041] In this embodiment, the initial model for generating the power grid load transfer plan continuously learns and iterates the transfer plan sample pairs, learns the explicit information and deep-level dependencies between the transfer plan sample pairs, and thus generates a more accurate transfer plan.
[0042] In this embodiment, the model training is completed until a specific performance indicator is met or the number of iterations is reached, so as to obtain a trained power grid load transfer scheme generation model, that is, a trained large model and a small model.
[0043] In the training method of the above-mentioned power grid load transfer plan generation model, historical transfer plan data of the power grid distribution network is obtained, and the historical transfer plan data includes multiple historical transfer plans; based on each historical transfer plan, a corresponding transfer plan sample pair is generated; an initial model for generating a power grid load transfer plan is constructed, and the initial model for generating a power grid load transfer plan includes a large model and a small model, and the large model is used to generate a model parameter adjustment plan for the small model, and the small model is used to generate a power grid load transfer plan; the transfer plan sample pair is input into the initial model for generating a power grid load transfer plan to iteratively train the initial model for generating a power grid load transfer plan, and a trained power grid load transfer plan generation model is obtained, and the power grid load transfer plan generation model includes the trained large model and the small model. Therefore, by training the power grid load transfer plan generation model including the large model and the small model, the trained large model outputs the model parameter adjustment plan of the small model, and the small model is used to generate the power grid load transfer plan, so that the large model and the small model respectively undertake different training tasks, which can improve the effectiveness and accuracy of model training, and then when the power grid load transfer plan generated by the trained model is used in the subsequent use, the accuracy of the generated power grid load transfer plan can be improved, and the reliability of power supply can be further improved.
[0044] In one of the embodiments, as described above, the server may generate a sample pair of power transfer plans corresponding to each power distribution network fault based on the historical power transfer plans corresponding to each power distribution network fault.
[0045] In this embodiment, the sample pair of the transfer scheme may include positive samples and negative samples. The server generates corresponding sample pairs of transfer schemes based on each historical transfer scheme, which may include: taking each historical transfer scheme as an initial sample, the initial sample includes the transfer scenario description information, scheme parameter information and evaluation index information of the corresponding historical transfer scheme; adjusting the scheme parameter information of the initial sample to obtain multiple groups of adjusted scheme parameter information; obtaining multiple corresponding modified samples based on each group of adjusted scheme parameter information, transfer scenario description information and evaluation index information; determining the index weight of the corresponding initial sample; calculating the sample scores of the initial sample and each modified sample respectively according to the index weight; determining the positive sample and negative sample of the corresponding initial sample from multiple modified samples based on the sample score of the initial sample and the sample score of each modified sample, and obtaining the sample pair of the transfer scheme.
[0046] Among them, the scheme parameter information is used to characterize each transfer scheme, and the scheme parameter information may include but is not limited to the topological structure, equipment status, load characteristics, power supply reliability, power supply efficiency, economy, environmental impact and power supply speed of the faulty power grid corresponding to the corresponding transfer scheme.
[0047] The evaluation index information is used to evaluate each power transfer plan. The evaluation index information may include but is not limited to the affected load, the affected important load, the affected number of users, the affected number of important users, the number of power-off devices, the capacity of power-off devices, the overload on the opposite side, the number of operations, the power supply structure affecting important users, etc.
[0048] The load transfer scenario description information refers to a detailed description of various specific situations that may be encountered during the load transfer process, which may include but is not limited to the current state of the faulty power grid, fault information, weather conditions, load demand changes, equipment maintenance plans, etc.
[0049] To better illustrate the generation of sample pairs, the following is combined Figure 3 Provide detailed explanation.
[0050] In this embodiment, reference Figure 3 The initial sample may include the transfer scenario description information (such as fault / maintenance / overload description), solution parameter information (initial transfer solution) and evaluation index information (initial sub-evaluation index) mentioned above, and may also include the sample score (85 points) and the corresponding index weight (initial evaluation weight).
[0051] Furthermore, the server may adjust the scheme parameter information of the initial sample multiple times to obtain multiple sets of adjusted scheme parameter information, namely, transfer scheme parameter 1 and transfer scheme parameter 2. Specifically, the server may generate transfer scheme parameter 1 and transfer scheme parameter 2 by modifying the scheme parameter information, such as modifying one or more of the topology structure, equipment status, load characteristics, power supply reliability, power supply efficiency, economy, environmental impact, and power supply speed of the faulty power grid.
[0052] Furthermore, the server may generate a corresponding plurality of modified samples based on each group of adjusted transfer plan parameters, the transfer scenario description information corresponding to the initial sample, and the evaluation index information, namely, obtain transfer plan 1 and transfer plan 2.
[0053] Furthermore, the server calculates the transfer scheme 1 and the transfer scheme 2 respectively based on the indicator weight and the evaluation indicator information to obtain the corresponding sample scores. Figure 3 In the illustrated embodiment, the sample score (total score) of transfer plan 1 is 90, the sample score (total score) of transfer plan 2 is 80, and the sample score (total score) of the initial sample is 85. The server may determine transfer plan 1 as the transfer plan corresponding to the positive sample, and transfer plan 2 as the transfer plan corresponding to the negative sample.
[0054] Furthermore, the server can generate corresponding load transfer parameter adjustment scheme 1 and load transfer parameter adjustment scheme 2 based on transfer scheme 1 and transfer scheme 2, that is, obtain positive and negative samples, and use them for model training.
[0055] In one of the embodiments, a transfer plan sample pair is input into an initial model for generating a power grid load transfer plan, so as to iteratively train the initial model for generating a power grid load transfer plan, and obtain a trained power grid load transfer plan generation model, which may include: inputting the transfer plan sample pair into a large model, and learning and training the transfer plan sample pair through the large model; outputting a model parameter adjustment plan through the trained large model; configuring model parameters of a small model based on the model parameter adjustment plan; outputting a predicted load transfer plan based on the configured small model; iteratively training the large model based on the predicted load transfer plan and the transfer plan sample pair, and updating the model parameters of the small model until the training of the initial model for generating a power grid load transfer plan is completed.
[0056] Reference Figure 4 , showing a schematic diagram of iterative training of a model.
[0057] In this embodiment, the model training process is an iterative process. The large model generates a transfer plan through a decoder, and then adjusts parameters according to the evaluation results of the generated transfer plan, and continuously optimizes until specific performance indicators are met or the iteration limit is reached.
[0058] Specifically, the server can input the sample pairs of the supply transfer plan into the large model as training data, and the large model outputs the small model adjustment plan of the supply transfer plan.
[0059] Then, the server can determine whether a specific performance indicator of the large model meets a preset value or whether the number of model iterations meets a predetermined value.
[0060] In this embodiment, when a specific performance indicator of the large model meets a preset value, or the number of model iterations meets a predetermined value, the model training is completed and the model training is terminated.
[0061] In this embodiment, if the specific performance indicators of the large model do not meet the preset values and the number of model iterations does not meet the predetermined value, the server updates the model parameters of the small model based on the model parameters included in the model parameter adjustment plan, and outputs the transfer plan and the indicator evaluation of the corresponding transfer plan through the small model after the parameter update, which are input into the large model again as training data to realize iterative training of the large model.
[0062] In this embodiment, when the server updates the model parameters of the small model based on the model parameters included in the model parameter adjustment scheme, it may also update the model parameters of the small model based on other constraints.
[0063] In a specific embodiment, other constraints may include physical limitations of the power grid, safety regulations, etc. of the power distribution network.
[0064] In one embodiment, reference Figure 5 , shows a structural schematic diagram of a large model, which can also be called a load transfer scenario large model, specifically a Transformer model.
[0065] In this embodiment, the model may include a token embedding layer, a position embedding layer, a multi-layer decoder layer, a normalization layer, an activation function layer (softmax function), and a fully connected layer (Linear).
[0066] Specifically, each decoder layer (Decoder) may include a normalization layer (Layer norm), a multi-head causal self-attention mechanism layer (Multi-head causal self-attention), and a feed forward layer (Feed Forward).
[0067] Among them, the decoder layer (Decoder) is used to convert the internal representation of the model into output. The normalization layer (Layernorm) is used to normalize the output of the intermediate layer of the model to stabilize and accelerate the training process. The multi-head causal self-attention mechanism layer (Multi-head causal self-attention) allows the model to consider all positions in the input sequence when generating outputs, while capturing different features through multiple attention heads. The position embedding layer (Pos embed) is used to provide the model with the position information of each element in the sequence, which is crucial for processing sequence data (such as time series). The token embedding layer (Token embedding) is used to convert the input vocabulary into a vector representation that the model can process. The activation function layer (softmax function) is used to convert the output of the decoder into a probability distribution, which is usually used for classification tasks or probability selection in generation tasks. The fully connected layer (Linear) is used to perform a linear transformation on the input data.
[0068] In one of the embodiments, the sample pairs of transfer plans are input into a large model, and the sample pairs of transfer plans are trained through the large model, which may include: inputting the sample pairs of transfer plans into the large model, and obtaining explicit information of the sample pairs of transfer plans through the large model; based on the explicit information, deep learning is performed on the sample pairs of transfer plans to determine the potential relationships and multi-level dependencies of the sample pairs of transfer plans.
[0069] In one of the embodiments, the explicit information may include the scheme parameter information, evaluation index information and the transfer scenario description information of the transfer scheme in the transfer scheme sample mentioned above.
[0070] In this embodiment, the large model can learn from the input transfer plan sample pairs based on its self-attention mechanism to directly extract the explicit information in the transfer plan sample pairs, namely, plan parameter information, evaluation index information, and transfer scenario description information.
[0071] In one of the embodiments, the potential relationships and multi-level dependencies of the transfer solution samples may include the potential relationships and dependencies between the solution parameter information, the evaluation index information and the transfer scenario description information.
[0072] Specifically, the potential relationships and multi-level dependencies of the transfer plan samples refer to the interdependencies within the transfer plan samples, contextual associations, long-distance dependencies, global perspective relationships, parallel computing and flexibility relationships, multi-dimensional relationship capture relationships, multi-level dependencies of multi-head attention, and hierarchical relationships combining global perspectives with local details.
[0073] In this embodiment, the large model can be based on a multi-layer decoder structure to effectively perform deep compression on sample data and representation learning of implicit knowledge, and perform deep learning on transfer plan sample pairs to learn the potential relationships and multi-level dependencies of the transfer plan samples.
[0074] In this embodiment, continue to refer to Figure 5 The large model can also include a fine-tuning module LORA, which is used to fine-tune the pre-trained model to adapt to specific tasks without significantly increasing the model parameters. Specifically, the fine-tuning of the large model can be achieved through low-rank adaptation technology.
[0075] In this embodiment, when fine-tuning the load transfer task, the large model can compress and store the implicit knowledge in the sample through a large number of decoders, and use the self-attention mechanism to learn the complex potential relationships between text data such as solution parameter information, evaluation index information, and transfer scenario description information. In this process, all feature descriptions are converted into tokens and vectorized and sent to the decoder. In the decoder, the vector representation of each token calculates the attention (correlation) between its own representation and all other token representations, and generates a new representation based on the attention.
[0076] In this embodiment, since the correlation between vector representations of tokens may be very complex, a Multi-head mechanism may be used to generate a set of representations at one time to express the correlations in different dimensions.
[0077] In one of the embodiments, iterative training of a large model based on predicted load transfer plans and sample pairs of transfer plans may include: determining the model loss of the large model based on the predicted load transfer plans and sample pairs of transfer plans; adjusting the model parameters of the large model according to the model loss; and iteratively training the large model after the model parameters are adjusted until the large model converges.
[0078] In this embodiment, during iterative model training, the model parameters of the large model can be updated by reverse gradient propagation to achieve iterative training of the large model.
[0079] Specifically, the server can determine the model loss based on the input and output of the model and optimize the model parameters. That is, the server can determine the model loss of the large model based on the predicted load transfer plan and the transfer plan sample pairs, and update the model parameters of the large model so that the model loss meets the preset value, that is, the large model converges.
[0080] As mentioned above, the sample pairs of the transfer scheme may include positive samples and negative samples.
[0081] In this embodiment, each training sample is a sample pair (i.e., a sample pair of a transfer scheme), which can be expressed as <1, p2>. Each sample in the sample pair is constructed in exactly the same way as the supervised fine-tuning, and is constructed in the form of a question-answer pair.
[0082] In this embodiment, the positive sample in the sample pair is the corresponding output result. y w , negative samples are bad output results y l When training a large model, the model parameters of the large model can be updated by back propagation to make the output as close as possible to y w , while staying away from y l , which can improve the reasoning ability of large models during fine-tuning.
[0083] In this embodiment, the server determines the model loss of the large model based on the predicted load transfer plan and the transfer plan sample pair, which may include: determining the sample pair loss of the transfer plan sample pair according to the positive sample and the negative sample; determining the corresponding prediction loss based on the predicted load transfer plan and the positive sample; and obtaining the model loss of the large model according to the sample pair loss and the prediction loss.
[0084] In this embodiment, the model loss of the large model can be expressed by the following formula (1):
[0085] (1)
[0086] in,L ORPO is the final loss, i.e. the model loss of the large model.
[0087] E(x, y w , y l ) Indicates the sample (x, y w , y l ) The expected value of x are input features, y w is a positive sample (i.e., a sample that the model is expected to predict as a positive class), y l are negative samples (i.e., samples that the model is expected to predict as negative).
[0088] In this embodiment, L SFT It represents the loss function in supervised learning (i.e. prediction loss), such as cross entropy loss, which is used to measure the difference between the model prediction and the true label. L OR is the ranking loss (sample pair loss), which is used to ensure the performance of the model in the ranking task, ensuring that items that users are more interested in are ranked ahead of items that are less interesting, such as positive samples are ranked before negative samples. λ is a weight parameter used to balance L SFT and L OR The contribution between.
[0089] In a specific embodiment, the ranking loss is expressed by the following formula (2):
[0090] (2)
[0091] in, σ is the sigmoid function. odds θ (y / x) Indicates that given input x In the case of θ For categories y Odds ( odds Odds are the ratio of the probability of an event occurring to the probability of it not occurring. y w and y l represent positive samples and negative samples respectively.
[0092] In this embodiment, by adding the ranking loss (sample pair loss) to the model loss, the model can be encouraged to increase the ratio of the odds of positive samples to the odds of negative samples, thereby better distinguishing positive and negative samples in the ranking task.
[0093] In one of the embodiments, the sample pairs of supply transfer plans are input into a large model, and the sample pairs of supply transfer plans are learned and trained through the large model, which may include: determining the prediction target of the small model; using the prediction target as the optimization target of the large model, and learning and training the large model based on the sample pairs of supply transfer plans.
[0094] In this embodiment, during the model training process, the prediction target of the small model can be used as the optimization target of the large model for training, such as maximizing power restoration and minimizing operations.
[0095] In one of the embodiments, maximizing power restoration of the power distribution network (such as maximizing the power restoration load or maximizing the number of power restoration users) can be used as the main optimization goal of large model training, and minimizing operations can be used as the secondary optimization goal of large model training.
[0096] In this embodiment, maximizing power restoration means restoring power to the faulty power grid on a large scale, with the goal of minimizing the total weighted power loss load / number of users. The objective function can be expressed as formula (3):
[0097] (3)
[0098] Among them, the power distribution network can include multiple loads. w d For load d The larger the weight, the more important the load is in the power grid.
[0099] In this embodiment, the power distribution network may include multiple nodes (connection points between loads). z i For Node i Whether it is powered on, 0 means power off, 1 means power on.
[0100] In this embodiment, P d It refers to the load d The power demand or power consumption of the power grid. P d When expressing active power, it refers to the electrical energy actually consumed by the load, usually in kilowatts (kW). P d When expressing reactive power, it refers to the portion of the electrical energy consumed by the load that is used to establish and maintain the magnetic field. The unit is usually kilovar (kVar)
[0101] In this embodiment, the weightw d It is related to the load type (critical infrastructure, ordinary residential or commercial load, etc.), load size, load interruptibility (whether interruption in a short period of time will cause serious consequences), time factors (peak time, off-peak time), and the operating status of the power grid (whether the power grid operation is stable, etc.).
[0102] In one embodiment, the load weight of critical infrastructure (such as hospitals and traffic control centers) is higher than that of ordinary residential or commercial loads. Larger loads may have a greater impact on the stability and economy of the power grid, so they can be given higher weights. Some loads can be interrupted for a short period of time without causing serious consequences, and the weights of these loads can be lower. During peak hours, certain loads can be given higher weights to ensure the stability of power supply. When the power grid is unstable or there are special needs, the weights of certain loads may be adjusted.
[0103] After a grid fault occurs, the grid distribution is realized by switching the grid switch, that is, the switch is operated. In this embodiment, the minimum switch operation is aimed at minimizing the switch operation, and the objective function can be expressed as formula (4):
[0104] (4)
[0105] in, x ij Connect nodes in the power distribution network i and nodes j The switch opening and closing state 0-1 variable, 0 means the switch is open, and 1 means the switch is closed; x ij 0 This is the initial state of the switch.
[0106] In one implementation, since the above formula (4) contains an absolute value operation, in order to facilitate the solution, the above formula (4) is transformed into formula (5) by introducing auxiliary variables:
[0107] (5)
[0108] in, x ij + Call it a positive value.
[0109] In this embodiment, the weight is introduced into formula (5) w ij, which is used to distinguish the workload of different types of switch operations. Specifically, switches with remote control functions can be directly ordered to open and close from a distance, which requires less operation workload and high efficiency. Switches without remote control functions need to be manually operated on-site, and the corresponding switch operation workload is large and the timeliness is poor, which means that the power outage time is longer in the event of a fault.
[0110] In this embodiment, when the server is training a large model, it can also train the model in combination with optimization constraints.
[0111] In this embodiment, the optimization constraints may specifically include maximum load rate constraints of equipment in the power distribution network, network radial constraints, preset constraints, operation logic constraints, etc.
[0112] In one embodiment, the equipment maximum load rate constraint means that the power transfer scheme does not cause the equipment load to exceed the limit. The equipment maximum load rate constraint can be expressed by the following formula (6):
[0113] (6)
[0114] in, x ij Represents a connected node i and nodes j The state of the switch or line. x ij =1, it means the switch is closed or the circuit is energized. x ij =0, it means the switch is open or the line is de-energized. Indicates line ij The maximum allowable power capacity of a line is the maximum active power that the line can transmit without violating thermal stability or other safety constraints. P ij Indicates the actual passing line ij This value is limited by the line capacity and depends on the switch x ij status.
[0115] In one embodiment, the network radial constraint means that the power grid does not cause the power grid to operate in a closed loop, which can be specifically expressed by the following formula (7):
[0116] (7)
[0117] in, N b Indicates the total number of branches in the power grid network. In the power system, a branch usually refers to a line or transmission line connecting two nodes. N gRepresents the total number of generators in the network. Generators are devices that produce electrical energy in a power system.
[0118] In one of the embodiments, the preset constraints refer to whether splicing and restoration of power are allowed and the number of splicing, designated faulty equipment, non-splicable feeders, busbar reverse transmission paths, etc.
[0119] In one of the embodiments, the operation logic constraint means prohibiting multiple operations to restore power to the same device, prohibiting the restoration of power to adjacent buses through bus merging branch switches, prohibiting conflict between bus restoration and power restoration of the same bus, and ensuring consistency of topology simulation in the same scheme.
[0120] In this embodiment, the server can train the large model in combination with the prediction target of the small model and the power grid optimization constraints, so as to improve the accuracy of the trained model.
[0121] In one of the embodiments, when training a large model, the training data input into the large model may also include model parameters of a small model. For example, the initial model parameters of the small model are input in the first training, and in subsequent model training, the model parameters of the adjusted small model are input to improve the accuracy of the large model training, save the time of the large model training, and improve the timeliness of the model training.
[0122] In one embodiment, Figure 6 As shown, a method for generating a power grid load transfer scheme is provided, and the method is applied to Figure 1 Taking the server in as an example, the following steps can be included:
[0123] Step S602, obtaining grid data of the faulty grid.
[0124] Among them, the power grid data may include real-time status data of the faulty power grid, fault information, power grid topology, load demand, equipment parameters, weather conditions, historical data, etc.
[0125] In this embodiment, when a power grid failure occurs, the server can obtain power grid data of the failed power grid and use it to generate a subsequent power grid load transfer plan.
[0126] Step S604, based on the power grid data, a small model trained by any of the training methods described above is used to generate a power grid load transfer plan corresponding to the faulty power grid.
[0127] Specifically, the server can input the acquired grid data of the faulty grid into the small model that has been trained previously, so as to output a grid load transfer plan through the small model.
[0128] In the above embodiment, by generating a transfer plan based on a pre-trained small model, different small models are only targeted at different circuit faults, that is, generating a power grid load transfer plan for a fixed circuit fault, which can improve the accuracy of the generated power grid load transfer plan and further improve the reliability of power supply.
[0129] In one of the embodiments, the above method may also include: inputting the power grid load transfer plan into the trained large model to generate an optimized model parameter adjustment plan for the small model; based on the optimized model parameter adjustment plan, updating the parameters of the small model to obtain an optimized small model.
[0130] In this embodiment, the server can also input the power grid load transfer plan generated by the small model into the large model, so that the large model generates a corresponding optimization model parameter adjustment plan based on the latest power grid load transfer plan, and performs small model optimization to improve the prediction accuracy of the small model in the first step.
[0131] It should be understood that although Figure 2 and Figure 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 6 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0132] In one embodiment, if Figure 7 As shown, a training device for a power grid load transfer scheme generation model is provided, which may include: a historical data acquisition module 701, a sample pair generation module 702, a construction module 703 and a training module 704, wherein:
[0133] The historical data acquisition module 701 is used to acquire the historical power transfer plan data of the power distribution network, and the historical power transfer plan data includes multiple historical power transfer plans.
[0134] The sample pair generation module 702 is used to generate corresponding supply transfer plan sample pairs based on each historical supply transfer plan.
[0135] Construction module 703 is used to construct an initial model for generating a power grid load transfer plan. The initial model for generating a power grid load transfer plan includes a large model and a small model. The large model is used to generate a model parameter adjustment plan for the small model, and the small model is used to generate a power grid load transfer plan.
[0136] The training module 704 is used to input the transfer plan samples into the initial model for generating the power grid load transfer plan, so as to iteratively train the initial model for generating the power grid load transfer plan, and obtain a trained power grid load transfer plan generation model, which includes a trained large model and a small model.
[0137] In one embodiment, the training module 704 inputs the transfer plan sample pairs into the initial model for generating the power grid load transfer plan to iteratively train the initial model for generating the power grid load transfer plan to obtain a trained power grid load transfer plan generation model, which may include: inputting the transfer plan sample pairs into the large model, and learning and training the transfer plan sample pairs through the large model; outputting a model parameter adjustment plan through the trained large model; configuring the model parameters of the small model based on the model parameter adjustment plan; outputting a predicted load transfer plan based on the configured small model; iteratively training the large model based on the predicted load transfer plan and the transfer plan sample pairs, and updating the model parameters of the small model until the training of the initial model for generating the power grid load transfer plan is completed.
[0138] In one embodiment, the training module 704 inputs the sample pairs of the transfer plan into the big model, and performs learning and training on the sample pairs of the transfer plan through the big model, which may include: inputting the sample pairs of the transfer plan into the big model, and obtaining the explicit information of the sample pairs of the transfer plan through the big model; based on the explicit information, performing deep learning on the sample pairs of the transfer plan to determine the potential relationships and multi-level dependencies of the sample pairs of the transfer plan.
[0139] In one of the embodiments, the explicit information includes the scheme parameter information, evaluation index information and transfer scenario description information of the transfer scheme in the transfer scheme sample; the potential relationship and multi-level dependency of the transfer scheme sample include the potential relationship and dependency between the scheme parameter information, evaluation index information and transfer scenario description information.
[0140] In one embodiment, the training module 704 iteratively trains the large model based on the predicted load transfer plan and the sample pairs of the transfer plan, which may include: determining the model loss of the large model based on the predicted load transfer plan and the sample pairs of the transfer plan; adjusting the model parameters of the large model according to the model loss; iteratively training the large model after the model parameters are adjusted until the large model converges.
[0141] In one of the embodiments, the sample pairs of the transfer scheme include positive samples and negative samples.
[0142] In this embodiment, the training module 704 determines the model loss of the large model based on the predicted load transfer plan and the transfer plan sample pairs, which may include: determining the sample pair loss of the transfer plan sample pairs according to the positive samples and the negative samples; determining the corresponding prediction loss based on the predicted load transfer plan and the positive samples; and obtaining the model loss of the large model according to the sample pair loss and the prediction loss.
[0143] In one embodiment, the training module 704 inputs the sample pairs of supply transfer plans into the large model, and performs learning and training on the sample pairs of supply transfer plans through the large model, which may include: determining the prediction target of the small model; using the prediction target as the optimization target of the large model, and performing learning and training on the large model based on the sample pairs of supply transfer plans.
[0144] In one embodiment, the sample pair generation module 702 generates corresponding transfer scheme sample pairs based on each historical transfer scheme, which may include: taking each historical transfer scheme as an initial sample, the initial sample including the transfer scenario description information, scheme parameter information and evaluation index information of the corresponding historical transfer scheme; adjusting the scheme parameter information of the initial sample to obtain multiple groups of adjusted scheme parameter information; obtaining multiple corresponding modified samples based on each group of adjusted scheme parameter information, transfer scenario description information and evaluation index information; determining the index weight corresponding to the initial sample; calculating the sample scores of the initial sample and each modified sample respectively according to the index weight; determining the positive sample and the negative sample corresponding to the initial sample from the multiple modified samples based on the sample score of the initial sample and the sample score of each modified sample to obtain a transfer scheme sample pair.
[0145] In one embodiment, if Figure 8 As shown, a power grid load transfer plan generation device is provided, which may include: a power grid data acquisition module 801 and a transfer plan generation module 802, wherein:
[0146] The power grid data acquisition module 801 is used to acquire power grid data of a faulty power grid.
[0147] The power transfer plan generation module 802 is used to generate a power grid load transfer plan corresponding to the faulty power grid based on the power grid data and the small model trained by any of the above training methods.
[0148] In one embodiment, the above device may further include:
[0149] The adjustment module is used to input the power grid load transfer plan into the trained large model to generate an optimized model parameter adjustment plan for the small model.
[0150] The optimization module is used to update the parameters of the small model based on the optimization model parameter adjustment scheme to obtain the optimized small model.
[0151] Regarding the specific limitations of the training device for the power grid load transfer scheme generation model and the power grid load transfer scheme generation device, please refer to the limitations of the training method for the power grid load transfer scheme generation model and the power grid load transfer scheme generation method above, which will not be repeated here. Each module in the above-mentioned training device for the power grid load transfer scheme generation model and the power grid load transfer scheme generation device can be fully or partially implemented by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
[0152] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store related data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a training method for a power grid load transfer scheme generation model or a power grid load transfer scheme generation method is implemented.
[0153] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a training method for a power grid load transfer scheme generation model or a power grid load transfer scheme generation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0154] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0155] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: obtaining historical transfer plan data of the power distribution network, the historical transfer plan data including multiple historical transfer plans; generating corresponding transfer plan sample pairs based on each historical transfer plan; constructing an initial model for generating a power grid load transfer plan, the initial model for generating a power grid load transfer plan including a large model and a small model, the large model is used to generate a model parameter adjustment plan for the small model, and the small model is used to generate a power grid load transfer plan; inputting the transfer plan sample pairs into the initial model for generating a power grid load transfer plan to iteratively train the initial model for generating a power grid load transfer plan to obtain a trained power grid load transfer plan generation model, the power grid load transfer plan generation model including the trained large model and the small model.
[0156] In one embodiment, when the processor executes the computer program, it implements inputting the transfer plan sample pairs into the initial model for generating the power grid load transfer plan, so as to iteratively train the initial model for generating the power grid load transfer plan, and obtain the trained power grid load transfer plan generation model, which may include: inputting the transfer plan sample pairs into the large model, and learning and training the transfer plan sample pairs through the large model; outputting the model parameter adjustment scheme through the trained large model; configuring the model parameters of the small model based on the model parameter adjustment scheme; outputting the predicted load transfer plan based on the configured small model; iteratively training the large model based on the predicted load transfer plan and the transfer plan sample pairs, and updating the model parameters of the small model until the training of the initial model for generating the power grid load transfer plan is completed.
[0157] In one of the embodiments, when the processor executes the computer program, it inputs the sample pairs of the transfer plan into the big model, and performs learning and training on the sample pairs of the transfer plan through the big model, including: inputting the sample pairs of the transfer plan into the big model, and obtaining the explicit information of the sample pairs of the transfer plan through the big model; based on the explicit information, performing deep learning on the sample pairs of the transfer plan to determine the potential relationships and multi-level dependencies of the sample pairs of the transfer plan.
[0158] In one embodiment, the explicit information includes the scheme parameter information, evaluation index information and the transfer scenario description information of the transfer scheme in the transfer scheme sample. The potential relationship and multi-level dependency of the transfer scheme sample include the potential relationship and dependency between the scheme parameter information, the evaluation index information and the transfer scenario description information.
[0159] In one of the embodiments, when the processor executes the computer program, iterative training of the large model is implemented based on the predicted load transfer plan and the sample pairs of the transfer plan, which may include: determining the model loss of the large model based on the predicted load transfer plan and the sample pairs of the transfer plan; adjusting the model parameters of the large model according to the model loss; iterative training of the large model after the model parameters are adjusted until the large model converges.
[0160] In one embodiment, the sample pairs of the transfer scheme may include positive samples and negative samples.
[0161] In this embodiment, when the processor executes the computer program, it determines the model loss of the large model based on the predicted load transfer plan and the transfer plan sample pair, which may include: determining the sample pair loss of the transfer plan sample pair based on the positive sample and the negative sample; determining the corresponding predicted loss based on the predicted load transfer plan and the positive sample; and obtaining the model loss of the large model based on the sample pair loss and the predicted loss.
[0162] In one of the embodiments, when the processor executes the computer program, it inputs the sample pairs of the transfer plan into the big model, and learns and trains the sample pairs of the transfer plan through the big model, which may include: determining the prediction target of the small model; using the prediction target as the optimization target of the big model, and learning and training the big model based on the sample pairs of the transfer plan.
[0163] In one of the embodiments, when the processor executes the computer program, it generates a corresponding transfer plan sample pair based on each historical transfer plan, which may include: taking each historical transfer plan as an initial sample, the initial sample includes the transfer scenario description information, plan parameter information and evaluation index information of the corresponding historical transfer plan; adjusting the plan parameter information of the initial sample to obtain multiple groups of adjusted plan parameter information; based on each group of adjusted plan parameter information, transfer scenario description information and evaluation index information, obtaining multiple corresponding modified samples; determining the index weight corresponding to the initial sample; according to the index weight, respectively calculating the sample scores of the initial sample and each modified sample; based on the sample score of the initial sample and the sample score of each modified sample, determining the positive sample and the negative sample corresponding to the initial sample from the multiple modified samples to obtain a transfer plan sample pair.
[0164] In one embodiment, another computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: obtaining grid data of a faulty grid; based on the grid data, generating a grid load transfer plan corresponding to the faulty grid using a small model trained by any of the above-mentioned training methods.
[0165] In one of the embodiments, when the processor executes the computer program, the following steps are also implemented: inputting the power grid load transfer plan into the trained large model to generate an optimized model parameter adjustment plan for the small model; based on the optimized model parameter adjustment plan, updating the parameters of the small model to obtain an optimized small model.
[0166] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining historical transfer plan data of the power distribution network, the historical transfer plan data including multiple historical transfer plans; generating corresponding transfer plan sample pairs based on each historical transfer plan; constructing an initial model for generating a power grid load transfer plan, the initial model for generating a power grid load transfer plan including a large model and a small model, the large model is used to generate a model parameter adjustment plan for the small model, and the small model is used to generate a power grid load transfer plan; inputting the transfer plan sample pairs into the initial model for generating a power grid load transfer plan to iteratively train the initial model for generating a power grid load transfer plan to obtain a trained power grid load transfer plan generation model, the power grid load transfer plan generation model including the trained large model and the small model.
[0167] In one embodiment, when the computer program is executed by the processor, it is implemented by inputting the transfer plan sample pairs into the initial model for generating the power grid load transfer plan, so as to iteratively train the initial model for generating the power grid load transfer plan, and obtain the trained power grid load transfer plan generation model, which may include: inputting the transfer plan sample pairs into the large model, and learning and training the transfer plan sample pairs through the large model; outputting the model parameter adjustment plan through the trained large model; configuring the model parameters of the small model based on the model parameter adjustment plan; outputting the predicted load transfer plan based on the configured small model; iteratively training the large model based on the predicted load transfer plan and the transfer plan sample pairs, and updating the model parameters of the small model until the training of the initial model for generating the power grid load transfer plan is completed.
[0168] In one of the embodiments, when the computer program is executed by the processor, it is implemented by inputting the transfer plan sample pairs into the big model, and learning and training the transfer plan sample pairs through the big model, including: inputting the transfer plan sample pairs into the big model, and obtaining the explicit information of the transfer plan sample pairs through the big model; based on the explicit information, performing deep learning on the transfer plan sample pairs to determine the potential relationships and multi-level dependencies of the transfer plan samples.
[0169] In one embodiment, the explicit information includes the scheme parameter information, evaluation index information and the transfer scenario description information of the transfer scheme in the transfer scheme sample. The potential relationship and multi-level dependency of the transfer scheme sample include the potential relationship and dependency between the scheme parameter information, the evaluation index information and the transfer scenario description information.
[0170] In one embodiment, when the computer program is executed by the processor, iterative training of the large model is implemented based on the predicted load transfer plan and the sample pairs of the transfer plan, which may include: determining the model loss of the large model based on the predicted load transfer plan and the sample pairs of the transfer plan; adjusting the model parameters of the large model according to the model loss; iterative training of the large model after the model parameters are adjusted until the large model converges.
[0171] In one embodiment, the sample pairs of the transfer scheme may include positive samples and negative samples.
[0172] In this embodiment, when the computer program is executed by the processor, it is implemented to determine the model loss of the large model based on the predicted load transfer plan and the transfer plan sample pair, which may include: determining the sample pair loss of the transfer plan sample pair based on the positive sample and the negative sample; determining the corresponding predicted loss based on the predicted load transfer plan and the positive sample; and obtaining the model loss of the large model based on the sample pair loss and the predicted loss.
[0173] In one of the embodiments, when the computer program is executed by the processor, the sample pairs of transfer plans are input into the big model, and the sample pairs of transfer plans are learned and trained through the big model, which may include: determining the prediction target of the small model; using the prediction target as the optimization target of the big model, and learning and training the big model based on the sample pairs of transfer plans.
[0174] In one of the embodiments, when the computer program is executed by the processor, it is implemented to generate corresponding transfer plan sample pairs based on each historical transfer plan, which may include: taking each historical transfer plan as an initial sample, the initial sample includes the transfer scenario description information, plan parameter information and evaluation index information of the corresponding historical transfer plan; adjusting the plan parameter information of the initial sample to obtain multiple groups of adjusted plan parameter information; based on each group of adjusted plan parameter information, transfer scenario description information and evaluation index information, obtaining multiple corresponding modified samples; determining the index weight corresponding to the initial sample; according to the index weight, respectively calculating the sample scores of the initial sample and each modified sample; based on the sample score of the initial sample and the sample score of each modified sample, determining the positive sample and the negative sample corresponding to the initial sample from the multiple modified samples to obtain the transfer plan sample pair.
[0175] In one of the embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining grid data of a faulty grid; based on the grid data, generating a grid load transfer plan corresponding to the faulty grid using a small model trained by any of the above-mentioned training methods.
[0176] In one of the embodiments, when the computer program is executed by the processor, the following steps are also implemented: inputting the power grid load transfer plan into the trained large model to generate an optimized model parameter adjustment plan for the small model; based on the optimized model parameter adjustment plan, updating the parameters of the small model to obtain an optimized small model.
[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0178] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0179] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A training method for a power grid load transfer scheme generation model, characterized in that: include: Acquire historical power transfer plan data of the power distribution network, wherein the historical power transfer plan data includes multiple historical power transfer plans; Based on each of the historical supply transfer plans, generating a corresponding supply transfer plan sample pair; Constructing an initial model for generating a power grid load transfer scheme, wherein the initial model for generating a power grid load transfer scheme includes a large model and a small model, wherein the large model is used to generate a model parameter adjustment scheme for the small model, and the small model is used to generate a power grid load transfer scheme; Inputting the transfer plan sample pair into the initial model for generating the power grid load transfer plan to iteratively train the initial model for generating the power grid load transfer plan to obtain a trained power grid load transfer plan generation model, wherein the power grid load transfer plan generation model includes a trained large model and a small model; The step of inputting the transfer scheme sample pair into the initial model for generating the power grid load transfer scheme to iteratively train the initial model for generating the power grid load transfer scheme to obtain a trained power grid load transfer scheme generation model comprises: Inputting the sample pairs of the transfer schemes into the large model, and performing learning and training on the sample pairs of the transfer schemes through the large model; Outputting a model parameter adjustment scheme through the trained large model; Based on the model parameter adjustment scheme, configuring model parameters of the small model; Output a predicted load transfer plan based on the configured small model; Based on the predicted load transfer plan and the transfer plan sample pair, the large model is iteratively trained, and the model parameters of the small model are updated until the initial model training for generating the power grid load transfer plan is completed.
2. The method according to claim 1, characterized in that The step of inputting the sample pairs of the transfer schemes into the large model and performing learning and training on the sample pairs of the transfer schemes through the large model includes: Inputting the sample pair of the transfer scheme into the large model, and obtaining explicit information of the sample pair of the transfer scheme through the large model; Based on the explicit information, deep learning is performed on the transfer plan sample pairs to determine the potential relationships and multi-level dependencies of the transfer plan samples.
3. The method according to claim 2, characterized in that The explicit information includes the scheme parameter information, evaluation index information and the transfer scenario description information of the transfer scheme in the transfer scheme sample; The potential relationship and multi-level dependencies of the transfer solution samples include the potential relationship and dependencies among the solution parameter information, evaluation index information and the transfer scenario description information.
4. The method according to claim 1, characterized in that: The iterative training of the large model based on the predicted load transfer scheme and the sample pair of transfer schemes includes: Determining a model loss of the large model based on the predicted load transfer plan and the sample pair of transfer plans; According to the model loss, adjusting the model parameters of the large model; The large model after the model parameters are adjusted is iteratively trained until the large model converges.
5. The method according to claim 4, characterized in that The sample pair of the transfer scheme includes a positive sample and a negative sample; The determining of the model loss of the large model based on the predicted load transfer scheme and the sample pair of transfer schemes includes: Determine the sample pair loss of the sample pair of the transfer scheme according to the positive samples and the negative samples; Based on the predicted load transfer scheme and the positive sample, determining a corresponding predicted loss; The model loss of the large model is obtained according to the sample pair loss and the prediction loss.
6. The method according to claim 1, characterized in that The step of inputting the sample pairs of the transfer schemes into the large model and performing learning and training on the sample pairs of the transfer schemes through the large model includes: Determining a prediction target of the small model; The prediction target is used as the optimization target of the large model, and the large model is trained based on the supply transfer plan samples.
7. The method according to claim 1, characterized in that The generating corresponding supply transfer scheme sample pairs based on each of the historical supply transfer schemes includes: Each of the historical power transfer plans is used as an initial sample, wherein the initial sample includes power transfer scenario description information, plan parameter information, and evaluation index information corresponding to the historical power transfer plan; Adjusting the scheme parameter information of the initial sample to obtain multiple sets of adjusted scheme parameter information; Based on each group of adjusted solution parameter information, the transfer scenario description information and the evaluation index information, a corresponding plurality of modified samples are obtained; Determining the indicator weights corresponding to the initial sample; Calculating the sample scores of the initial sample and each of the modified samples respectively according to the indicator weights; Based on the sample score of the initial sample and the sample scores of each of the modified samples, positive samples and negative samples corresponding to the initial sample are determined from a plurality of modified samples to obtain a sample pair of the transfer plan.
8. A method for generating a power grid load transfer plan, characterized in that: include: Obtaining grid data of the faulty grid; Based on the power grid data, a small model trained by the training method described in any one of claims 1 to 7 is used to generate a power grid load transfer plan corresponding to the faulty power grid.
9. The method according to claim 8, Its feature is that the method comprises: Inputting the power grid load transfer plan into the trained large model to generate an optimization model parameter adjustment plan for the small model; Based on the optimization model parameter adjustment scheme, the parameters of the small model are updated to obtain an optimized small model.
10. A training device for a power grid load transfer scheme generation model, characterized in that: include: A historical data acquisition module, used to acquire historical power transfer scheme data of the power distribution network, wherein the historical power transfer scheme data includes multiple historical power transfer schemes; A sample pair generation module, used to generate corresponding supply transfer plan sample pairs based on each of the historical supply transfer plans; A construction module is used to construct an initial model for generating a power grid load transfer scheme, wherein the initial model for generating a power grid load transfer scheme includes a large model and a small model, wherein the large model is used to generate a model parameter adjustment scheme for the small model, and the small model is used to generate a power grid load transfer scheme; A training module, used for inputting the transfer scheme sample pair into the power grid load transfer scheme generation initial model, so as to iteratively train the power grid load transfer scheme generation initial model, and obtain a trained power grid load transfer scheme generation model, wherein the power grid load transfer scheme generation model includes a trained large model and a small model; The step of inputting the transfer scheme sample pair into the initial model for generating the power grid load transfer scheme to iteratively train the initial model for generating the power grid load transfer scheme to obtain a trained power grid load transfer scheme generation model comprises: inputting the transfer scheme sample pair into the large model to perform learning training on the transfer scheme sample pair through the large model; The trained large model outputs a model parameter adjustment plan; based on the model parameter adjustment plan, the model parameters of the small model are configured; based on the configured small model, a predicted load transfer plan is output; based on the predicted load transfer plan and the transfer plan sample pairs, the large model is iteratively trained, and the model parameters of the small model are updated until the initial model training for the power grid load transfer plan is completed.
11. A device for generating a power grid load transfer plan, characterized in that: include: A power grid data acquisition module, used to acquire power grid data of a faulty power grid; A power transfer plan generation module is used to generate a power grid load transfer plan corresponding to the faulty power grid based on the power grid data and a small model trained by the training method described in any one of claims 1 to 7.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Power distribution network load transfer decision-making method and system
CN118735299A