Dynamic Self-Programming Operation Control Method, Device, Equipment and Medium of Virtual Power Plant

Through the dynamic self-programming operation control method of the cloud-end large language model, the problem of changes in the topology structure and flexibility resources of the virtual power plant is solved, and the automatic programming and optimized operation of the dynamic virtual power plant is realized, which improves the accuracy and adaptability of the control.

CN119717544BActive Publication Date: 2025-07-11HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510217096.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-07-11
Estimated Expiration
2045-02-26

AI Technical Summary

Technical Problem

Traditional control methods are difficult to adapt to topological changes and flexible resource parameters during operation of virtual power plants, especially the rapid access and exit of distributed flexible resources, resulting in insufficient control scalability.

Method used

The dynamic self-programming operation control method based on the cloud-end large language model is adopted. By obtaining the typical changing needs of the virtual power plant, the large language model is constructed and fine-tuned, optimization code is generated and self-corrected, and automatic programming of the dynamic virtual power plant is realized.

Benefits of technology

Automatic programming of optimized operation programs for dynamic virtual power plants is realized, the ability to adapt to changes in topological structure and flexibility resource states is improved, and the accuracy and flexibility of operation control is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119717544B_ABST
    Figure CN119717544B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of virtual power plant operation control, and particularly to a dynamic self-programming operation control method, device, equipment and medium for a virtual power plant. The method includes: obtaining typical change requirements during the operation of a target virtual power plant to write system prompt words for a cloud-side large language model; inputting the typical change requirements into the cloud-side large language model to construct a self-programming fine-tuning data set for virtual power plant operation control; using the self-programming fine-tuning data set to perform supervised fine-tuning on a pre-constructed edge-side large language model to obtain a fine-tuned edge-side large language model; inputting the target natural language change requirements into the fine-tuned edge-side large language model to generate optimized codes for virtual power plant operation control, and performing dynamic programming and self-correction on the optimized codes. Thus, the problems that existing optimization control methods are difficult to adapt to topological structure changes and flexibility resource parameter changes that occur during the operation of virtual power plants are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtual power plant operation control, and particularly relates to a dynamic self-programming operation control method, device, equipment and medium for a virtual power plant based on the coordinated cooperation of cloud-side and end-side large models. Background Art

[0002] Traditional control methods of virtual power plants can solve optimization problems overall according to their complete topological structures and resource distribution situations, and achieve the optimal operation of virtual power plants. In recent years, distributed flexible resources have developed rapidly, and their operating states change frequently. For example, the states of new energy sources such as wind and light change, mobile energy storage dynamically intervenes, and the states, quantities, and types of different types of flexible loads (demand response loads, migratable loads, energy storage loads, etc.) change dynamically. This makes the internal state of the virtual power plant change frequently, forming a dynamic virtual power plant. During the operation of the dynamic virtual power plant, there are changes in the topological structure and the access and withdrawal of a large number of flexibility-adjustable resources. The traditional control methods have insufficient scalability and are difficult to adapt to the rapid changes of flexible resources. Summary of the Invention

[0003] The present invention provides a dynamic self-programming operation control method, device, equipment and medium for a virtual power plant to solve the problems that existing optimization control methods are difficult to adapt to the changes in topological structure, flexibility resource parameter changes, access and withdrawal state changes, etc. that occur during the operation of the virtual power plant.

[0004] The first aspect embodiment of the present invention provides a dynamic self-programming operation control method for a virtual power plant, including the following steps:

[0005] Obtain typical change requirements during the operation of the target virtual power plant;

[0006] Write system prompt words for the pre-constructed initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model applicable to the dynamic programming task of the virtual power plant;

[0007] Input the typical change requirements into the cloud-side large language model to construct a self-programming fine-tuning data set for virtual power plant operation control;

[0008] Supervise and fine-tune the pre-constructed end-side large language model using the self-programming fine-tuning data set to obtain a fine-tuned end-side large language model;

[0009] Input the target natural language change requirements into the fine-tuned end-side large language model to generate optimized code for virtual power plant operation control, and perform dynamic programming and self-correction on the optimized code.

[0010] Optionally, the obtaining of the typical change requirements during the operation of the target virtual power plant includes:

[0011] Collect the historical operation data during the operation of the target virtual power plant, where the historical operation data includes the topological structure and the change situation of the flexibility resource status;

[0012] Summarize the typical change requirements during the operation of the target virtual power plant according to the historical operation data.

[0013] Optionally, the system prompt words of the pre-constructed initial cloud-side large language model are compiled according to the typical change requirements to obtain a cloud-side large language model suitable for the dynamic programming task of the virtual power plant, including:

[0014] Based on prompt engineering, describe the task to be completed by the initial cloud-side large language model in natural language, and compile the system prompt words of the initial cloud-side large language model according to the typical change requirements and the task to be completed to obtain a cloud-side large language model suitable for the dynamic programming task of the virtual power plant.

[0015] Optionally, inputting the typical change requirements into the cloud-side large language model to construct a self-programming fine-tuning data set for the operation control of the virtual power plant, including:

[0016] Use the initial cloud-side large language model to construct data for each change requirement in the typical change requirements to obtain a single-change virtual power plant dynamic demand instruction for different virtual power plant flexibility resource change types;

[0017] Use the initial cloud-side large language model to randomly combine the single-change virtual power plant dynamic demand instructions in pairs to obtain complex-change virtual power plant dynamic demand instructions for different virtual power plant flexibility resource change types;

[0018] Input the single-change virtual power plant dynamic demand instructions and the complex-change virtual power plant dynamic demand instructions into the initial cloud-side large language model with system prompt words to generate an optimized code for the operation control of the virtual power plant;

[0019] Use the pre-acquired expert experience data to judge the correctness of the optimized code for the operation control of the virtual power plant. If there are error codes, correct the optimized code for the operation control of the virtual power plant. Otherwise, use the optimized code for the operation control of the virtual power plant as a self-programming fine-tuning data set for the operation control of the virtual power plant.

[0020] Optionally, use the self-programming fine-tuning data set to perform supervised fine-tuning on the pre-constructed edge-side large language model to obtain a fine-tuned edge-side large language model, including:

[0021] Set the supervised fine-tuning hyperparameters of the edge-side large language model;

[0022] Based on the low-rank adaptation method, use the self-programming fine-tuning dataset to perform supervised fine-tuning on the pre-constructed edge large language model until the loss value of the neural network converges during the supervised fine-tuning process, and obtain the fine-tuned edge large language model.

[0023] Optionally, inputting the target natural language change requirement into the fine-tuned edge large language model to generate optimized code for virtual power plant operation control, and performing dynamic programming and self-correction on the optimized code, includes:

[0024] Input the target natural language change requirement into the fine-tuned edge large language model to generate optimized code for virtual power plant operation control;

[0025] Execute the optimized code in the interpreter. If the optimized code runs correctly, the fine-tuned edge large language model completes an automatic programming. Otherwise, feedback the code error information in the interpreter to the fine-tuned edge large language model for automatic correction to regenerate new optimized code for virtual power plant operation control, and execute the new optimized code in the interpreter. If it runs correctly, save and output the operation result, otherwise it is determined as a programming error.

[0026] An embodiment of the second aspect of the present invention provides a dynamic self-programming operation control device for a virtual power plant, including:

[0027] An acquisition module, configured to acquire typical change requirements during the operation of the target virtual power plant;

[0028] A writing module, configured to write system prompt words of the pre-constructed initial cloud large language model according to the typical change requirements to obtain a cloud large language model suitable for virtual power plant dynamic programming tasks;

[0029] A construction module, configured to input the typical change requirements into the cloud large language model to construct a self-programming fine-tuning dataset for virtual power plant operation control;

[0030] A fine-tuning module, configured to perform supervised fine-tuning on the pre-constructed edge large language model by using the self-programming fine-tuning dataset to obtain a fine-tuned edge large language model;

[0031] A programming module, configured to input the target natural language change requirement into the fine-tuned edge large language model to generate optimized code for virtual power plant operation control, and perform dynamic programming and self-correction on the optimized code.

[0032] An embodiment of the third aspect of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the dynamic self-programming operation control method of the virtual power plant as described in the above embodiment.

[0033] An embodiment of the fourth aspect of the present invention provides a computer program product, and when the computer program / instructions are executed by a processor, the dynamic self-programming operation control method of the virtual power plant as described above is implemented.

[0034] An embodiment of the fifth aspect of the present invention provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the program is executed by a processor, the dynamic self-programming operation control method of the virtual power plant as described above is implemented.

[0035] The dynamic self-programming operation control method, device, equipment, and medium of the virtual power plant proposed in the embodiments of the present invention make full use of the powerful understanding and generation capabilities of the large language model for natural language and programming language, and can realize automatic programming of the optimized operation program of the dynamic virtual power plant according to the changing demand instructions input in natural language by the user, effectively improving the ability of traditional control methods to adapt to the changes in the topological structure of the virtual power plant and the state of flexibility resources, and can be applied to the variable demand operation control of virtual power plants containing various flexibility resources, facilitating the local deployment of the virtual power plant control center, and having excellent accuracy.

[0036] Additional aspects and advantages of the present invention will be given in part in the following description, will become apparent in part from the following description, or will be understood through the practice of the present invention. Description of the Drawings

