Device control method, computer readable storage medium and computer terminal

By measuring the real environment of power system equipment and calibrating the safety correction model, target control instructions are generated, which solves the problem that the traditional dispatch mode is difficult to meet real-time dispatch and achieves fast, safe and economical operation of the power system.

CN115542736BActive Publication Date: 2024-08-27ALIBABA DAMO (HANGZHOU) TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202211192135.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2024-08-27
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

The traditional system dispatch model is difficult to meet the real-time dispatch needs of the power system in an environment with drastic changes and complex models, and the existing technology lacks effective solutions.

Method used

Using the equipment control method, by measuring the real environment of the equipment to be controlled, status information is obtained and mapped into initial control instructions, the initial instructions are corrected using the safety correction model, and target control instructions are generated to ensure the safe operation of the equipment, combined with reinforcement learning and optimization methods to reduce dependence on power system models and parameters.

Benefits of technology

It realizes fast, safe and economical real-time dispatch of power systems in complex environments, reduces the problems of low decision-making efficiency and insufficient safety, and improves the accuracy and scope of application of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115542736B
    Figure CN115542736B
Patent Text Reader

Abstract

The present invention discloses a device control method, a computer-readable storage medium and a computer terminal. The method comprises: measuring the real environment of the device to be controlled to obtain the state information of the device to be controlled; mapping the state information into the initial control instruction of the device to be controlled; correcting the initial control instruction to obtain the target control instruction, wherein the target control instruction is in the preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled; and controlling the device to be controlled based on the target control instruction. The present invention solves the technical problem that the scheduling system in the related art is difficult to meet the real-time scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of device control, and in particular to a device control method, a computer-readable storage medium and a computer terminal. Background Art

[0002] At present, with the intervention of large-scale renewable energy and flexibility resources, the traditional system scheduling model is difficult to meet the needs of real-time scheduling in a scheduling environment with rapid changes and complex models.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present invention provide a device control method, a computer-readable storage medium and a computer terminal, so as to at least solve the technical problem that the scheduling system in the related art is difficult to meet the requirements of real-time scheduling.

[0005] According to one aspect of an embodiment of the present invention, there is provided a device control method, comprising: measuring the real environment in which the device to be controlled is located to obtain status information of the device to be controlled; mapping the status information into initial control instructions for the device to be controlled; correcting the initial control instructions to obtain target control instructions, wherein the target control instructions are in a preset instruction space of the device to be controlled, and the control instructions in the preset instruction space are used to control the safe operation of the device to be controlled; and controlling the device to be controlled based on the target control instructions.

[0006] According to another aspect of an embodiment of the present invention, there is also provided a device control method, including: measuring the actual power grid environment in which the power equipment is located to obtain status information of the power equipment; mapping the status information into initial scheduling instructions for the power equipment; correcting the initial scheduling instructions to obtain target scheduling instructions, wherein the target scheduling instructions are in a preset instruction space of the power equipment, and the scheduling instructions in the preset instruction space are used to control the safe operation of the power equipment; and controlling the power equipment based on the target scheduling instructions.

[0007] According to one aspect of an embodiment of the present invention, there is provided a device control method, including: a cloud server receives status information of a device to be controlled uploaded by a client, wherein the status information is obtained by measuring the device to be controlled in a real environment in which the device to be controlled is located; the cloud server maps the status information into an initial control instruction of the device to be controlled; the cloud server corrects the initial control instruction to obtain a target control instruction, wherein the target control instruction is in a preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled; the cloud server sends the target control instruction to the client.

[0008] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute a device control method of any one of the above embodiments.

[0009] According to one aspect of an embodiment of the present application, a computer terminal is provided, including: a memory for storing a program; and a processor connected to the memory for running the program, wherein when the program is running, the device control method of any one of the above embodiments is executed.

[0010] In an embodiment of the present invention, the real environment in which the device to be controlled is located can be measured to obtain the state information of the device to be controlled; the state information is mapped into the initial control instruction of the device to be controlled; the initial control instruction is corrected to obtain the target control instruction, wherein the target control instruction is in the preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled; the device to be controlled is controlled based on the target control instruction, thereby achieving the purpose of ensuring the safe operation of the device to be controlled. It is easy to notice that the real environment in which the device to be controlled is located can be measured to obtain the state information of the control device. Since the state information contains the factors of the real environment, the effect of real-time scheduling according to the real scene can be achieved, and the initial control instruction is corrected by using the safety correction model to obtain the target control instruction, which can further enhance the safety of the operation of the device to be controlled, thereby solving the technical problem that the scheduling system in the related technology is difficult to meet the real-time scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0012] Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a device control method according to an embodiment of the present application;

[0013] Figure 2 is a flow chart of a device control method according to Embodiment 1 of the present application;

[0014] Figure 3 is a schematic diagram of a device control process according to an embodiment of the present application;

[0015] Figure 4 is a flow chart of a device control method according to an embodiment of the present application;

[0016] Figure 5is a flow chart of a device control method according to Embodiment 2 of the present application;

[0017] Figure 6 is a flow chart of a device control method according to Embodiment 3 of the present application;

[0018] Figure 7 is a schematic diagram of a device control apparatus according to Embodiment 4 of the present application;

[0019] Figure 8 is a schematic diagram of a device control apparatus according to Embodiment 5 of the present application;

[0020] Fig. 9 is a schematic diagram of a device control apparatus according to Embodiment 6 of the present application;

[0021] Fig.10 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0025] Alternating Current Optimal Power Flow (ACOPF) is a refined mathematical model for calculating optimal power flow distribution in real-time dispatching of power systems.

[0026] Constrained Markov Decision Process (CMDP): a type of mathematical problem of sequential decision making.

[0027] The low-carbon economic operation of the power system is the only way to achieve the "dual carbon" goals. Building a new data-driven power system dispatching model is an important force to promote the digital transformation of the energy system and the high-quality development of the national economy. The core of the real-time dispatching problem of the power system is how to quickly, economically and safely solve a series of time-varying ACOPF problems. From a mathematical perspective, ACOPF is essentially a non-convex optimization problem with low computational efficiency and strong dependence on the accuracy of model parameters. With the large-scale access of renewable energy and the increasing complexity of power grid operation, traditional power system dispatching models are difficult to meet the real-time dispatching needs of the power system in an environment with drastic changes and inaccurate parameters.

[0028] In the related technologies, a series of overall solutions for smart grid dispatching and control have been developed. However, they are mainly based on optimization modeling methods, highly dependent on power system and adjustable resource model parameters, and cannot provide rapid decision-making functions in systems with drastic changes in new energy. The related technologies also provide intelligent dispatching and operation optimization decision-making platforms and source-grid-load-storage integrated optimization dispatching platforms, but they rely too much on precise mathematical models and cannot give full play to the complementary advantages of expert knowledge and massive data. The related technologies also provide a series of secure reinforcement learning algorithms and have been tried, but they have failed to achieve commercial application and lack practicality and versatility.

[0029] In general, the industry currently lacks universal real-time dispatching technology for power systems that integrates power grid knowledge and massive data. Current products are highly dependent on model parameters of the power grid and adjustable equipment, have low decision-making efficiency, and their universality needs to be improved.

[0030] In view of this, this scheme proposes a device control method to solve the real-time scheduling problem of complex power systems.

[0031] Example 1

