Dynamic self-programming operation control method and device of virtual power plant, equipment and medium

Through the dynamic self-programming operation control method based on cloud-based large-scale models, the adaptation problem of changes in topology structure and flexibility resources during operation of virtual power plants is solved, and high-accuracy optimized operation control is achieved.

CN119717544AActive Publication Date: 2025-03-28HARBIN INST OF TECH

Patent Information

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

AI Technical Summary

Technical Problem

The existing optimization control methods are difficult to adapt to problems such as changes in topological structure and flexibility resource parameters, access and exit status changes during operation of virtual power plants.

Method used

A dynamic self-programming operation control method based on cloud-based large-scale models is adopted. By obtaining typical changing needs, writing system prompt words, constructing self-programming fine-tuning data sets, supervising and fine-tuning the end-side large language model, generating optimization code, and dynamic programming and self-correction.

Benefits of technology

It realizes optimized operation control of dynamic virtual power plants, adapts to changes in topological structure and flexibility resource state, and improves the accuracy and scalability of control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119717544A_ABST
    Figure CN119717544A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of virtual power plant operation control, in particular to a dynamic self-programming operation control method and device for a virtual power plant, equipment and a medium, and the method comprises the steps: obtaining a typical change demand in the operation process of a target virtual power plant, so as to compile a system cue word of a cloud side large language model; inputting the typical change demand into the cloud side large language model to construct a self-programming fine tuning data set for virtual power plant operation control; utilizing the self-programming fine tuning data set to carry out supervision fine tuning on a pre-constructed end-side large language model so as to obtain a fine-tuned end-side large language model; and inputting the target natural language change demand into the fine-tuned end-side large language model to generate an optimization code for virtual power plant operation control, and carrying out dynamic programming and self-correction on the optimization code. Therefore, the problem that an existing optimization control method is difficult to adapt to topological structure changes, flexible resource parameter changes and the like in the operation process of the virtual power plant is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtual power plant operation control technology, and in particular to a dynamic self-programming operation control method, device, equipment and medium for a virtual power plant based on cloud-end large model coordination. Background Art

[0002] The traditional control method of the virtual power plant can comprehensively solve the optimization problem according to its complete topological structure and resource distribution, and realize the optimized operation of the virtual power plant. In recent years, distributed flexible resources have developed rapidly, and their operating status has changed frequently, such as changes in the status of new energy such as wind and solar, dynamic intervention of mobile energy storage, and dynamic changes in the status, quantity, and type of different types of flexible loads (demand response loads, portable loads, energy storage loads, etc.). This causes the internal state of the virtual power plant to 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 exit of a large number of flexible and adjustable resources. The traditional control method is not scalable enough and it is 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 the existing optimization control method is difficult to adapt to the changes in topology structure and flexibility resource parameters, access and exit status changes that occur during the operation of the virtual power plant.

[0004] A first aspect of the present invention provides a method for dynamically self-programming operation control of a virtual power plant, comprising the following steps: Obtain typical changing requirements during the operation of the target virtual power plant; Writing system prompt words of a pre-built initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model suitable for dynamic programming tasks of a virtual power plant; 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; Performing supervised fine-tuning on the pre-built large end-side language model using the self-programmed fine-tuning dataset to obtain a fine-tuned large end-side language model; The target natural language change requirements are input into the fine-tuned end-side large language model to generate optimized code for virtual power plant operation control, and the optimized code is dynamically programmed and self-corrected.

[0005] Optionally, obtaining typical change requirements during the operation of the target virtual power plant includes: Collecting historical operation data during the operation of the target virtual power plant, wherein the historical operation data includes changes in topology structure and flexibility resource status; Typical changing requirements during the operation of the target virtual power plant are summarized based on the historical operating data.

[0006] Optionally, the writing of system prompt words of a pre-built initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model suitable for a virtual power plant dynamic programming task includes: Based on the prompt word engineering, natural language is used to describe the tasks to be completed of the initial cloud-side large language model, and system prompt words of the initial cloud-side large language model are written according to the typical change requirements and the tasks to be completed, so as to obtain a cloud-side large language model suitable for dynamic programming tasks of virtual power plants.