[0037] The above and / or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0038] Figure 1 is a flowchart of a dynamic self-programming operation control method of a virtual power plant provided by an embodiment of the present invention;

[0039] Figure 2 is a schematic diagram of the specific framework of a dynamic self-programming operation control method of a virtual power plant provided by an embodiment of the present invention;

[0040] Figure 3 is a schematic diagram of a 15-node dynamic virtual power plant simulation environment provided by an embodiment of the present invention;

[0041] Figure 4 is a schematic diagram of the specific execution of the dynamic self-programming operation control method of a 15-node dynamic virtual power plant provided by an embodiment of the present invention;

[0042] Figure 5 The generated result diagram of the 15-node dynamic virtual power plant provided by the embodiment of the present invention;

[0043] Figure 6 The schematic diagram of the accuracy comparison result of a dynamic self-programming operation control method for a virtual power plant provided by the embodiment of the present invention;

[0044] Figure 7 The schematic block diagram of a dynamic self-programming operation control device for a virtual power plant provided by the embodiment of the present invention;

[0045] Figure 8 The schematic structural diagram of an electronic device provided by the embodiment of the present invention. Detailed implementation manners

[0046] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, in which the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions from beginning to end. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the present invention, and should not be construed as a limitation to the present invention.

[0047] The dynamic self-programming operation control method, device, equipment and medium of the virtual power plant according to the embodiments of the present invention will be described below with reference to the accompanying drawings.

[0048] Figure 1 The flowchart of a dynamic self-programming operation control method for a virtual power plant provided by the embodiment of the present invention.

[0049] As Figure 1 shown, the dynamic self-programming operation control method of the virtual power plant includes the following steps:

[0050] In step S101, obtain the typical change requirements during the operation of the target virtual power plant.

[0051] In some embodiments, obtaining the typical change requirements during the operation of the target virtual power plant includes:

[0052] Collect the historical operation data during the operation of the target virtual power plant, where the historical operation data includes the topological structure and the change situation of the flexibility resource status;

[0053] Summarize the typical change requirements during the operation of the target virtual power plant according to the historical operation data.

[0054] In the actual execution process, collect the typical change requirements such as the internal connection relationship during the operation of the virtual power plant and the node maintenance, topological structure change, flexibility resource access / exit, and controllable load response period change during the historical operation process.

[0055] Specifically, collect the changes in the internal structure or the state of flexibility resources that occur during the operation of the virtual power plant (such as changes in the state of new energy sources such as wind and light, the dynamic intervention of mobile energy storage, and the dynamic changes in the state, quantity, and type of different types of flexible loads); based on the historical operation data of the virtual power plant, summarize several typical change types that may occur during its operation, and clarify the data that may change in each typical change type and the possible change ranges of each data item.

[0056] In step S102, write system prompt words for the pre-constructed initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model suitable for the dynamic programming task of the virtual power plant.

[0057] In some embodiments, writing system prompt words for the pre-constructed initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model suitable for the dynamic programming task of the virtual power plant includes:

[0058] Based on prompt engineering, describe the task to be completed by the initial cloud-side large language model using natural language, and write the system prompt words for the initial cloud-side large language model according to the typical change requirements and the task to be completed to obtain a cloud-side large language model suitable for the dynamic programming task of the virtual power plant.

[0059] During the actual execution process, based on prompt engineering, describe the task that the large language model needs to complete using natural language, and combine expert experience to write optimized code for operating and controlling the virtual power plant considering the safety operation constraints of the virtual power plant according to the topological structure and flexibility resource configuration of the virtual power plant under normal operating conditions. Use the topological structure of the virtual power plant and the optimized code for operating and controlling the virtual power plant as the example part in the prompt words.

[0060] Specifically, in combination with the techniques related to prompt engineering, natural language is used to describe the tasks that the large language model needs to complete. The prompts are generally divided into four parts: identity setting, topology structure description, reference optimization program, and examples. An identity setting (such as "You are a power system expert, specializing in the dynamic control of flexibility resources in virtual power plants. Your task is to help users design and implement the dynamic self-programming function of virtual power plants to optimize energy scheduling, improve grid stability, and maximize economic benefits.") is added to the prompts to enable the large language model to quickly and accurately grasp the direction of problem processing. According to the topology structure corresponding to the virtual power plant in the normal operation state in the typical change requirements, natural language is used to describe the connection relationship of the virtual power plant as an additional part of the system prompts of the large language model. According to the optimized operation control objectives of the virtual power plant in the normal operation state in the typical change requirements, combined with expert experience, the corresponding optimized code is written as the reference optimization program part in the prompts. According to the typical change types of the virtual power plant in the typical change requirements, one change type is selected and the specific values of each changed data are clarified. According to this command, combined with expert experience, the corresponding adjusted optimized code is written, and the requirement instruction and the corresponding optimized code are used as the example part in the prompts.