[0032] According to an embodiment of the present invention, an embodiment of a device control method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 11 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a device control method according to an embodiment of the present application. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0034] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0035] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the device control method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the above-mentioned device control method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0036] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0038] It should be noted that, in some optional embodiments, the above Figure 1 The computer device (or mobile device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the above-described computer device (or mobile device).

[0039] Under the above operating environment, this application provides Figure 2 The device control method shown. Figure 2 This is a flowchart of a device control method according to Example 1 of the present application.

[0040] Step S202: measuring the real environment where the device to be controlled is located to obtain status information of the device to be controlled.

[0041] The above-mentioned status information may include: the environmental status of the real environment and the device status of the device to be controlled.

[0042] The above-mentioned devices to be controlled can be devices that need to be dispatched in real time in different systems (such as power systems, Internet systems, etc.). In the embodiments of the present application, adjustable devices in the power system are used as an example for explanation. For example, in the energy management scenario, the devices to be controlled can be active regulation devices (for example, generator sets, new energy power stations, energy storage devices, adjustable loads, etc.); in the voltage regulation scenario, the devices to be controlled can be reactive regulation devices (for example, generator sets with reactive regulation capabilities, power electronic equipment, capacitors, etc.), but are not limited to this.

[0043] The above-mentioned real environment may be a real network environment, a real power grid environment, a power system operating environment, etc. in which the device to be controlled is located. The real environment here may be determined according to the environment in which the control device is located.

[0044] The status information of the above-mentioned device to be controlled may be device parameters, device operating parameters, etc. of the device to be controlled in the real environment, or may be the environmental state of the real environment, wherein the environmental state of the real environment may be the state of the network and the state of the signal in the real environment, wherein the state of the network may be the stability of the network, and the state of the signal may be the stability of the signal, but it is not limited to this and is only illustrated as an example here.

[0045] The above-mentioned real environment can be the operating environment of the device to be controlled in different scenarios, and the corresponding environmental state can be the parameters of the operating environment. Among them, the real environment can be the real environment of different systems, and can be the real environment of the power system and the Internet system. Taking the power system as an example, the real environment can be the capacity management environment of the power grid, wherein the energy management environment can be the voltage, current, line and other states of the power regulation equipment. For example, it can be the energy management environment corresponding to the generator set, new energy power station, energy storage equipment, adjustable load, etc., and its environmental state can be the parameters of the power grid during the energy management process. The real environment can also be a voltage regulation environment, which can realize real-time regulation of reactive power for multiple types of reactive regulation equipment in the power system to ensure that the power grid voltage is at a safe level, and its environmental state can be the parameters of the power grid under voltage regulation. The real environment can also be an emergency or sudden situation environment, and its environmental state can be the parameters of the power grid under emergency or sudden situations.

[0046] In the power system, the environmental state of the above real environment can be the power grid state, where the power grid state includes but is not limited to branch flow, node voltage, and line state. The device state of the above device to be controlled can be the power system state, where the power system state includes but is not limited to generator processing, energy storage energy state, and load demand.

[0047] In an optional embodiment, the real environment in which the device to be controlled is located can be measured by various measuring devices installed in the real environment to obtain status information of the device to be controlled in the real environment, and the safety of the device to be controlled can be constrained based on the status information of the device to be controlled in the real environment.

[0048] Step S204: Map the state information into initial control instructions for the device to be controlled.

[0049] In an optional embodiment, a reinforcement learning model may be used to map the state information into an initial control instruction of the device to be controlled, wherein the reinforcement learning model is used to characterize the mapping relationship between different state information and different control instructions.

[0050] The above reinforcement learning model can be a deep neural network.

[0051] The above-mentioned reinforcement learning model can be a reinforcement learning algorithm, wherein the reinforcement learning algorithm can design a reward function with the goal of minimizing operating costs and eliminating power flow over-limit scenarios, wherein eliminating power flow over-limit scenarios can be scenarios such as reducing unit output, cutting loads, and transferring loads.

[0052] The above initial control instruction may be a real-time scheduling instruction.

[0053] The reinforcement learning action space corresponding to the above reinforcement learning model may include real-time dispatching instructions for multiple types of adjustable equipment such as source-grid-load-storage in the power system.

[0054] The above-mentioned state information can be represented as the current state space value of the device to be controlled in the reinforcement learning model.

[0055] In an optional embodiment, a reinforcement learning model can be used to train the scheduling strategy, wherein the scheduling strategy can be a mapping relationship from state space to action space, and the state information of the device to be controlled collected in the real environment can be obtained. The state information can be the current state space value. The scheduling strategy can be used to determine the action space value corresponding to the current state space value, and output the adjustable device scheduling instruction reference value according to the action space value, that is, the above-mentioned initial control instruction, and send the initial control instruction to the next link.

[0056] Step S206, correcting the initial control instruction to obtain the target control instruction.

[0057] The target control instruction is in a preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled.

[0058] In an optional embodiment, the initial control instruction may be corrected using a safety correction model to obtain a target control instruction.

[0059] The above safety correction model can be used to ensure that the equipment to be controlled operates in a safe environment. The construction idea of ​​the safety correction model can be: taking the safe operation limit of the power system as a constraint condition and taking the minimum deviation between the output value of the safety correction model and the reference value as the goal to construct the safety correction model.

[0060] The above-mentioned preset instruction space may include a plurality of preset instructions, each instruction being used to implement different controls on the device to be controlled.

[0061] In an optional embodiment, the initial control instruction can be corrected using a security correction model so as to correct the initial control instruction to the security domain of the device to be controlled, obtain a target control instruction, and send the target security instruction to the device to be controlled for execution and real-time. In the case of multiple devices to be controlled, the target security instruction generated for each device to be controlled can be sent to the corresponding device to be controlled.

[0062] In an optional embodiment, the safety correction model can also output the theoretical state of the device, and can compare the theoretical state of the device with the actual measured state of the device in a real environment to obtain a deviation value, and update the model parameters of the safety correction model based on the deviation value.

[0063] Step S208: controlling the device to be controlled based on the target control instruction.

[0064] In an optional embodiment, the device to be controlled may be controlled according to the target control instruction so that the device to be controlled performs an action corresponding to the target control instruction.

[0065] Taking the controlled devices as the various adjustable devices in the power system as an example, the real environment in which the various adjustable devices are located can be measured first to obtain the status information of each adjustable device, where the status information can be the power grid status and the device status of each adjustable device in the real environment. According to the current state space value sampled from the real-time environment of the power system, that is, the space value corresponding to the device status and the power grid status, the scheduling strategy is used to determine the action space value of the current state space value to one, and output the scheduling reference instruction of each adjustable device, that is, the above-mentioned initial control instruction. The scheduling reference value corresponding to the scheduling reference instruction can be corrected by using the safety correction model to obtain the scheduling instruction correction value, that is, the above-mentioned safety control instruction. The scheduling instruction correction value can be sent to each adjustable device for execution and implementation.

[0066] This application proposes a knowledge-data fusion safety reinforcement learning architecture for real-time dispatching of power systems. It can combine reinforcement learning with optimization methods, use reinforcement learning to make quick decisions in an environment with inaccurate model parameters, and then use optimization methods to safely correct the output actions of reinforcement learning to ensure safe operation of the system; in addition, in order to improve the accuracy of the model and the long-term economic benefits of the dispatching strategy, the power system prior knowledge is used to initialize the safety correction model, and the model parameters are dynamically updated using measured data; this solution can significantly reduce the degree of dependence on power system models and parameters, and has significant advantages in decision-making efficiency, safety assurance and scope of application.

[0067] Through the above steps, the real environment where the device to be controlled is located can be measured to obtain the state information of the device to be controlled; the state information is mapped into the initial control instruction of the device to be controlled; the initial control instruction is corrected to obtain the target control instruction, wherein the target control instruction is in the preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled; the device to be controlled is controlled based on the target control instruction, thereby achieving the purpose of ensuring the safe operation of the device to be controlled. It is easy to notice that the real environment where the device to be controlled is located can be measured to obtain the state information of the control device. Since the state information contains the factors of the real environment, the effect of real-time scheduling according to the real scene can be achieved, and the initial control instruction is corrected by using the safety correction model to obtain the target control instruction, which can further enhance the safety of the operation of the device to be controlled, thereby solving the technical problem that the scheduling system in the related technology is difficult to meet the real-time scheduling.

[0068] In the above embodiment of the present application, correcting the initial control instruction to obtain the target control instruction includes: correcting the initial control instruction using a safety correction model to obtain the target control instruction.

[0069] In the above embodiments of the present application, the safety correction model is also used to correct the initial control instructions to obtain the theoretical state of the device to be controlled. The method also includes: obtaining the measured state of the device to be controlled in the real environment; comparing the measured state of the device with the theoretical state of the device to obtain the target control deviation; when the target control deviation exceeds a preset threshold, updating the model parameters of the safety correction model.

[0070] The device actual measured state of the device to be controlled in the above-mentioned real environment may be the device actual measured state when the device to be controlled operates safely in the real environment.

[0071] The above-mentioned theoretical state of the equipment may be a theoretical value of the power flow state of the power system.

[0072] The above-mentioned preset threshold may be a pre-set threshold.

[0073] In an optional embodiment, the theoretical value of the power system flow state, that is, the above-mentioned theoretical state of the equipment and the measured state of the equipment can be compared to obtain a target control deviation, wherein the target control deviation can be a control deviation accumulated according to the comparison results; when the target control deviation exceeds a preset threshold, it means that the accuracy of the safety correction model is low and it is difficult to ensure safety and control accuracy. At this time, the model parameters of the safety correction model can be updated.

[0074] In the above embodiments of the present application, the actual measured state of the equipment is compared with the theoretical state of the equipment to obtain a target control deviation, including: comparing the actual measured state of the equipment with the theoretical state of the equipment to obtain a current control deviation of the safety correction model; obtaining the historical control deviation of the safety correction model; accumulating the historical control deviation and the current control deviation to obtain a target control deviation.

[0075] The above historical control deviation may be the control deviation between the last measured state of the device and the theoretical state of the device. The above historical control deviation may also be the control deviation between the measured state of the device and the theoretical state of the device obtained within a historical preset time period. The above historical control deviation may be one or more. The specific setting method of the historical control deviation is not limited here, and the required historical control deviation can be determined according to the actual scenario requirements.

[0076] In an optional embodiment, the measured state of the equipment can be compared with the theoretical state of the equipment to obtain the current control deviation of the safety correction model, and the historical control deviation of the safety correction model can be obtained. The historical control deviation can be accumulated with the current control deviation to obtain the target control deviation.

[0077] In the above embodiment of the present application, after the initial control instruction is corrected using the safety correction model to obtain the target control instruction and the theoretical state of the device, the method also includes: outputting the target control instruction; and updating the model parameters of the safety correction model when a deviation confirmation instruction corresponding to the target control instruction is received, wherein the deviation confirmation instruction is used to determine whether there is a deviation between the actual measured state of the device to be controlled and the theoretical state of the device output by the safety correction model.

[0078] In an optional embodiment, the theoretical state of the device can be output to the user's terminal or display screen so that the user can confirm whether there is a deviation in the theoretical state of the device. If the user believes that there is a deviation, the user can click an OK button or confirm it through other methods to generate a deviation determination instruction. The model parameters of the safety correction model can be updated according to the generated deviation determination instruction to improve the model accuracy of the safety correction model.

[0079] In the above embodiment of the present application, updating the model parameters of the security correction model includes: storing state information in a preset storage device, wherein the preset storage device is used to store historical states obtained by measuring the real environment; sampling the data stored in the preset storage device to generate first training data corresponding to the security correction model; and updating the model parameters of the security correction model based on the first training data.

[0080] The above-mentioned preset storage device may be a device specifically used for storing data in the power system, and the preset storage device may also be each device to be controlled in the power system, wherein the device to be controlled may have a storage space specifically used for storing data.

[0081] The aforementioned preset storage device may also be a data storage device.

[0082] In an optional embodiment, after obtaining the status information of the device to be controlled, the status information storage value can be preset in a storage device to facilitate subsequent use of the status information; the data stored in the preset storage device can be continuously sampled to generate first training data corresponding to the security correction model, so that the model parameters of the security correction model can be updated according to the first training data, which can effectively improve the model accuracy of the security correction model.

[0083] In another optional embodiment, after the latest status information is obtained, the data in the preset storage device may be updated using the latest status information; the data in the preset storage device may also be updated periodically based on the obtained status information.

[0084] In the above embodiment of the present application, the method also includes: constructing an initial correction model based on the safe operation restriction conditions of the device to be controlled; training the initial correction model through historical knowledge information to obtain a safe correction model.

[0085] The above-mentioned safety operation restriction condition may be a constraint condition of safety operation restriction. In the power system, the safety operation restriction condition may be a constraint condition of safety operation restriction in the power system.

[0086] The above-mentioned historical knowledge information may be prior knowledge, wherein the prior knowledge may be input learning rate, update step size, power system and each adjustable equipment model parameter, and may also be other prior knowledge, which are not listed here one by one.

[0087] In an optional embodiment, various neural networks in the reinforcement learning algorithm can be initialized, and the learning rate, update step size, power system and initial correction models of each adjustable device can be input; the initial correction model of each adjustable device is trained based on prior knowledge to obtain a safety correction model.

[0088] In the above embodiment of the present application, after the initial control instruction is corrected using the safety correction model to obtain the target control instruction, the method also includes: storing the state information to a preset storage device; sampling the data stored in the preset storage device to generate second training data corresponding to the reinforcement learning model; and updating the model parameters of the reinforcement learning model based on the second training data.

[0089] The above-mentioned preset storage device may be a device specifically used for storing data in the power system, and the preset storage device may also be each device to be controlled in the power system, wherein the device to be controlled may have a storage space specifically used for storing data.

[0090] The aforementioned preset storage device may also be a data storage device.

[0091] In an optional embodiment, after obtaining the status information of the device to be controlled, the status information storage value can be preset in a storage device to facilitate subsequent use of the status information; the data stored in the preset storage device can be continuously sampled to generate second training data corresponding to the safety correction model, so that the model parameters of the reinforcement learning model can be updated according to the second training data, which can effectively improve the model accuracy of the reinforcement learning model.

[0092] In another optional embodiment, during the real-time operation of the power system, the neural network and safety correction model in reinforcement learning can be used to periodically output real-time dispatch instructions for multiple types of adjustable devices such as source-grid-load-storage. The data storage device is updated according to the latest measured state information of the adjustable devices in the power system, and a training set is continuously sampled from the data storage device. The dispatch strategy is dynamically updated and parameter optimized using a reinforcement learning algorithm to promote continuous optimization of the strategy, thereby achieving mutual cooperation and coordinated dispatch of various adjustable devices and maximizing rewards from the power system environment.

[0093] In the above embodiment of the present application, the method also includes: constructing an initial learning model, wherein the initial learning model is used to characterize the mapping relationship between different states of the device to be controlled and different control instructions; generating a reward function of the initial learning model based on the operating cost and line flow of the target control instruction; and training the initial learning model based on the third training data and the reward function to obtain a reinforcement learning model.

[0094] The above-mentioned line flow can be unit output conditions, load shedding and load transfer, etc.

[0095] The above-mentioned operation cost may be the operation cost when the device to be controlled executes the target control instruction, and the above-mentioned line flow may be the line flow when the device to be controlled executes the target control instruction.

[0096] The above-mentioned reward function may be a reward function designed with the goal of minimizing operating costs and eliminating power flow over-limit scenarios.

[0097] The different states of the above-mentioned devices to be controlled can be a reinforcement learning state space, wherein the reinforcement learning state space is composed of power grid state (including but not limited to branch flow, node voltage, line state, etc.) and device state (including but not limited to generator output, energy storage energy state, load demand, etc.).

[0098] The different control instructions for the above-mentioned devices to be controlled may be real-time dispatching instructions for multiple types of adjustable devices including source-grid-load-storage in the power system in the reinforcement learning action space.

[0099] The mapping relationship between different states of the device to be controlled and different control instructions represented by the above initial learning model may be a scheduling strategy.

[0100] In an optional embodiment, a reinforcement learning algorithm can be designed, that is, an initial learning model is constructed to generate a target design reward function to minimize operating costs and eliminate power flow over-limit scenarios; the initial learning model is used to train the dispatch strategy to obtain a reinforcement learning model. The reinforcement learning model can determine the action space value based on the current state space value sampled from the real-time environment of the power system, use the dispatch strategy to output the reference value of the dispatch instruction of each adjustable device, and send it to the next link.

[0101] Traditional power system dispatching modes are difficult to meet real-time dispatching needs in a power grid environment with drastic changes and inaccurate model parameters. In order to cope with the challenges brought by the drastic changes in new energy sources and ensure the safety of complex power systems in emergencies and the economy of long-term operation, this application proposes a knowledge-data-driven fusion security reinforcement learning architecture, which adopts a combination of reinforcement learning and optimization to achieve rapid decision-making on real-time dispatching instructions of power systems in complex power grid environments, and promote safe and economical operation of power systems.

[0102] Figure 3 It is a schematic diagram of a device control process according to an embodiment of the present application. In the process of the reinforcement learning algorithm, the power grid state and the device state can be input into the multi-layer neural network, and the reinforcement learning model can be obtained by training, that is, the scheduling strategy can be obtained, wherein the scheduling strategy can obtain real-time scheduling instructions for multiple types of adjustable devices such as source-grid-load-storage, and the scheduling instruction reference value can be input into the safety correction model so as to output the scheduling instruction correction value using the safety correction model, wherein the goal of the safety correction model can be to correct the scheduling instruction to the safety domain, and the constraint of the safety correction model can be the safe operation limit of the power system. The safety correction model can be initialized using prior knowledge, and the model parameters of the safety correction model can be updated by sampling from the data storage device, and the scheduling instruction correction value can be used to control the device to be controlled in the power system; the environmental state and device state of the device to be controlled in the real environment can be collected in real time, and the environmental state and device state can be simulated using a simulator to obtain state information, and the state information can be stored in the data storage device, wherein the data in the data storage device can be used for subsequent training to reinforce the learning state, action and reward value.

[0103] Figure 4is a flow chart of a device control method according to an embodiment of the present application, such as Figure 4 As shown, the method includes:

[0104] Step S401, inputting learning rate, neural network parameters, power grid and adjustable device model parameters;

[0105] Optionally, various neural networks in the reinforcement learning algorithm can be initialized, and the learning rate, update step size, power system and adjustable equipment model parameters can be input; based on prior knowledge and model parameters, the power system security correction model can be initialized.

[0106] Step S402, initializing a security correction model of the power system based on prior knowledge;

[0107] Step S403, updating the neural network parameters in the deep reinforcement learning algorithm;

[0108] The above-mentioned deep reinforcement learning algorithm can be a reinforcement learning model.

[0109] Step S404, generating a dispatch instruction reference value using deep reinforcement learning;

[0110] The above-mentioned scheduling instruction reference value may be an initial control instruction.

[0111] Optionally, a reinforcement learning algorithm can be designed to design a reward function with the goal of minimizing operating costs and eliminating power flow over-limit scenarios; the reinforcement learning action space includes real-time dispatch instructions for multiple types of adjustable devices in the power system, including source-grid-load-storage; the reinforcement learning state space consists of the power grid state and the device state. The dispatch strategy is trained using the reinforcement learning algorithm, and the action space value is determined using the dispatch strategy based on the current state space value sampled from the real-time environment of the power system, and the reference value of the dispatch instruction for each adjustable device is output and sent to the next link.

[0112] Step S405, correcting the scheduling instruction based on the safety correction model;

[0113] The above-mentioned safety correction model correction scheduling instruction may be a target control instruction.

[0114] Optionally, the dispatch instruction reference value output by reinforcement learning often cannot strictly guarantee the safety of the power system. In order to ensure that the real-time dispatch instruction of the power system meets the safe operation requirements of the power grid, a safety correction optimization model is constructed. The safety correction optimization model is a constrained optimization problem, which takes the safe operation limit of the power system as the constraint condition and takes the minimum deviation between the measured state of the equipment and the theoretical state of the equipment as the optimization goal. By solving the safety correction optimization model, the target control instruction that can ensure the safe operation of the power system can be obtained, and the target control instruction can be issued to each adjustable device for execution and implementation.

[0115] In this application, the prior knowledge of the power system can be used to initialize the safety correction model, which makes up for the poor safety assurance capabilities of related safety reinforcement learning schemes in the initial stage of training and in emergency situations due to lack of experience; based on the prior knowledge, the model parameters of the safety correction model can be dynamically updated based on the measured data, further improving the model accuracy and promoting the long-term safe operation of the power system.

[0116] Step S406, storing the power grid and device status, and updating the data storage device;

[0117] The above-mentioned power grid and device status may be status information of the device to be controlled.

[0118] Optionally, during the real-time operation of the power system, the neural network and safety correction model in reinforcement learning can be used to periodically output real-time dispatch instructions for multiple types of adjustable devices such as source-grid-load-storage. The data storage device is updated according to the latest measured power system operation data, and a training set is continuously sampled from the data storage device. The dispatch strategy is dynamically updated and parameter optimized using a reinforcement learning algorithm to promote continuous optimization of the strategy, thereby achieving mutual cooperation and coordinated dispatch of various adjustable devices and maximizing rewards from the power system environment.

[0119] The above-mentioned data storage device may be a preset storage device.

[0120] Step S407, determine whether the error of the safety correction model reaches a preset threshold? If yes, execute step S408, if no, execute step S409;

[0121] Optionally, the theoretical value of the power system flow state obtained by the safety correction model can be compared with the measured data in the actual environment. If the cumulative deviation exceeds a preset threshold, the safety correction model parameters are updated based on the measured data to improve the model accuracy.

[0122] Step S408, updating the model parameters of the safety correction model based on the latest status information;

[0123] Step S409, determine whether the training is completed, if so, execute step S410, if not, execute step S403;

[0124] Step S410, outputting reinforcement learning neural network parameters and safety correction model parameters.

[0125] The key technical innovations of this solution are listed as follows:

[0126] This application has the innovative points of reinforcement learning and optimization complementarity, knowledge-data fusion, and source-grid-load-storage coordinated scheduling.

[0127] The complementarity between reinforcement learning and optimization can take advantage of the fast decision-making advantages of reinforcement learning and the safety advantages of optimization methods. Reinforcement learning can be used to achieve fast decision-making in scenarios with inaccurate model parameters, and optimization methods can be used to safely correct the output actions of reinforcement learning to ensure fast calculation and safe implementation of scheduling instructions.

[0128] For knowledge-data fusion, a safety correction method based on knowledge-data fusion can be constructed, and the safety correction model can be initialized using the prior knowledge of the power system, which makes up for the poor safety of related safety reinforcement learning schemes in the initial stage of training and in emergency situations due to lack of experience; in addition, the safety correction model parameters are dynamically updated using measured data based on the knowledge model to further improve the model accuracy.

[0129] For the coordinated dispatch of source-grid-load-storage, a secure reinforcement learning architecture can be constructed to achieve coordinated dispatch and mutual cooperation of multiple types of resources such as source-grid-load-storage, and fully tap the flexibility and regulation potential of the power system.

[0130] Solutions similar to this solution can be divided into the following three categories: optimization solutions considering safety constraints, reinforcement learning solutions, and secure reinforcement learning solutions. The specific contents and shortcomings of similar solutions are introduced in detail as follows:

[0131] 1): Optimization scheme considering security constraints. Among them, the optimization methods for solving the real-time dispatch problem of power system can be mainly divided into two categories: (1) convex relaxation method. The AC power flow equation can be transformed into an easy-to-handle convex model through convex relaxation, such as a linear model and a second-order cone model, and then solved based on a convex optimization method; (2) direct solution using non-convex optimization methods, such as the primal-dual interior point method, gradient algorithm, and heuristic algorithm.