[0007] Optionally, 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: Using the initial cloud-side large language model to construct data for each of the typical change requirements, so as to obtain a single change virtual power plant dynamic demand instruction in different virtual power plant flexibility resource change types; The single-change virtual power plant dynamic demand instructions are randomly combined in pairs by using the initial cloud-side large language model to obtain complex-change virtual power plant dynamic demand instructions in different virtual power plant flexibility resource change types; Inputting the single-change virtual power plant dynamic demand instruction and the complex-change virtual power plant dynamic demand instruction into an initial cloud-side large language model with system prompt words to generate a virtual power plant operation control optimization code; The correctness of the virtual power plant operation control optimization code is judged by using pre-acquired expert experience data. If an error code exists, the virtual power plant operation control optimization code is corrected. Otherwise, the virtual power plant operation control optimization code is used as a self-programming fine-tuning data set for the virtual power plant operation control.

[0008] Optionally, the using the self-programmed fine-tuning dataset to supervisely fine-tune the pre-built large end-side language model to obtain a fine-tuned large end-side language model includes: Setting supervised fine-tuning hyper parameters of the client-side large language model; Based on the low-rank adaptive method, the pre-built large end-side language model is supervised fine-tuned using the self-programmed fine-tuning dataset until the loss value of the neural network converges during the supervised fine-tuning process, thereby obtaining the fine-tuned large end-side language model.

[0009] Optionally, inputting the target natural language change requirement into the fine-tuned end-side large language model to generate an optimized code for virtual power plant operation control, and dynamically programming and self-correcting the optimized code, includes: Inputting the target natural language change requirement into the fine-tuned end-side large language model to generate optimized code for virtual power plant operation control; The optimized code is executed in the interpreter. If the optimized code runs correctly, the fine-tuned end-side large language model completes an automatic programming. Otherwise, the code error information in the interpreter is fed back to the fine-tuned end-side large language model for automatic correction to regenerate a new optimized code for the operation control of the virtual power plant. The new optimized code is executed in the interpreter. If it runs correctly, the operation result is saved and output. Otherwise, it is judged as a programming error.

[0010] A second aspect of the present invention provides a dynamic self-programming operation control device for a virtual power plant, comprising: An acquisition module is used to acquire typical change requirements during the operation of the target virtual power plant; A writing module, used for writing system prompt words of a pre-built initial cloud-side large language model according to the typical change requirements, so as to obtain a cloud-side large language model suitable for a virtual power plant dynamic programming task; A construction module, used for 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; A fine-tuning module, configured to perform supervised fine-tuning on a pre-built large end-side language model using the self-programmed fine-tuning dataset to obtain a fine-tuned large end-side language model; A programming module is used to 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 dynamically program and self-correct the optimized code.

[0011] A third aspect of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein 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.

[0012] A fourth aspect of the present invention provides a computer program product, which, when executed by a processor, implements the above-mentioned dynamic self-programming operation control method of a virtual power plant.

[0013] A fifth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned dynamic self-programming operation control method of a virtual power plant.

[0014] 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 large language model's powerful understanding and generation capabilities of natural language and programming language, and can realize automatic programming of the dynamic virtual power plant optimization operation program according to the changing demand instructions input by the user's natural language, effectively improving the ability of traditional control methods to adapt to changes in the virtual power plant topology structure and changes in the state of flexibility resources, and can be applicable to the variable demand operation control of virtual power plants containing multiple flexibility resources, facilitate the local deployment of the virtual power plant control center, and have excellent accuracy.