[0061] In step S103, the typical change requirements are input into the cloud-side large language model to construct a self-programming fine-tuning data set for virtual power plant operation control.

[0062] In some embodiments, inputting the typical change requirements into the cloud-side large language model to construct a self-programming fine-tuning data set for virtual power plant operation control includes:

[0063] Using the initial cloud-side large language model to construct data for each change requirement in the typical change requirements to obtain a single change virtual power plant dynamic requirement instruction for different virtual power plant flexibility resource change types;

[0064] Inputting the single change virtual power plant dynamic requirement instruction and the complex change virtual power plant dynamic requirement instruction into the initial cloud-side large language model with system prompts to generate an optimized code for virtual power plant operation control;

[0065] Using the pre-acquired expert experience data to judge the correctness of the optimized code for virtual power plant operation control. If there are error codes, the optimized code for virtual power plant operation control is corrected. Otherwise, the optimized code for virtual power plant operation control is written into the self-programming fine-tuning data set for virtual power plant operation control.

[0066] During the actual execution process, the typical change requirements that may occur during the operation of the virtual power plant are input into the cloud-side large language model, and combined with expert experience, a self-programming fine-tuning data set for virtual power plant operation control is constructed to be used for the supervised fine-tuning of the edge-side large language model.

[0067] Specifically, as Figure 2 shown, according to the typical flexible resource dynamic change types and corresponding data change ranges that may occur during the operation of the virtual power plant in typical change requirements, combined with the large language model on the cloud side, data construction is carried out for each type of change requirement, so that the description methods of each requirement instruction are different, and a single change virtual power plant dynamic requirement instruction is obtained; the initial large language model on the cloud side is used to randomly combine the single change virtual power plant dynamic requirement instructions in pairs to construct complex change virtual power plant dynamic requirement instructions in different virtual power plant flexible resource change types;

[0068] Taking the prompt words in step S102 as the system prompt words of the large language model on the cloud side, and taking the single change virtual power plant dynamic requirement instructions and complex change virtual power plant dynamic requirement instructions as the user input of the large language model on the cloud side, the virtual power plant operation control optimization code generated by the large language model on the cloud side for each change requirement is obtained, and its correctness is judged using expert experience, and the wrong code is adjusted manually to ensure the correctness of the constructed fine-tuning data set; and 80% of the randomly selected constructed data set is used as the supervised fine-tuning training set, and the other 20% is used as the test set.

[0069] In step S104, the pre-constructed edge-side large language model is supervised and fine-tuned using the self-programming fine-tuning data set to obtain the fine-tuned edge-side large language model.

[0070] In some embodiments, supervising and fine-tuning the pre-constructed edge-side large language model using the self-programming fine-tuning data set to obtain the fine-tuned edge-side large language model includes:

[0071] Setting the supervised fine-tuning hyperparameters of the edge-side large language model;

[0072] Based on the low-rank adaptation method, the pre-constructed edge-side large language model is supervised and fine-tuned using the self-programming fine-tuning data set until the loss value of the neural network in the supervised fine-tuning process converges, and the fine-tuned edge-side large language model is obtained.

[0073] During the actual execution process, the self-programming fine-tuning data set constructed in step S103 is used for the supervised fine-tuning process of the edge-side large language model, so that the edge-side large language model realizes the virtual power plant operation control self-programming function.

[0074] Specifically, as Figure 2As shown, load the large language model on the cloud side and the self-programming fine-tuning data set constructed in step S103; set the supervised fine-tuning hyperparameters of the large language model on the edge side, and use the low-rank adaptation method to perform supervised fine-tuning training on the large language model on the edge side for the training data set, so as to realize the automatic programming of the virtual power plant operation control optimization code, which is convenient for local deployment and secure invocation; when the loss value of the neural network converges during the supervised fine-tuning process, it is judged that the fine-tuning of the large language model on the edge side is completed and the training ends; randomly select several pieces of test set data constructed in step S103, conduct a preliminary test on the fine-tuned large language model and save the fine-tuned large language model.

[0075] In step S105, input the target natural language change requirement into the fine-tuned large language model on the edge side to generate the optimization code for virtual power plant operation control, and perform dynamic programming and self-correction on the optimization code.

[0076] In some embodiments, inputting the target natural language change requirement into the fine-tuned large language model on the edge side to generate the optimization code for virtual power plant operation control, and performing dynamic programming and self-correction on the optimization code includes:

[0077] Input the target natural language change requirement into the fine-tuned large language model on the edge side to generate the optimization code for virtual power plant operation control;