[0132] Its main disadvantages are as follows: (1) High computational burden. Due to the high nonlinearity and non-convexity of the power flow equation, the optimization-based scheme has low computational efficiency and high model complexity. With the increasing growth of renewable energy and flexibility resources, it is difficult to meet the real-time dispatching needs in the new power system environment with drastic changes and complex models; (2) Over-reliance on power system model parameters. In recent years, the uncertainty in the power system has increased, and the number of adjustable resources with inaccurate mathematical models has increased (for example, the network parameters of the low-voltage distribution network and the model parameters on the demand side). It is difficult for optimization schemes to model power systems with inaccurate model parameters.

[0133] 2): Reinforcement learning scheme: The real-time dispatching instructions of the power system are used as the action quantity of reinforcement learning, and the dispatching method is trained based on the reinforcement learning method and massive historical operation data. Its main disadvantage is that it cannot guarantee the security of the power system dispatching instructions during the training and execution process, and it is easy to cause flow safety constraints to exceed the limit and system crash.

[0134] 3): Safety reinforcement learning scheme: Safety reinforcement learning is a type of reinforcement learning method that takes into account safety operation constraints and has great application potential in real-time dispatching of power systems. The relevant safety reinforcement learning methods can be generally divided into the following three categories: (1) adding penalty terms or adaptive penalty functions corresponding to violations of safety constraints to the reward function; (2) using constraint policy optimization or primal-dual methods to learn control strategies in a CMDP environment; (3) projecting reinforcement learning actions into the safety domain by adding additional safety correction methods. Its main disadvantages are as follows: (1) The relevant safety reinforcement learning scheme mainly models the safety constraints of the power system as soft constraints, and this type of scheme is difficult to ensure the instantaneous safety of the power system; (2) Although the addition of additional safety correction methods can project unsafe reinforcement learning actions into the safe feasible domain, the acquisition of the relevant safety correction model depends on a large amount of historical data. In the initial stage of training and in emergencies where there is a lack of experience, the application effect of this type of method is poor.