[0015] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which: Figure 1 A flowchart of a dynamic self-programming operation control method of a virtual power plant provided by an embodiment of the present invention; Figure 2 A schematic diagram of a specific framework of a dynamic self-programming operation control method for a virtual power plant provided by an embodiment of the present invention; Figure 3 A schematic diagram of a 15-node dynamic virtual power plant simulation environment provided by an embodiment of the present invention; Figure 4 A schematic diagram of a specific execution of a dynamic self-programming operation control method for a 15-node dynamic virtual power plant provided by an embodiment of the present invention; Figure 5 A diagram showing the generation result of a 15-node dynamic virtual power plant provided in an embodiment of the present invention; Figure 6 A schematic diagram of accuracy comparison results of a dynamic self-programming operation control method for a virtual power plant provided by an embodiment of the present invention; Figure 7 A block diagram of a dynamic self-programming operation control device for a virtual power plant provided by an embodiment of the present invention; Figure 8 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0018] The following describes the dynamic self-programming operation control method, device, equipment and medium of a virtual power plant according to an embodiment of the present invention with reference to the accompanying drawings.

[0019] Figure 1 A flow chart of a dynamic self-programming operation control method for a virtual power plant provided in an embodiment of the present invention.

[0020] like Figure 1 As shown, the dynamic self-programming operation control method of the virtual power plant includes the following steps: In step S101, typical change requirements during the operation of the target virtual power plant are obtained.

[0021] In some embodiments, obtaining typical change requirements during the operation of the target virtual power plant includes: Collect historical operation data of the target virtual power plant during operation, where the historical operation data includes changes in topology structure and flexibility resource status; Based on historical operating data, summarize the typical changing requirements during the operation of the target virtual power plant.

[0022] During the actual implementation process, the internal connection relationships that occur during the operation of the virtual power plant and typical change requirements such as node maintenance, topology changes, flexibility resource access / exit, and controllable load response time period changes that occur during historical operation are collected.