[0078] Execute the optimization code in the interpreter. If the optimization code runs correctly, the fine-tuned large language model on the edge side completes an automatic programming. Otherwise, feedback the code error message in the interpreter to the fine-tuned large language model on the edge side for automatic correction to regenerate the new optimization code for virtual power plant operation control, and execute the new optimization code in the interpreter. If it runs correctly, save and output the operation result, otherwise it is determined as a programming error.

[0079] During the actual execution process, use natural language to describe the change requirements that occur during the operation of the virtual power plant, input it into the fine-tuned large language model on the edge side. After the fine-tuned large language model on the edge side outputs the corresponding programming code, it is executed through the interpreter. When the code runs successfully, the fine-tuned large language model on the edge side completes the automatic programming. Otherwise, feedback the code running error message in the interpreter to the fine-tuned large language model on the edge side in the form of a continuous dialogue, so that it regenerates the operation control optimization code and executes it in the interpreter.

[0080] Specifically, as Figure 2As shown in the figure, the change requirement instructions in the test set are input into the fine-tuned edge large language model to obtain the optimized code generated by the fine-tuned edge large language model; the optimized code generated by the fine-tuned edge large language model is executed in the interpreter. When the code can run correctly, it means that the model has completed an automatic programming. Otherwise, the error message of the code in the interpreter is fed back to the fine-tuned edge large language model in the form of context, so that it can regenerate the optimized code and execute it again to achieve the feedback self-correction of code generation, so as to further improve the accuracy of the optimized code for the operation control of the virtual power plant generated by the edge large language model. If it runs correctly, the running result is saved and output. Otherwise, it is determined as a programming error and waits for a new round of instruction input.

[0081] Next, the dynamic self-programming operation control method of the virtual power plant proposed in the embodiment of the present invention will be further described by taking a 15-node virtual power plant as the experimental object.

[0082] First, as Figure 3 shown in the figure, Node 1 is the connection point of the virtual power plant and the upper-level distribution network, and the remaining nodes are controllable load nodes. The solid line part represents the sectional switch, and the dotted line represents the tie switch. In the normal operation state of the virtual power plant, the sectional switch is in the closed state, while the tie switch is in the open state. However, in some cases, the states of the sectional switch and the tie switch may change, which may lead to a change in the topological structure inside the virtual power plant.

[0083] Second, collect the typical change requirements that occurred during the historical operation of the virtual power plant and classify them into four typical types. The first type of change requirement is the maintenance of nodes in the virtual power plant, and at this time, the node load needs to be set to 0; the second type of change requirement is the access or withdrawal of the power generation unit in the virtual power plant; the third type of change requirement is the change in the topological structure (i.e., the connection relationship) in the virtual power plant; the fourth type of change requirement is the combined change of the first three change types, and the requirement is more complex.

[0084] Third, design prompt words for this problem scenario and functional requirements. The specific composition structure of the prompt words includes five parts, namely initial setting (identity setting), virtual power plant topological structure description, data loading program, optimization reference program, and output example.

[0085] In the optimization reference program part, set the control target of the virtual power plant to minimize the operation cost at the current moment (1 hour), which is specifically expressed as follows:

[0086] (1)

[0087] Among them, represents the objective function, that is, the operation cost of the virtual power plant at the current moment, represents the number of power generation units in the virtual power plant, Denote the maximum order of the cost coefficient of the power generation unit, Denote the -th order cost coefficient of the power generation unit, Denote the output power of the -th energy storage system at the current moment.

[0088] The constraint conditions are set as follows:

[0089] (2)

[0090] (3)

[0091] (4)

[0092] (5)

[0093] (6)

[0094] (7)

[0095] Among them, is the real part of the complex voltage at node , is the number of all nodes in this virtual power plant, is the conductance of branch , is the real part of the complex voltage at node , is the susceptance of branch , is the imaginary part of the complex voltage at node , is the imaginary part of the complex voltage at node , is the total active power demand at node , is the total reactive power demand at node , is the active power load injected at node , is the active power output of the power generation unit at node , is the set of nodes containing generators in this virtual power plant, is the reactive power load injected at node , is the reactive power output of the power generation unit at node , is the maximum allowable value of the current flowing through this virtual power plant, For a branch The current value flowing from node to node , and are the lower and upper limit values of the node voltage respectively, is the voltage amplitude at node .

[0096] In the process of constructing the supervised fine-tuning dataset, the main variable parameters and data allowable ranges in the above three typical change requirements are sorted out, and each type of data is constructed separately with the help of large language models and expert experience. Further, any two change requirements are combined to form complex change requirements. Hundreds of datasets are constructed in the above way. The supervised fine-tuning dataset is divided into a training set and a test set.