[0135] This solution proposes a knowledge-data fusion security reinforcement learning architecture to solve the real-time dispatch problem of complex power systems. The proposed solution has low dependence on model accuracy, high decision-making efficiency, strong security performance, and a wide range of applications. Compared with related solutions, the technical effects that this solution can achieve are as follows:

[0136] Regarding 1) of the above-mentioned related technologies, this application can reduce the degree of dependence on power system models and parameters: this application adopts a knowledge-data fusion security reinforcement learning architecture, takes the dispatch instruction as the action quantity of reinforcement learning, takes the power system operating environment as the exploration object of reinforcement learning, and dynamically adjusts and updates the dispatch strategy according to the actual feedback status of the power system. Therefore, the training and optimization of the dispatch strategy of this solution can be completed by continuously interacting with the environment, which greatly reduces the degree of dependence on power system models and parameters compared with related products and technologies.

[0137] Regarding 2) of the above-mentioned related technologies, the present application has high execution efficiency and fast decision-making speed. The present application fully utilizes the fast decision-making advantage of reinforcement learning. Compared with the optimization scheme considering safety constraints, it no longer relies on the accurate power system model, and has higher execution efficiency and faster decision-making speed.

[0138] Regarding the above-mentioned related technology 3), the present application has strong security assurance capability. The present application fully utilizes the security assurance advantages of the optimization method, and can greatly improve the real-time operation safety of the power system compared to the reinforcement learning scheme. In addition, the present application uses the prior knowledge of the power system to initialize the safety correction model, which makes up for the shortcomings of the relevant safety reinforcement learning method in the initial stage of training and in emergencies due to lack of experience; based on the prior knowledge, the parameters of the safety correction model are dynamically updated based on the measured data, which can further improve the accuracy of the model and promote the long-term safe operation of the power system.