[0023] Specifically, the changes in the internal structure or state of flexible resources that occur during the operation of the virtual power plant are collected (such as changes in the state of new energy such as wind and solar power, 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 operating data of the virtual power plant, several typical types of changes that may occur during its operation are summarized, and the data that may change in each typical type of change and the possible range of changes for each data are clarified.

[0024] In step S102, system prompt words of a pre-built initial cloud-side large language model are compiled according to typical change requirements to obtain a cloud-side large language model suitable for dynamic programming tasks of a virtual power plant.

[0025] In some embodiments, the system prompt words of the pre-built initial cloud-side large language model are written according to typical change requirements to obtain a cloud-side large language model suitable for the dynamic programming task of the virtual power plant, including: Based on the prompt word engineering, natural language is used to describe the tasks to be completed of the initial cloud-side large language model, and system prompt words of the initial cloud-side large language model are written according to the typical change requirements and the tasks to be completed, so as to obtain a cloud-side large language model suitable for dynamic programming tasks of virtual power plants.

[0026] In the actual implementation process, based on the prompt word engineering, natural language is used to describe the tasks that need to be completed by the large language model. According to the topological structure and flexibility resource configuration of the virtual power plant under normal operation, combined with expert experience, the optimized code of the virtual power plant operation control that considers the safe operation constraints of the virtual power plant is written. The topological structure of the virtual power plant and the optimized code of the virtual power plant operation control are used as examples in the prompt words.

[0027] Specifically, combined with the relevant technologies of prompt word engineering, natural language is used to describe the tasks that need to be completed by the large language model. The prompt words are generally divided into four parts: identity setting, topology structure description, reference optimization program and example; identity setting is added to the prompt words (such as "You are an electric power system expert who focuses on the dynamic control of flexible resources in virtual power plants. Your task is to help users design and implement dynamic self-programming functions of virtual power plants to optimize energy scheduling, improve grid stability and maximize economic benefits.") to facilitate the large language model to quickly and accurately grasp the direction of problem handling; according to the topological structure corresponding to the virtual power plant under normal operation in the typical change requirements, the connection relationship of the virtual power plant is described using natural language as an additional part of the prompt words of the large language model system; according to the optimized operation control objectives of the virtual power plant under normal operation in the typical change requirements, the corresponding optimization code is written in combination with expert experience as the reference optimization program part in the prompt words; according to the typical change type of the virtual power plant in the typical change requirements, a change type is selected and the specific values ​​of each change data are clarified, and the corresponding adjusted optimization code is written according to this command in combination with expert experience, and the demand instruction and the corresponding optimization code are used as the example part in the prompt words.

[0028] In step S103, 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.

[0029] In some embodiments, typical change requirements are input into a cloud-side large language model to construct a self-programming fine-tuning data set for virtual power plant operation control, including: Using the initial cloud-side large language model to construct data for each of the typical change requirements, so as to obtain a single change virtual power plant dynamic demand instruction in different virtual power plant flexibility resource change types; Inputting 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 virtual power plant operation control optimization code; The correctness of the virtual power plant operation control optimization code is judged by using the expert experience data acquired in advance. If there is an error code, the virtual power plant operation control optimization code is corrected. Otherwise, the virtual power plant operation control optimization code is written into a self-programming fine-tuning data set of the virtual power plant operation control.

[0030] During the actual implementation 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 a self-programming fine-tuning dataset for the operation control of the virtual power plant is constructed based on expert experience to achieve supervised fine-tuning of the end-side large language model.

[0031] Specifically, Figure 2 As shown, according to the typical dynamic change types of flexibility resources that may occur in the operation of the virtual power plant in the typical change demand and the corresponding data change range, the cloud-side large language model is combined to construct data for each type of change demand, so that the description method of each demand instruction is different, and a single change virtual power plant dynamic demand instruction is obtained; the initial cloud-side large language model is used to randomly combine the single change virtual power plant dynamic demand instructions in pairs to construct complex change virtual power plant dynamic demand instructions in different virtual power plant flexibility resource change types; The prompt words in step S102 are used as the system prompt words of the cloud-side large language model, and the single-change virtual power plant dynamic demand instructions and the complex-change virtual power plant dynamic demand instructions are used as user inputs of the cloud-side large language model. The virtual power plant operation control optimization code generated by the cloud-side large language model for each change demand is obtained, and its correctness is judged using expert experience. The error code is manually adjusted to ensure the correctness of the constructed fine-tuning data set; and 80% of the constructed data set is randomly selected as a supervised fine-tuning training set, and the other 20% is used as a test set.

[0032] In step S104 , supervised fine-tuning is performed on the pre-built large end-side language model using the self-programmed fine-tuning dataset to obtain a fine-tuned large end-side language model.

[0033] In some embodiments, supervised fine-tuning of a pre-built large language model on the end-side using a self-programmed fine-tuning dataset to obtain a fine-tuned large language model on the end-side includes: Set the supervised fine-tuning hyperparameters of the client-side large language model; Based on the low-rank adaptive method, the pre-built large on-device language model is supervised and fine-tuned using a self-programmed fine-tuning dataset until the loss value of the neural network converges during the supervised fine-tuning process, thus obtaining the fine-tuned large on-device language model.

[0034] In the actual execution process, the self-programming fine-tuning data set constructed in step S103 is used in the supervised fine-tuning process of the end-side large language model, so that the end-side large language model can realize the self-programming function of the virtual power plant operation control.

[0035] Specifically, Figure 2 As shown, the cloud-side large language model and the self-programming fine-tuning data set constructed in step S103 are loaded; the supervised fine-tuning hyperparameters of the terminal-side large language model are set, and the training data set is supervised fine-tuned for the terminal-side large language model using a low-rank adaptive method to realize automatic programming of the virtual power plant operation control optimization code, which is convenient for local deployment and safe calling; when the loss value of the neural network converges during the supervised fine-tuning process, it is determined that the fine-tuning of the terminal-side large language model is completed and the training is ended; several test set data constructed in step S103 are randomly extracted, and the fine-tuned large language model is preliminarily tested and the fine-tuned large language model is saved.

[0036] In step S105, the target natural language change requirements are input into the fine-tuned end-side large language model to generate optimized code for virtual power plant operation control, and the optimized code is dynamically programmed and self-corrected.

[0037] In some embodiments, the target natural language change requirement is input into the fine-tuned end-side large language model to generate an optimized code for the operation control of the virtual power plant, and the optimized code is dynamically programmed and self-corrected, including: 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; The optimized code is executed in the interpreter. If the optimized code runs correctly, the fine-tuned end-side large language model completes an automatic programming. Otherwise, the code error information in the interpreter is fed back to the fine-tuned end-side large language model for automatic correction to regenerate new optimized code for virtual power plant operation control. The new optimized code is executed in the interpreter. If it runs correctly, the running result is saved and output, otherwise it is judged as a programming error.

[0038] During the actual execution process, natural language is used to describe the changing requirements that arise during the operation of the virtual power plant, and the requirements are input into the fine-tuned end-side large language model. The fine-tuned end-side large language model outputs the corresponding programming code and executes it through the interpreter. When the code runs successfully, the fine-tuned end-side large language model completes automatic programming. Otherwise, the code running error information in the interpreter is fed back to the fine-tuned end-side large language model in the form of a continuous dialogue, so that it can regenerate the operation control optimization code and execute it in the interpreter.

[0039] Specifically, Figure 2As shown, the change requirement instructions in the test set are input into the fine-tuned end-side large language model to obtain the optimized code generated by the fine-tuned end-side large language model; the optimized code generated by the fine-tuned end-side large language model is executed in the interpreter. When the code can run correctly, the model completes an automatic programming. Otherwise, the code error information in the interpreter is fed back to the fine-tuned end-side large language model in a contextual manner, so that it regenerates the optimized code and executes it again, so as to realize feedback self-correction of code generation, so as to further improve the accuracy of the virtual power plant operation control optimization code generated by the end-side large language model. If it runs correctly, the running result is saved and output, otherwise it is judged as a programming error and waits for a new round of instruction input.

[0040] The following further illustrates the dynamic self-programming operation control method of the virtual power plant proposed in the embodiment of the present invention by taking a 15-node virtual power plant as an experimental object.

[0041] First, if Figure 3 As shown in the figure, node 1 is the connection point between the virtual power plant and the upper distribution network, and the other nodes are controllable load nodes. The solid line represents the section switch, and the dotted line represents the tie switch. In the normal operation state of the virtual power plant, the section switch is in the closed state, and the tie switch is in the open state. However, in some cases, the state of the section switch and the tie switch may change, which will cause the topological structure inside the virtual power plant to change.

[0042] Secondly, we collect typical change requirements that have occurred in the historical operation of the virtual power plant and divide them into four typical types. The first change requirement is the maintenance of nodes in the virtual power plant, at which time the node load needs to be set to 0; the second change requirement is the connection or exit of power generation units in the virtual power plant; the third change requirement is the change of the topology structure (i.e., connection relationship) in the virtual power plant; the fourth change requirement is a combination of the first three types of changes, which is more complex.

[0043] Again, prompt words are designed according to the problem scenario and functional requirements. The specific composition structure of the prompt words includes five parts, namely initial settings (identity settings), virtual power plant topology description, data loading program, optimization reference program, and output examples.

[0044] In the optimization reference program section, the control objective of the virtual power plant is set to minimize the operating cost at the current moment (1 hour), which is specifically expressed as follows: (1) in, represents the objective function, i.e., the operating cost of the virtual power plant at the current moment, represents the number of power generation units in the virtual power plant, represents the maximum order of the cost coefficient of the power generation unit, Indicates Power generation unit The cost coefficient of the order, Indicates The output power of an energy storage system at the current moment.

[0045] The constraints are set as follows: (2) (3) (4) (5) (6) (7) in, For Node The real part of the complex voltage, is the number of all nodes in the virtual power plant, For branch The conductivity, For Node The real part of the complex voltage, For branch The electrical susceptance, For Node The imaginary part of the complex voltage, For Node The imaginary part of the complex voltage, For Node The total active power demand at For Node The total reactive power demand at For Node The injected active power load, For Node The active power output of the generating unit, is the set of nodes containing generators in the virtual power plant, For Node Injected reactive power load, For Node The reactive power output by the generating unit, is the maximum allowable value of the current flowing through the virtual power plant, For branch Middle slave node To Flow Node The current value, and are the lower and upper limits of the node voltage respectively, For Node The voltage amplitude at .

[0046] In the process of constructing the supervised fine-tuning dataset, the main variable parameters and data allowable ranges in the 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. Furthermore, 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 training sets and test sets.

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

[0048] like Figure 4-6 As shown in the figure, the test set data is sequentially input into the fine-tuned large language model on the end to obtain the optimized code generated for specific requirements, and the interpreter is called for execution. If the code is executed correctly, the scheduling result is output; otherwise, the interpreter's error message is input into the large language model on the end in a contextual manner, so that it can reflect on the generated code and regenerate the optimized code. In this way, the accuracy of the large language model on the end to generate optimized code can be further improved.

[0049] In summary, the dynamic self-programming operation control method of a virtual power plant proposed in an embodiment of the present invention has the following beneficial effects: (1) Taking full advantage of the large language model's powerful ability to understand and generate natural language and programming language, it can realize automatic programming of the dynamic virtual power plant optimization operation program based on the changing demand instructions input by the user's natural language; (2) The accuracy of automatic programming of the large language model on the end-side is close to that of the large language model on the cloud-side. With the help of the feedback code self-correction mechanism, the accuracy of programming of the large language model on the end-side is further improved. (3) It effectively improves the ability of traditional control methods to adapt to changes in the topology of virtual power plants and changes in the status of flexible resources. It can be applied to the variable demand operation control of virtual power plants with multiple flexible resources, facilitates the local deployment of virtual power plant control centers, and has excellent accuracy.

[0050] Next, the dynamic self-programming operation control device of the virtual power plant proposed in accordance with the embodiment of the present invention will be described with reference to the accompanying drawings.

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

[0052] like Figure 7As 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.

[0053] Among them, the acquisition module 701 is used to obtain 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-built 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 tasks 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 and control of the virtual power plant. The fine-tuning module 704 is used to supervise and fine-tune the pre-built end-side large language model using the self-programming fine-tuning data set to obtain the 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 the optimized code for the operation and control of the virtual power plant, and to dynamically program and self-correct the optimized code.

[0054] In some embodiments, the acquisition module 701 includes: A collection unit, used to collect historical operation data during the operation of the target virtual power plant, wherein the historical operation data includes changes in the topology structure and the state of flexibility resources; The induction unit is used to summarize the typical changing requirements during the operation of the target virtual power plant based on historical operation data.

[0055] In some embodiments, the writing module 702 includes: Based on the prompt word engineering, natural language is used to describe the tasks to be completed of the initial cloud-side large language model, and system prompt words of the initial cloud-side large language model are written according to the typical change requirements and the tasks to be completed, so as to obtain a cloud-side large language model suitable for dynamic programming tasks of virtual power plants.

[0056] In some embodiments, the construction module 703 includes: A data construction unit, configured to construct data for each of the typical change requirements by using the initial cloud-side large language model, so as to obtain a single change virtual power plant dynamic demand instruction in different virtual power plant flexibility resource change types; A combination unit, used for randomly combining single-change virtual power plant dynamic demand instructions in pairs by using an initial cloud-side large language model, so as to obtain complex-change virtual power plant dynamic demand instructions in different virtual power plant flexibility resource change types; A control code generation unit, used for inputting a single-change virtual power plant dynamic demand instruction and a complex-change virtual power plant dynamic demand instruction into an initial cloud-side large language model with system prompt words to generate a virtual power plant operation control optimization code; The correction construction unit is used to use 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, the virtual power plant operation control optimization code is corrected. Otherwise, the virtual power plant operation control optimization code is used as a self-programming fine-tuning data set for the virtual power plant operation control.

[0057] In some embodiments, the fine-tuning module 704 includes: A setting unit, used to set the supervised fine-tuning hyperparameters of the large language model on the client side; The fine-tuning unit is used to supervise and fine-tune the pre-built large end-side language model based on a low-rank adaptive method using a self-programmed fine-tuning dataset until the loss value of the neural network converges during the supervised fine-tuning process, thereby obtaining a fine-tuned large end-side language model.

[0058] In some embodiments, the programming module 705 includes: A solution code generation unit is used to input the target natural language change requirements into the fine-tuned end-side large language model to generate optimized codes for virtual power plant operation control; The programming and correction unit is used to execute the optimized code in the interpreter. If the optimized code runs correctly, the fine-tuned end-side large language model completes an automatic programming. Otherwise, the code error information in the interpreter is fed back to the fine-tuned end-side 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, the operation result is saved and output, otherwise it is judged as a programming error.

[0059] It should be noted that the aforementioned explanation of the embodiment of the dynamic self-programming operation control method of the virtual power plant is also applicable to the dynamic self-programming operation control device of the virtual power plant of this embodiment, and will not be repeated here.

[0060] The dynamic self-programming operation control device of a virtual power plant proposed in an embodiment of the present invention has the following beneficial effects: (1) Taking full advantage of the large language model's powerful ability to understand and generate natural language and programming language, it can realize automatic programming of the dynamic virtual power plant optimization operation program based on the changing demand instructions input by the user's natural language; (2) The accuracy of automatic programming of the large language model on the end-side is close to that of the large language model on the cloud-side. With the help of the feedback code self-correction mechanism, the accuracy of programming of the large language model on the end-side is further improved. (3) It effectively improves the ability of traditional control methods to adapt to changes in the topology of virtual power plants and changes in the status of flexible resources. It can be applied to the variable demand operation control of virtual power plants with multiple flexible resources, facilitates the local deployment of virtual power plant control centers, and has excellent accuracy.

[0061] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device may include: A memory 801 , a processor 802 , and a computer program stored in the memory 801 and executable on the processor 802 .

[0062] When the processor 802 executes the program, the dynamic self-programming operation control method of the virtual power plant provided in the above embodiment is implemented.

[0063] Furthermore, the electronic device further comprises: The communication interface 803 is used for communication between the memory 801 and the processor 802 .

[0064] The memory 801 is used to store computer programs that can be executed on the processor 802 .

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

[0066] 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 connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

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

[0068] 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.

[0069] An embodiment of the present invention also provides a computer program product, which implements the above-mentioned dynamic self-programming operation control method of the virtual power plant when the computer program / instructions are executed by a processor.

[0070] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned dynamic self-programming operation control method of a virtual power plant.

[0071] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction 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 may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0072] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "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 clearly and specifically defined.