[0097] Using the above supervised fine-tuning training set, the original edge large language model is supervised and fine-tuned using the LoRA method, so that its cross-entropy loss value converges to around 0.01. At this time, it is considered that the edge large language model training is completed.

[0098] As Figures 4 - 6 shown, the test set data is input into the fine-tuned edge large language model in turn to obtain the optimized code generated for specific requirements, and the interpreter is called to execute it. If the code is executed correctly, the scheduling result is output; otherwise, the error message of the interpreter is input into the edge large language model in the form of context, so that it reflects on the generated code and regenerates the optimized code. Through the above method, the accuracy of the edge large language model in generating optimized code can be further improved.

[0099] In summary, according to the dynamic self-programming operation control method of the virtual power plant proposed in the embodiment of the present invention, the following beneficial effects are obtained:

[0100] (1) It makes full use of the powerful understanding and generation capabilities of large language models for natural language and programming languages, and can realize the automatic programming of the optimized operation program of the dynamic virtual power plant according to the change requirement instructions input by the user's natural language;

[0101] (2) It realizes that the accuracy of the edge large language model in automatic programming is close to that of the cloud large language model, and with the help of the feedback code self-correction mechanism, the programming accuracy of the edge large language model is further improved;

[0102] (3) It effectively improves the ability of traditional control methods to adapt to the changes in the topology of the virtual power plant and the state changes of flexible resources, and can be applied to the variable demand operation control of virtual power plants containing various flexible resources, which is convenient for the local deployment of the virtual power plant control center and has excellent accuracy.

[0103] Next, a dynamic self-programming operation control device for a virtual power plant according to an embodiment of the present invention will be described with reference to the accompanying drawings.

[0104] Figure 7 It is a block diagram of a dynamic self-programming operation control device for a virtual power plant according to an embodiment of the present invention.

[0105] As Figure 7 shown, the dynamic self-programming operation control device 70 of the virtual power plant includes: an acquisition module 701, a writing module 702, a construction module 703, a fine-tuning module 704, and a programming module 705.

[0106] Among them, the acquisition module 701 is used to acquire typical change requirements during the operation of the target virtual power plant. The writing module 702 is used to write the system prompt words of the pre-constructed initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model suitable for the dynamic programming task of the virtual power plant. The construction module 703 is used to input the typical change requirements into the cloud-side large language model to construct a self-programming fine-tuning data set for the operation control of the virtual power plant. The fine-tuning module 704 is used to perform supervised fine-tuning on the pre-constructed end-side large language model by using the self-programming fine-tuning data set to obtain a fine-tuned end-side large language model. The programming module 705 is used to input the target natural language change requirements into the fine-tuned end-side large language model to generate optimized codes for the operation control of the virtual power plant, and perform dynamic programming and self-correction on the optimized codes.

[0107] In some embodiments, the acquisition module 701 includes:

[0108] An acquisition unit, configured to acquire historical operation data during the operation of the target virtual power plant, where the historical operation data includes the topological structure and the change situation of the flexibility resource status;

[0109] An induction unit, configured to summarize and induce typical change requirements during the operation of the target virtual power plant according to the historical operation data.

[0110] In some embodiments, the writing module 702 includes:

[0111] Based on prompt engineering, use natural language to describe the task to be completed by the initial cloud-side large language model, and write the system prompt words of the initial cloud-side large language model according to the typical change requirements and the task to be completed to obtain a cloud-side large language model suitable for the dynamic programming task of the virtual power plant.

[0112] In some embodiments, the construction module 703 includes:

[0113] A data construction unit for using the initial cloud-side large language model to construct data for each change requirement in the typical change requirements, so as to obtain a single change virtual power plant dynamic demand instruction for different virtual power plant flexibility resource change types;

[0114] A combination unit for using the initial cloud-side large language model to randomly combine single change virtual power plant dynamic demand instructions in pairs, so as to obtain complex change virtual power plant dynamic demand instructions for different virtual power plant flexibility resource change types;

[0115] A control code generation unit for inputting the single change virtual power plant dynamic demand instruction and the complex change virtual power plant dynamic demand instruction into the initial cloud-side large language model with system prompt words to generate virtual power plant operation control optimization code;

[0116] A correction construction unit for using the pre-acquired expert experience data to judge the correctness of the virtual power plant operation control optimization code. If there is an error code, correct the virtual power plant operation control optimization code. Otherwise, use the virtual power plant operation control optimization code as the self-programming fine-tuning data set for virtual power plant operation control.

[0117] In some embodiments, the fine-tuning module 704 includes:

[0118] A setting unit for setting the supervised fine-tuning hyperparameters of the edge-side large language model;