[0139] In addition, the application scope of the present application is wide. The present application can promote the coordination and complementarity of multiple types of resources such as source-grid-load-storage. It has a high degree of universality and strong versatility, and can be easily adapted to various real-time dispatching scenarios of power systems, such as energy management, voltage regulation, emergency control, etc. Specifically: for energy management issues, the present application can be used to realize real-time dispatching of active power for multiple types of active regulation equipment in large power systems (for example, generator sets, new energy power stations, energy storage equipment, adjustable loads, etc.), maintain the power balance of the power grid, and meet the energy supply demand; for voltage regulation issues, the present application can be used to realize real-time regulation of reactive power for multiple types of reactive regulation equipment in the power system (for example, generator sets with reactive regulation capabilities, power electronic equipment, capacitors, etc.), and ensure that the voltage of the power grid is at a safe level; in emergency or sudden situations, the present application can be used to restore and adjust the power of the interconnection lines of the regional power system to realize section recovery, power tracking, emergency control and other functions.

[0140] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.

[0142] Example 2

[0143] According to an embodiment of the present application, an embodiment of a device control method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0144] Figure 5 is a flow chart of a device control method according to Embodiment 2 of the present application, such as Figure 5 As shown, the method may include the following steps:

[0145] Step S502: measure the actual power grid environment where the power equipment is located to obtain status information of the power equipment.

[0146] The status information includes: the grid status of the real grid environment and the equipment status of the power equipment.

[0147] Step S504: Map the status information into initial dispatch instructions for the power equipment.

[0148] Step S506, correcting the initial scheduling instruction to obtain the target scheduling instruction.

[0149] Wherein, the target control instruction is in the preset instruction space of the electric power equipment, and the control instruction in the preset instruction space is used to control the safe operation of the electric power equipment;

[0150] Step S508: Control the power equipment based on the target control instruction.

[0151] In the above embodiment of the present application, the initial scheduling instruction is corrected to obtain the target scheduling instruction, including: using a safety correction model to correct the initial scheduling instruction to obtain the target scheduling instruction.