[0073] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0074] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or N wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0075] 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 embodiment, 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 by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0076] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0077] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, 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 as an independent product for sale or use, it may also be stored in a computer-readable storage medium.

[0078] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, 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 cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify 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: The following steps are involved: Obtain typical changing requirements during the operation of the target virtual power plant; Writing system prompt words of a pre-built initial cloud-side large language model according to the typical change requirements to obtain a cloud-side large language model suitable for dynamic programming tasks of a virtual power plant; 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; Performing supervised fine-tuning on the pre-built large end-side language model using the self-programmed fine-tuning dataset to obtain a fine-tuned large end-side language model; The target natural language change requirements are input into the fine-tuned end-side large language model to generate optimized code for virtual power plant operation control, and the optimized code is dynamically programmed and self-corrected.

2. The dynamic self-programming operation control method of a virtual power plant according to claim 1 is characterized in that: The typical change requirements during the operation of the target virtual power plant are obtained, including: Collecting historical operation data during the operation of the target virtual power plant, wherein the historical operation data includes changes in topology structure and flexibility resource status; Typical changing requirements during the operation of the target virtual power plant are summarized based on the historical operating data.

3. The dynamic self-programming operation control method of a virtual power plant according to claim 1, characterized in that: The system prompt words of the pre-built initial cloud-side large language model are written 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: Based on the prompt word engineering, natural language is used to describe the tasks to be completed of the initial cloud-side large language model, and system prompt words of the initial cloud-side large language model are written according to the typical change requirements and the tasks to be completed, so as to obtain a cloud-side large language model suitable for dynamic programming tasks of virtual power plants.