[0119] A fine-tuning unit for performing supervised fine-tuning on the pre-constructed edge-side large language model based on the low-rank adaptation method using the self-programming fine-tuning data set until the loss value of the neural network converges during the supervised fine-tuning process, and obtaining the fine-tuned edge-side large language model.

[0120] In some embodiments, the programming module 705 includes:

[0121] A solution code generation unit for inputting the target natural language change requirement into the fine-tuned edge-side large language model to generate the optimization code for virtual power plant operation control;

[0122] A programming and correction unit for executing the optimization code in the interpreter. If the optimization code runs correctly, the fine-tuned edge-side large language model completes an automatic programming. Otherwise, feedback the code error information in the interpreter to the fine-tuned edge-side large language model for automatic correction to regenerate the new optimization code for virtual power plant operation control, and execute the new optimization code in the interpreter. If it runs correctly, save and output the operation result. Otherwise, it is determined as a programming error.

[0123] It should be noted that the foregoing explanatory description of the embodiments of the dynamic self-programming operation control method of the virtual power plant also applies to the dynamic self-programming operation control device of the virtual power plant in this embodiment, and will not be elaborated here.

[0124] The dynamic self-programming operation control device of the virtual power plant proposed according to the embodiments of the present invention has the following beneficial effects:

[0125] (1) It makes full use of the powerful understanding and generation capabilities of the large language model for natural language and programming language, and can realize the automatic programming of the optimized operation program of the dynamic virtual power plant according to the changing demand instructions input in natural language by users.

[0126] (2) It realizes that the accuracy of automatic programming of the large language model on the terminal side is close to that of the large language model on the cloud side, and with the help of the feedback code self-correction mechanism, the programming accuracy of the large language model on the terminal side is further improved.

[0127] (3) It effectively improves the ability of traditional control methods to adapt to the changes in the topology structure of the virtual power plant and the state changes of flexible resources, and can be applied to the variable demand operation control of virtual power plants containing various flexible resources, which is convenient for the local deployment of the virtual power plant control center and has excellent accuracy.

[0128] Figure 8 The following is a schematic structural diagram of the electronic device provided by the embodiments of the present invention. The electronic device may include:

[0129] A memory 801, a processor 802, and a computer program stored on the memory 801 and executable on the processor 802.

[0130] When the processor 802 executes the program, it implements the dynamic self-programming operation control method of the virtual power plant provided in the above embodiments.

[0131] Furthermore, the electronic device further includes:

[0132] A communication interface 803 for communication between the memory 801 and the processor 802.

[0133] The memory 801 is used to store a computer program executable on the processor 802.

[0134] The memory 801 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0135] If the memory 801, the processor 802, and the communication interface 803 are implemented independently, the communication interface 803, the memory 801, and the processor 802 can be interconnected through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 only a thick line is used to represent it in Figure 8 , but it does not mean that there is only one bus or one type of bus.

[0136] Optionally, in a specific implementation, if the memory 801, the processor 802, and the communication interface 803 are integrated on a single chip, the memory 801, the processor 802, and the communication interface 803 can communicate with each other through an internal interface.

[0137] The processor 802 may be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.

[0138] The embodiments of the present invention also provide a computer program product. When the computer program / instructions are executed by a processor, the dynamic self-programming operation control method of the virtual power plant as described above is implemented.

[0139] The embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the dynamic self-programming operation control method of the virtual power plant as described above is implemented.

[0140] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0141] In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0142] Any process or method description shown in the flowchart or described in other ways herein can be understood to represent a module, segment, or portion of code including one or N executable instructions for implementing a customized logical function or process, and the scope of the preferred embodiments of the present invention includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in the reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0143] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite ordered list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in conjunction with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection part (electronic device) having one or N wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then stored in a computer memory.

[0144] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0145] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0146] In addition, each functional unit in various embodiments of the present invention may be integrated into one processing module, may exist physically alone for each unit, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and written for independent product sales or use, it may also be stored in a computer-readable storage medium.

[0147] The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disc, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A dynamic self-programming operation control method for a virtual power plant, characterized in that Including the following steps: Obtain typical change requirements during the operation of the target virtual power plant. Among them, the obtaining of typical change requirements during the operation of the target virtual power plant includes: Collect historical operation data during the operation of the target virtual power plant. Among them, the historical operation data includes the topological structure and the change situation of the flexibility resource status; Summarize the typical change requirements during the operation of the target virtual power plant based on the historical operation data; Write system prompt words for the pre-constructed initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model suitable for virtual power plant dynamic programming tasks; Input the typical change requirements into the cloud-side large language model to construct a self-programming fine-tuning data set for virtual power plant operation control; Use the self-programming fine-tuning data set to perform supervised fine-tuning on the pre-constructed edge-side large language model to obtain a fine-tuned edge-side large language model; Input the target natural language change requirements into the fine-tuned edge-side large language model to generate optimized codes for virtual power plant operation control, and perform dynamic programming and self-correction on the optimized codes.