[0152] In the above embodiments of the present application, the safety correction model is also used to correct the initial scheduling instructions to obtain the theoretical equipment state of the power equipment. The method also includes: obtaining the measured equipment state of the power equipment in a real power grid environment; comparing the measured equipment state with the theoretical equipment state to obtain the target control deviation; when the target control deviation exceeds a preset threshold, updating the model parameters of the safety correction model.

[0153] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0154] Example 3

[0155] According to an embodiment of the present application, an embodiment of a device control method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0156] Figure 6 is a flow chart of a device control method according to Embodiment 3 of the present application, such as Figure 6 As shown, the method may include the following steps:

[0157] Step S602: the cloud server receives the status information of the device to be controlled uploaded by the client.

[0158] The state information is obtained by measuring the real environment in which the device to be controlled is located, and the state information includes: the environmental state of the real environment and the device state of the device to be controlled.

[0159] Step S604: the cloud server maps the status information into initial control instructions for the device to be controlled.

[0160] Step S606: The cloud server corrects the initial control instruction to obtain a target control instruction.

[0161] The target control instruction is in a preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled.

[0162] Step S608: the cloud server sends a target control instruction to the client.

[0163] The target control instruction is used to control the device to be controlled through the client.

[0164] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0165] Example 4

[0166] According to an embodiment of the present application, a device control apparatus for implementing the above device control method is also provided. Figure 7 is a schematic diagram of a device control device according to Embodiment 4 of the present application, such as Figure 7 As shown, the device 700 includes: a measurement module 702 , a mapping module 704 , a correction module 706 , and a control module 708 .

[0167] Among them, the measurement module is used to measure the real environment in which the device to be controlled is located to obtain the status information of the device to be controlled; the mapping module is used to map the status information into the initial control instructions of the device to be controlled; the correction module is used to correct the initial control instructions to obtain the target control instructions, wherein the target control instructions are in the preset instruction space of the device to be controlled, and the control instructions in the preset instruction space are used to control the safe operation of the device to be controlled; the control module is used to control the device to be controlled based on the target control instructions.

[0168] It should be noted that the measurement module 702, mapping module 704, correction module 706, and control module 708 correspond to steps S202 to S208 of Example 1, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the device, can be run in the computing terminal 10 provided in Example 1.

[0169] In the above embodiments of the present application, the correction module includes: a correction unit.

[0170] The correction unit is used to correct the initial control instruction using the safety correction model to obtain the target control instruction.

[0171] In the above embodiments of the present application, the device further includes: an acquisition module.

[0172] Among them, the acquisition module is used to obtain the actual measured state of the device to be controlled in the real environment; the comparison module is used to compare the actual measured state of the device with the theoretical state of the device to obtain the target control deviation; the update module is used to update the model parameters of the safety correction model when the target control deviation exceeds the preset threshold.

[0173] In the above embodiments of the present application, the comparison module includes: a comparison unit, an acquisition unit, and an accumulation unit.

[0174] Among them, the comparison unit is used to compare the actual measured state of the equipment with the theoretical state of the equipment to obtain the current control deviation of the safety correction model; the acquisition unit is used to obtain the historical control deviation of the safety correction model; the accumulation unit is used to accumulate the historical control deviation with the current control deviation to obtain the target control deviation.

[0175] In the above embodiments of the present application, the device further includes: an output module and an update module.

[0176] Among them, the output module is used to output the target control instruction; the update module is used to update the model parameters of the safety correction model when receiving the deviation confirmation instruction corresponding to the target control instruction, wherein the deviation confirmation instruction is used to determine whether there is a deviation between the actual measured state of the device to be controlled and the theoretical state of the device output by the safety correction model.

[0177] In the above embodiments of the present application, the update module includes: a storage unit, a generation unit, and an update unit.

[0178] Among them, the storage unit is used to store state information to a preset storage device, wherein the preset storage device is used to store historical states obtained by measuring the real environment; the generation unit is used to sample the data stored in the preset storage device to generate first training data corresponding to the security correction model; the update unit is used to update the model parameters of the security correction model based on the first training data.

[0179] In the above embodiments of the present application, the device further includes: a construction module and a training module.

[0180] Among them, the construction module is used to construct an initial correction model based on the safe operation constraints of the equipment to be controlled; the training module is used to train the initial correction model through historical knowledge information to obtain a safe correction model.

[0181] In the above embodiments of the present application, the device also includes: a storage module, a sampling module, and an update module.

[0182] Among them, the storage module is used to store the state information to a preset storage device; the sampling module is used to sample the data stored in the preset storage device to generate second training data corresponding to the reinforcement learning model; the model parameters of the reinforcement learning model are updated based on the second training data; the update module is used to update the model parameters of the security correction model based on the first training data.

[0183] In the above embodiments of the present application, the device further includes: a generating module.

[0184] Among them, the construction module is used to construct an initial learning model, wherein the initial learning model is used to characterize the mapping relationship between different states of the device to be controlled and different control instructions; the generation module is used to generate a reward function of the initial learning model based on the operating cost and line flow of the target control instruction; the sampling module is used to train the initial learning model based on the third training data and the reward function to obtain a reinforcement learning model.

[0185] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0186] Example 5

[0187] According to an embodiment of the present application, a device control apparatus for implementing the above device control method is also provided. Figure 8 is a schematic diagram of a device control device according to Embodiment 5 of the present application, such as Figure 8 As shown, the device 800 includes: a measurement module 802 , a mapping module 804 , a correction module 806 , and a control module 808 .

[0188] Among them, the measurement module is used to measure the actual power grid environment in which the power equipment is located to obtain the status information of the power equipment; the mapping module is used to map the status information into the initial scheduling instructions of the power equipment; the correction module is used to correct the initial scheduling instructions to obtain the target scheduling instructions, wherein the target scheduling instructions are in the preset instruction space of the power equipment, and the scheduling instructions in the preset instruction space are used to control the safe operation of the power equipment; the control module is used to control the power equipment based on the target scheduling instructions.

[0189] It should be noted that the measurement module 802, mapping module 804, correction module 806, and control module 808 correspond to steps S502 to S508 of Example 2, and the examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the device, can be run in the computing terminal 10 provided in Example 1.

[0190] In the above embodiments of the present application, the correction module includes: a correction unit.

[0191] The correction unit is used to correct the initial scheduling instruction using the safety correction model to obtain the target scheduling instruction.

[0192] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0193] Example 6

[0194] According to an embodiment of the present application, a device control apparatus for implementing the above device control method is also provided. Fig. 9 is a schematic diagram of a device control device according to Example 6 of the present application, such as Fig. 9 As shown, the device 900 includes: a receiving module 902 , a mapping module 904 , a correction module 906 , and a sending module 908 .

[0195] Among them, the receiving module is used to receive the status information of the device to be controlled uploaded by the client through the cloud server; the mapping module is used to map the status information into the initial control instructions of the device to be controlled through the cloud server; the correction module is used to correct the initial control instructions through the cloud server to obtain the target control instructions, wherein the target control instructions are in the preset instruction space of the device to be controlled, and the control instructions in the preset instruction space are used to control the safe operation of the device to be controlled; the sending module is used to send the target control instructions to the client through the cloud server, wherein the target control instructions are used to control the device to be controlled through the client.

[0196] It should be noted that the above-mentioned receiving module 902, mapping module 904, correction module 906, and sending module 908 correspond to steps S602 to S608 of embodiment 3, and the examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1. It should be noted that the above-mentioned modules as part of the device can be run in the computing terminal 10 provided in embodiment 1.

[0197] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in Example 1, as well as the application scenario and implementation process, but is not limited to the scheme provided in Example 1.