4. The dynamic self-programming operation control method of a virtual power plant according to claim 1, characterized in that: The 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: Using the initial cloud-side large language model to construct data for each of the typical change requirements, so as to obtain a single change virtual power plant dynamic demand instruction in different virtual power plant flexibility resource change types; The single-change virtual power plant dynamic demand instructions are randomly combined in pairs by using the initial cloud-side large language model to obtain complex-change virtual power plant dynamic demand instructions in different virtual power plant flexibility resource change types; Inputting the single-change virtual power plant dynamic demand instruction and the complex-change virtual power plant dynamic demand instruction into an initial cloud-side large language model with system prompt words to generate a virtual power plant operation control optimization code; The correctness of the virtual power plant operation control optimization code is judged by using the expert experience data acquired in advance. If an error code exists, the virtual power plant operation control optimization code is corrected. Otherwise, the virtual power plant operation control optimization code is compiled into a self-programming fine-tuning data set for the virtual power plant operation control.

5. The dynamic self-programming operation control method of a virtual power plant according to claim 1, characterized in that: The using the self-programmed fine-tuning dataset to supervise and fine-tune the pre-built large end-side language model to obtain a fine-tuned large end-side language model includes: Setting supervised fine-tuning hyper parameters of the client-side large language model; Based on the low-rank adaptive method, the pre-built large end-side language model is supervised fine-tuned using the self-programmed fine-tuning dataset until the loss value of the neural network converges during the supervised fine-tuning process, thereby obtaining the fine-tuned large end-side language model.