2. The dynamic self-programming operation control method of the virtual power plant according to claim 1, characterized in that The writing of system prompt words for the pre-constructed initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model suitable for virtual power plant dynamic programming tasks includes: Based on prompt engineering, use natural language to describe the tasks to be completed by the initial cloud-side large language model, and write system prompt words for the initial cloud-side large language model according to the typical change requirements and the tasks to be completed to obtain a cloud-side large language model suitable for virtual power plant dynamic programming tasks.

3. The dynamic self-programming operation control method of the virtual power plant according to claim 1, characterized in that The inputting of the typical change requirements into the cloud-side large language model to construct a self-programming fine-tuning data set for virtual power plant operation control includes: Use the initial cloud-side large language model to construct data for each change requirement in the typical change requirements to obtain a single-change virtual power plant dynamic demand instruction for different virtual power plant flexibility resource change types; Use the initial cloud-side large language model to randomly combine the single-change virtual power plant dynamic demand instructions in pairs to obtain complex-change virtual power plant dynamic demand instructions for different virtual power plant flexibility resource change types; Input the single-change virtual power plant dynamic demand instructions and the complex-change virtual power plant dynamic demand instructions into the initial cloud-side large language model with system prompt words to generate optimized codes for virtual power plant operation control; Use the pre-obtained expert experience data to judge the correctness of the optimized codes for virtual power plant operation control. If there are error codes, correct the optimized codes for virtual power plant operation control. Otherwise, write the optimized codes for virtual power plant operation control into the self-programming fine-tuning data set for virtual power plant operation control.

4. The dynamic self-programming operation control method of the virtual power plant according to claim 1, wherein, The using of the self-programming fine-tuning data set to perform supervised fine-tuning on the pre-constructed edge-side large language model to obtain a fine-tuned edge-side large language model includes: Set the supervised fine-tuning hyperparameters of the edge-side large language model; Based on the low-rank adaptation method, use the self-programming fine-tuning dataset to perform supervised fine-tuning on the pre-constructed edge large language model until the loss value of the neural network in the supervised fine-tuning process converges, and obtain the fine-tuned edge large language model.

5. The dynamic self-programming operation control method of the virtual power plant according to claim 1, characterized in that, Input the target natural language change requirement into the fine-tuned edge large language model to generate the optimized code for virtual power plant operation control, and perform dynamic programming and self-correction on the optimized code, including: Input the target natural language change requirement into the fine-tuned edge large language model to generate the optimized code for virtual power plant operation control; Execute the optimized code in the interpreter. If the optimized code runs correctly, the fine-tuned edge large language model completes an automatic programming. Otherwise, feedback the code error information in the interpreter to the fine-tuned edge large language model for automatic correction to regenerate the new optimized code for virtual power plant operation control, and execute the new optimized code in the interpreter. If it runs correctly, save and output the operation result. Otherwise, it is determined as a programming error.

6. A dynamic self-programming operation control device for a virtual power plant, characterized in that, Including: An acquisition module for acquiring typical change requirements during the operation of the target virtual power plant, where the acquisition module includes: A collection unit for collecting historical operation data during the operation of the target virtual power plant, where the historical operation data includes the topological structure and the change situation of the flexibility resource status; An induction unit for summarizing the typical change requirements during the operation of the target virtual power plant according to the historical operation data; A writing module for writing the system prompt words of the pre-constructed initial cloud large language model according to the typical change requirements to obtain a cloud large language model suitable for the virtual power plant dynamic programming task; A construction module for inputting the typical change requirements into the cloud large language model to construct a self-programming fine-tuning dataset for virtual power plant operation control; A fine-tuning module for using the self-programming fine-tuning dataset to perform supervised fine-tuning on the pre-constructed edge large language model to obtain the fine-tuned edge large language model; A programming module for inputting the target natural language change requirement into the fine-tuned edge large language model to generate the optimized code for virtual power plant operation control, and performing dynamic programming and self-correction on the optimized code.

7. An electronic device, characterized in that, Including: A memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the dynamic self-programming operation control method of the virtual power plant according to any one of claims 1-5.

8. A computer program product, characterized in that, When the computer program / instructions are executed by the processor, the dynamic self-programming operation control method of the virtual power plant according to any one of claims 1-5 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to be used to implement the dynamic self-programming operation control method of the virtual power plant according to any one of claims 1-5.

Citation Information

Patent Citations

  • Virtual power plant low-code platform operation method and framework

    CN118017466A

  • Code generation model fine tuning method and device based on clustering and natural language strategy optimization algorithm

    CN118468982A