[0198] Example 7

[0199] The embodiment of the present invention can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.

[0200] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.

[0201] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the device control method: measure the real environment in which the device to be controlled is located to obtain the status information of the device to be controlled; map the status information into the initial control instructions of the device to be controlled; correct the initial control instructions to obtain the target control instructions, wherein the target control instructions are in the preset instruction space of the device to be controlled, and the control instructions in the preset instruction space are used to control the safe operation of the device to be controlled; and control the device to be controlled based on the target control instructions.

[0202] Optionally, Fig.10 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Fig.10 As shown, the computer terminal A may include: one or more (only one is shown in the figure) processors and a memory.

[0203] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the device control method and apparatus in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned device control method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0204] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: measure the real environment in which the device to be controlled is located to obtain the status information of the device to be controlled; map the status information into the initial control instructions of the device to be controlled; correct the initial control instructions to obtain the target control instructions, wherein the target control instructions are in the preset instruction space of the device to be controlled, and the control instructions in the preset instruction space are used to control the safe operation of the device to be controlled; and control the device to be controlled based on the target control instructions.

[0205] Optionally, the processor may also execute the program code of the following steps: correcting the initial control instruction using the safety correction model to obtain the target control instruction.

[0206] Optionally, the processor may also execute the program code of the following steps: obtaining the measured state of the device to be controlled in a real environment; comparing the measured state of the device with the theoretical state of the device to obtain a target control deviation; and updating the model parameters of the safety correction model when the target control deviation exceeds a preset threshold.

[0207] Optionally, the processor may also execute the following program code: compare the measured state of the device with the theoretical state of the device to obtain the current control deviation of the safety correction model; obtain the historical control deviation of the safety correction model; and accumulate the historical control deviation with the current control deviation to obtain the target control deviation.

[0208] Optionally, the processor may also execute the program code of the following steps: outputting a target control instruction; and updating the model parameters of the safety correction model upon receiving a deviation confirmation instruction corresponding to the target control instruction, wherein the deviation confirmation instruction is used to determine whether there is a deviation between the actual measured state of the device to be controlled and the theoretical state of the device output by the safety correction model.

[0209] Optionally, the processor may also execute program codes of the following steps: storing status information to a preset storage device, wherein the preset storage device is used to store historical status obtained by measuring a real environment; sampling the data stored in the preset storage device to generate first training data corresponding to a security correction model; and updating model parameters of the security correction model based on the first training data.

[0210] Optionally, the processor may also execute program codes of the following steps: constructing an initial correction model based on the safe operation restriction conditions of the device to be controlled; and training the initial correction model through historical knowledge information to obtain a safe correction model.

[0211] Optionally, the processor may also execute the program code of the following steps: using a reinforcement learning model to map the state information into initial control instructions for the device to be controlled, wherein the reinforcement learning model is used to characterize the mapping relationship between different state information and different control instructions.

[0212] Optionally, the processor may also execute the program code of the following steps: storing the state information to a preset storage device; sampling the data stored in the preset storage device to generate second training data corresponding to the reinforcement learning model; and updating the model parameters of the reinforcement learning model based on the second training data.

[0213] Optionally, the processor may also execute the program code of the following steps: constructing an initial learning model, wherein the initial learning model is used to characterize the mapping relationship between different states of the device to be controlled and different control instructions; generating a reward function of the initial learning model based on the operating cost and line flow of the target control instruction; and training the initial learning model based on the third training data and the reward function to obtain a reinforcement learning model.

[0214] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: measure the actual power grid environment in which the power equipment is located to obtain the status information of the power equipment; map the status information into the initial dispatching instructions of the power equipment; correct the initial dispatching instructions to obtain the target dispatching instructions, wherein the target dispatching instructions are in the preset instruction space of the power equipment, and the dispatching instructions in the preset instruction space are used to control the safe operation of the power equipment; and control the power equipment based on the target dispatching instructions.

[0215] Optionally, the processor may also execute the program code of the following steps: correcting the initial scheduling instruction using the security correction model to obtain the target scheduling instruction.

[0216] The processor can call the information and application stored in the memory through the transmission device to execute the following steps: the cloud server receives the status information of the device to be controlled uploaded by the client, wherein the status information is obtained by measuring the device to be controlled in the real environment where the device to be controlled is located; the cloud server maps the status information into an initial control instruction of the device to be controlled; the cloud server corrects the initial control instruction to obtain a target control instruction, wherein the target control instruction is in a preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled; the cloud server sends the target control instruction to the client, wherein the target control instruction is used to control the device to be controlled through the client.

[0217] By adopting the embodiment of the present invention, the real environment in which the device to be controlled is located can be measured to obtain the state information of the device to be controlled; the state information is mapped into the initial control instruction of the device to be controlled; the initial control instruction is corrected to obtain the target control instruction, wherein the target control instruction is in the preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled; the device to be controlled is controlled based on the target control instruction, thereby achieving the purpose of ensuring the safe operation of the device to be controlled. It is easy to notice that the real environment in which the device to be controlled is located can be measured to obtain the state information of the control device. Since the state information contains the factors of the real environment, the effect of real-time scheduling according to the real scene can be achieved, and the initial control instruction is corrected by using the safety correction model to obtain the target control instruction, which can further enhance the safety of the operation of the device to be controlled, thereby solving the technical problem that the scheduling system in the related technology is difficult to meet the real-time scheduling.

[0218] It can be understood by those skilled in the art that Fig.10 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig.10 The structure of the electronic device is not limited. For example, the computer terminal 10 may also include Fig.10 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.10 Different configurations are shown.

[0219] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0220] Example 8

[0221] The embodiment of the present invention further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the device control method provided in the first embodiment.

[0222] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0223] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: measuring the actual environment in which the device to be controlled is located to obtain status information of the device to be controlled; mapping the status information into initial control instructions for the device to be controlled; correcting the initial control instructions to obtain target control instructions, wherein the target control instructions are in a preset instruction space of the device to be controlled, and the control instructions in the preset instruction space are used to control the safe operation of the device to be controlled; and controlling the device to be controlled based on the target control instructions.

[0224] Optionally, the storage medium is further configured to store program codes for executing the following steps: correcting the initial control instruction using the safety correction model to obtain the target control instruction.

[0225] Optionally, the storage medium is also configured to store program codes for executing the following steps: obtaining the actual measured state of the device to be controlled in a real environment; comparing the actual measured state of the device with the theoretical state of the device to obtain a target control deviation; and updating the model parameters of the safety correction model when the target control deviation exceeds a preset threshold.

[0226] Optionally, the storage medium is also configured to store program codes for executing the following steps: comparing the measured state of the equipment with the theoretical state of the equipment to obtain the current control deviation of the safety correction model; obtaining the historical control deviation of the safety correction model; and accumulating the historical control deviation with the current control deviation to obtain the target control deviation.

[0227] Optionally, the storage medium is also configured to store program codes for executing the following steps: outputting a target control instruction; and updating the model parameters of the safety correction model upon receiving a deviation confirmation instruction corresponding to the target control instruction, wherein the deviation confirmation instruction is used to determine whether there is a deviation between the actual measured state of the device to be controlled and the theoretical state of the device output by the safety correction model.

[0228] Optionally, the storage medium is also configured to store program codes for executing the following steps: storing status information to a preset storage device, wherein the preset storage device is used to store historical status obtained by measuring a real environment; sampling the data stored in the preset storage device to generate first training data corresponding to a security correction model; and updating model parameters of the security correction model based on the first training data.