6. The dynamic self-programming operation control method of a virtual power plant according to claim 1, characterized in that: The step of inputting the target natural language change requirement into the fine-tuned end-side large language model to generate an optimized code for virtual power plant operation control, and dynamically programming and self-correcting the optimized code includes: Inputting the target natural language change requirement into the fine-tuned end-side large language model to generate optimized code for virtual power plant operation control; The optimized code is executed in the interpreter. If the optimized code runs correctly, the fine-tuned end-side large language model completes an automatic programming. Otherwise, the code error information in the interpreter is fed back to the fine-tuned end-side large language model for automatic correction to regenerate a new optimized code for the operation control of the virtual power plant. The new optimized code is executed in the interpreter. If it runs correctly, the operation result is saved and output. Otherwise, it is judged as a programming error.

7. A dynamic self-programming operation control device for a virtual power plant, characterized in that: include: An acquisition module is used to acquire typical change requirements during the operation of the target virtual power plant; A writing module, used for writing system prompt words of a pre-built initial cloud-side large language model according to the typical change requirements, so as to obtain a cloud-side large language model suitable for a virtual power plant dynamic programming task; A construction module, used for 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; A fine-tuning module, configured to perform supervised fine-tuning on a pre-built large end-side language model using the self-programmed fine-tuning dataset to obtain a fine-tuned large end-side language model; A programming module is used to 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 dynamically program and self-correct the optimized code.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the dynamic self-programming operation control method of a virtual power plant as described in any one of claims 1 to 6.

9. A computer program product, characterized in that When the computer program / instruction is executed by a processor, the dynamic self-programming operation control method of the virtual power plant described in any one of claims 1-6 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the dynamic self-programming operation control method of a virtual power plant as described in any one of claims 1-6.

Citation Information

Patent Citations

  • System including virtual power plant load classification, resource modeling and participation in electricity market transaction

    CN114205381A

  • Virtual power plant optimization operation method and device, equipment and medium

    CN117541030A

  • Rust language document test automatic generation method and device based on large code model

    CN117951038A

  • 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

Cited By

  • Power distribution network man-machine interaction regulation and control method and device based on edge side large model

    CN121216483A

  • Sewage treatment activated sludge model generation method based on large language model

    CN121617484A