[0229] Optionally, the storage medium is also configured to store program codes for executing the following steps: constructing an initial correction model based on safe operation restriction conditions of the device to be controlled; and training the initial correction model through historical knowledge information to obtain a safe correction model.

[0230] Optionally, the storage medium is also configured to store program code for executing the following steps: using a reinforcement learning model to map state information into initial control instructions for the device to be controlled, wherein the reinforcement learning model is used to characterize the mapping relationship between different state information and different control instructions.

[0231] Optionally, the storage medium is also configured to store program codes for executing the following steps: storing state information to a preset storage device; sampling the data stored in the preset storage device to generate second training data corresponding to the reinforcement learning model; and updating the model parameters of the reinforcement learning model based on the second training data.

[0232] Optionally, the storage medium is also configured to store program codes for executing the following steps: constructing an initial learning model, wherein the initial learning model is used to characterize the mapping relationship between different states of the device to be controlled and different control instructions; generating a reward function of the initial learning model based on the operating cost and line flow of the target control instruction; and training the initial learning model based on the third training data and the reward function to obtain a reinforcement learning model.

[0233] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: measuring the actual power grid environment in which the power equipment is located to obtain status information of the power equipment; mapping the status information into initial scheduling instructions for the power equipment; correcting the initial scheduling instructions to obtain target scheduling instructions, wherein the target scheduling instructions are in a preset instruction space of the power equipment, and the scheduling instructions in the preset instruction space are used to control the safe operation of the power equipment; and controlling the power equipment based on the target scheduling instructions.

[0234] Optionally, the storage medium is also configured to store program codes for executing the following steps: correcting the initial scheduling instructions using a safety correction model to obtain target scheduling instructions and a theoretical state of the device.

[0235] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the cloud server receives status information of the device to be controlled uploaded by the client, wherein the status information is obtained by measuring the device to be controlled in the real environment where the device to be controlled is located; the cloud server maps the status information into initial control instructions for the device to be controlled; the cloud server corrects the initial control instructions to obtain target control instructions, wherein the target control instructions are in a preset instruction space of the device to be controlled, and the control instructions in the preset instruction space are used to control the safe operation of the device to be controlled; the cloud server sends the target control instructions to the client, wherein the target control instructions are used to control the device to be controlled through the client.

[0236] By adopting the embodiment of the present invention, the real environment in which the device to be controlled is located can be measured to obtain the state information of the device to be controlled; the state information is mapped into the initial control instruction of the device to be controlled; the initial control instruction is corrected to obtain the target control instruction, wherein the target control instruction is in the preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled; the device to be controlled is controlled based on the target control instruction, thereby achieving the purpose of ensuring the safe operation of the device to be controlled. It is easy to notice that the real environment in which the device to be controlled is located can be measured to obtain the state information of the control device. Since the state information contains the factors of the real environment, the effect of real-time scheduling according to the real scene can be achieved, and the initial control instruction is corrected by using the safety correction model to obtain the target control instruction, which can further enhance the safety of the operation of the device to be controlled, thereby solving the technical problem that the scheduling system in the related technology is difficult to meet the real-time scheduling.

[0237] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0238] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0239] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0240] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0241] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0242] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0243] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A device control method, characterized in that: include: Measuring the real environment of the device to be controlled to obtain status information of the device to be controlled; Mapping the state information into initial control instructions of the device to be controlled by using a reinforcement learning model, wherein the reinforcement learning model is used to characterize the mapping relationship between different state information and different control instructions; Correcting the initial control instruction using a safety correction model to obtain a target control instruction, wherein the target control instruction is in a preset instruction space of the device to be controlled, and the control instruction in the preset instruction space is used to control the safe operation of the device to be controlled; Controlling the device to be controlled based on the target control instruction; Wherein, the method further comprises: Based on the safety operation restriction conditions of the device to be controlled, construct an initial correction model; The initial correction model is trained by using historical knowledge information to obtain the security correction model.

2. The method according to claim 1, characterized in that: The safety correction model is also used to correct the initial control instruction to obtain the device theoretical state of the device to be controlled. The method also includes: Acquire the device actual measured state of the device to be controlled in the real environment; Comparing the measured state of the device with the theoretical state of the device to obtain a target control deviation; When the target control deviation exceeds a preset threshold, the model parameters of the safety correction model are updated.

3. The method according to claim 2, characterized in that Compare the measured state of the equipment with the theoretical state of the equipment to obtain the target control deviation, including: Comparing the measured state of the device with the theoretical state of the device to obtain the current control deviation of the safety correction model; Obtaining historical control deviations of the safety correction model; The historical control deviation and the current control deviation are accumulated to obtain the target control deviation.

4. The method according to claim 2, characterized in that: After the initial control instruction is corrected by using the safety correction model to obtain the target control instruction, the method further includes: Outputting the target control instruction; When a deviation confirmation instruction corresponding to the target control instruction is received, the model parameters of the safety correction model are updated, wherein the deviation confirmation instruction is used to determine whether there is a deviation between the actual measured state of the device to be controlled and the theoretical state of the device output by the safety correction model.

5. The method according to any one of claims 1 to 4, characterized in that: Updating the model parameters of the safety correction model includes: Storing the state information in a preset storage device, wherein the preset storage device is used to store historical states obtained by measuring the real environment; Sampling the data stored in the preset storage device to generate first training data corresponding to the security correction model; The model parameters of the safety correction model are updated based on the first training data.

6. The method according to claim 1, characterized in that After the initial control instruction is corrected by using the safety correction model to obtain the target control instruction, the method further includes: Storing the status information in a preset storage device; Sampling the data stored in the preset storage device to generate second training data corresponding to the reinforcement learning model; The model parameters of the reinforcement learning model are updated based on the second training data.

7. The method according to claim 1, characterized in that The method further comprises: Constructing an initial learning model, wherein the initial learning model is used to characterize the mapping relationship between different states of the device to be controlled and different control instructions; generating a reward function of the initial learning model based on the operating cost and line flow of the target control command; The initial learning model is trained based on the third training data and the reward function to obtain the reinforcement learning model.

8. A device control method, characterized in that: include: Measuring the real power grid environment in which the power equipment is located to obtain status information of the power equipment; Mapping the state information into initial dispatch instructions of the power equipment using a reinforcement learning model, wherein the reinforcement learning model is used to represent a mapping relationship between different state information and different control instructions; Correcting the initial dispatching instruction using a safety correction model to obtain a target dispatching instruction, wherein the target dispatching instruction is in a preset instruction space of the power equipment, and the dispatching instruction in the preset instruction space is used to control the safe operation of the power equipment; Controlling the electric power equipment based on the target scheduling instruction; Wherein, the method further comprises: Based on the safety operation constraints of the equipment to be controlled, an initial correction model is constructed; The initial correction model is trained by using historical knowledge information to obtain the security correction model.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the device control method according to any one of claims 1 to 8.

10. A computer terminal, characterized in that: include: Memory, used to store programs; A processor is connected to the memory and is used to run the program, wherein the program executes the device control method described in any one of claims 1 to 8 when running.

Citation Information

Patent Citations

  • Microgrid energy management system capable of realizing load management

    CN105743126A

  • Equipment control method and device, electronic equipment and computer readable storage medium

    CN111352348A

  • Electric power monitoring system and electric power monitoring method

    CN111756111A

  • Power grid real-time adaptive decision-making method based on deep reinforcement learning

    CN114217524A

  • Open loop power offset update

    EP2012442A1