Low-voltage distributed photovoltaic flexible-rigid dual-mode regulation instruction scheduling execution method

By adopting a flexible and rigid dual-mode control command scheduling and execution method for low-voltage distributed photovoltaic systems, the problems of low command switching latency and low success rate in scenarios with millions of terminals are solved, achieving efficient and reliable photovoltaic group control scheduling and improving the system's concurrent throughput and fault handling capabilities.

CN123144256APending Publication Date: 2026-11-20HENAN TENGLONG INFORMATION ENG
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611301575.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies have low command switching latency and control success rate in low-voltage distributed photovoltaic scenarios with millions of terminals, and lack an effective command execution mechanism, making it difficult to meet the needs of large-scale photovoltaic group control.

Method used

The method of scheduling and executing flexible and rigid dual-mode control commands for low-voltage distributed photovoltaic power generation is adopted. The control attribution relationship is obtained through segmented mapping, the control work orders of the transformer area are split, flexible or rigid control commands are generated, and automatic switching is achieved by using a coroutine suspension waiting mechanism and time window constraints, so as to realize distributed parallel processing and automatic fault fallback.

Benefits of technology

It reduces system complexity, improves command switching success rate and resource utilization, shortens the forced grid disconnection time for photovoltaic users, and ensures efficient and reliable command execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123144256A_ABST
    Figure CN123144256A_ABST
Patent Text Reader

Abstract

The application provides a low-voltage distributed photovoltaic flexible rigid dual-mode regulation instruction scheduling execution method, and belongs to the technical field of distributed photovoltaic group regulation scheduling in power systems. In the execution process of the method, firstly, photovoltaic terminals are fixedly bound to corresponding nodes through slicing mapping, so that multi-node order grabbing is eliminated, distributed locks and cross-node synchronization logic are saved, the system is simplified, and fault positioning is facilitated; secondly, the batch regulation work order of a transformer area is split into terminal sub-tasks, and each node only pulls its own task according to the attribution relationship, so that work order isolation distributed processing is realized; then, the flexible regulation label obtained through user pre-testing is read, flexible or rigid regulation instructions are distinguished, and the flexible-to-rigid scheduling is implemented; then, the non-blocking instruction issuing is suspended by using a coroutine, so that the business thread is released to realize multi-terminal parallel processing; finally, the rigid instruction is automatically issued to bottom out when the flexible regulation fails and the switching time window is not exceeded, so that the instruction switching is realized. In this way, the instruction switching time consumption can be effectively shortened, and the regulation success rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system distributed photovoltaic group control and dispatching technology, specifically involving a method for executing flexible and rigid dual-mode control commands for low-voltage distributed photovoltaic systems. Background Technology

[0002] With the large-scale integration of low-voltage distributed photovoltaic (PV) power into the distribution network, the demand for group dispatch and control services in distribution areas continues to grow. This necessitates the execution of grid-connected and off-grid control for a massive number of PV terminals. This requires meeting the grid's peak-shaving and feeder control requirements while also considering the PV user experience and minimizing the forced off-grid time. This places high demands on the concurrent execution capability of control commands and the ability to switch between rigid and flexible modes. Efficient and reliable command execution has become a key aspect of low-voltage distributed PV control.

[0003] In the prior art, see Chinese invention patent application number "202310785860.X", which proposes a dynamic optimization and control method for distributed photovoltaic access distribution substations. Based on the substation voltage and overload operation status, a flexible scheduling model or a rigid control model is dynamically selected. The optimal control scheme for the substation is output by solving the mathematical model, thereby realizing the coordination of source, grid, load and storage and the rigid switching of photovoltaics in the substation.

[0004] However, existing technologies focus on optimizing strategies at the transformer substation level and outputting macroscopic control decisions. They lack a distributed command execution mechanism, and the contention-based distributed architecture is highly complex, making it difficult to guarantee command switching latency and control success rate in scenarios with millions of terminals. This makes it difficult to meet the needs of large-scale low-voltage distributed photovoltaic group control and dispatching on-site. Summary of the Invention

[0005] The technical problem to be solved by this invention is how to ensure the instruction switching delay and control success rate of low-voltage distributed photovoltaic in a scenario with millions of terminals. In view of the shortcomings of the prior art, this invention provides a method for scheduling and executing flexible and rigid dual-mode control instructions for low-voltage distributed photovoltaic.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: This invention provides a method for executing flexible and rigid dual-mode control commands for low-voltage distributed photovoltaic systems, comprising: S1. Register the distributed photovoltaic control nodes to obtain unique node numbers, and perform segmentation mapping based on the unique node numbers and the unique identifiers of the photovoltaic terminals to obtain the control affiliation relationship between each photovoltaic terminal and the corresponding distributed photovoltaic control node; S2. The control work orders issued by the dispatching side are split into sub-tasks, and the terminal sub-tasks of the photovoltaic terminals obtained by the distributed photovoltaic control nodes are pulled according to the control attribution relationship, so that the distributed photovoltaic control nodes can read them. S3. Read a terminal subtask of the photovoltaic terminal and a preset tag on the user side corresponding to the photovoltaic terminal, and generate a control instruction through the distributed photovoltaic control node. The preset tag includes flexible availability and non-flexible availability, and generates flexible control instructions and rigid control instructions accordingly. S4. The control instruction is sent to the corresponding photovoltaic terminal through the distributed photovoltaic control node, and the execution result of the photovoltaic terminal is suspended and waited for. The control instruction generation process of a terminal subtask of another photovoltaic terminal is read. If the control instruction sent is the flexible control instruction, the first issuance timestamp is recorded. S5. When the execution result is fed back to the distributed photovoltaic control node, if the execution result is that the flexible control instruction failed to be executed, and the preset instruction switching time is not exceeded according to the first issuance timestamp, the control instruction generation process is executed to generate the rigid control instruction and issue it.

[0007] Compared to existing technologies, the beneficial effects of this invention include: First, during the startup of the control service node or the cluster scaling up / down phase, each distributed photovoltaic control node completes instance registration with the registration center, which assigns a globally unique node number. Then, based on the node number and the unique identifier of the photovoltaic terminal, a sharding mapping operation is performed to obtain the control affiliation relationship of each photovoltaic terminal to which control node it belongs. The function of registering and obtaining a unique node number is to provide a unique identity for each service instance within the cluster, providing computational parameters for subsequent sharding hash operations. Furthermore, sharding mapping can handle massive photovoltaic... Terminals are fixedly bound to a single control node, ensuring that all work orders for the same photovoltaic terminal are processed by only one node. This eliminates the phenomenon of multiple nodes competing for the same terminal's work orders in traditional contention-based distributed architectures, saving complex business logic such as distributed locks, cross-node task synchronization, and cross-node deduplication, thus reducing overall system complexity. Simultaneously, all business logs for the same terminal are centralized on a single node, improving fault location efficiency. Secondly, the system receives distribution area control work orders from the dispatching-side source-grid-load-storage system. These distribution area work orders are batch group control tasks for the entire distribution area and cannot be directly executed by a single node; therefore, distribution area control is required. Work orders are broken down into tasks. District-level work orders are decomposed into terminal subtasks at the individual photovoltaic terminal level. Large-scale batch tasks are further broken down into the smallest executable units that can be distributed. Then, the control attribution relationships obtained from the previous steps are reused. Each distributed photovoltaic control node only pulls the terminal subtasks belonging to it and stores them in its local processing queue, discarding subtasks outside its jurisdiction. This achieves node-isolated distribution of work order tasks, preventing task drift across nodes, and thus evenly distributing millions of terminal work orders across the cluster nodes for distributed parallel processing. Finally, a single terminal subtask is retrieved from the local processing queue. Simultaneously, the preset tags on the photovoltaic terminal user side are read. The preset tags are divided into two categories: flexible availability and non-flexible availability. The tags are derived from the pre-flexibility test results of T-1 day and indicate whether the photovoltaic user equipment supports flexible adjustment of active power percentage. Only flexible available users can execute flexible control commands, while non-flexible available users can only execute rigid control commands such as hard closing and hard opening. This enables the pre-judgment of the business layer's first flexible and then rigid scheduling strategy. The node generates flexible or rigid control commands according to the tag type, solving the problem of the traditional system's rigid and flexible control being separated and unable to be integrated for scheduling.Based on this, the control command is sent to the corresponding photovoltaic terminal. A coroutine-based suspension and waiting mode is used to wait for the photovoltaic terminal to return the execution result, instead of the traditional thread-blocking polling method. During the period when the coroutine is suspended waiting for the terminal to return the message, the business thread is released, preventing the thread from idling and causing unnecessary CPU resource occupation. The business thread can continue to read the terminal subtask of another photovoltaic terminal and continue executing the control command generation process, achieving parallel processing between different photovoltaic terminal tasks. This significantly improves server resource utilization, enhances cluster concurrency throughput, and supports simultaneous control of millions of photovoltaic terminals. Furthermore, when a flexible control command is issued, the timestamp of the first issuance of the flexible command is recorded simultaneously, providing a benchmark data source for subsequent steps to determine the rigid-flexible switching time window. The function of the coroutine suspension and waiting feature is to read the characteristics of other terminal subtasks in parallel to achieve concurrent processing of multi-terminal tasks, and record the characteristics of the first issuance timestamp to provide a basis for time window verification. Finally, it receives the instruction execution results returned by the photovoltaic terminal. If it is determined that the flexible control instruction has failed, and it is calculated that the preset instruction switching time has not been exceeded by combining the first issuance timestamp recorded when the flexible control instruction was issued, the control instruction generation process is called again to generate a rigid control instruction for issuance as a fallback. Thus, based on the execution result and timestamp, the judgment is made to complete the automatic switch from flexible control failure to rigid instruction within the limited time window, without manual intervention. This solves the pain points of slow response of rigid instruction switching after flexible control failure and long photovoltaic forced grid disconnection time in traditional solutions, and ensures that the instruction switching time meets the indicator constraints. With this setting, the overall process realizes a complete closed loop of distributed segmented task distribution, flexible-then-rigid instruction generation, asynchronous coroutine issuance, and automatic rigid-flexible fallback switching under time window constraints. While reducing system complexity, it effectively reduces the instruction switching time and improves the overall instruction execution success rate, shortening the forced grid disconnection time for photovoltaic users.

[0008] Optionally, the step S1 of performing segmentation mapping based on the unique node number and the unique identifier of the photovoltaic terminal to obtain the control affiliation relationship between each photovoltaic terminal and the corresponding distributed photovoltaic control node specifically includes: S11. Obtain the total number of online distributed photovoltaic control nodes in real time. Based on the unique node number and the unique identifier, determine whether the following formula is true. If true, determine that the photovoltaic terminal corresponding to the unique identifier and the distributed photovoltaic control node corresponding to the unique node number have a control affiliation relationship: , Wherein, the terminal ID is the unique identifier, N is the total number of online distributed photovoltaic control nodes, and nodeId is the unique node number; S12. By traversing the unique identifier of each photovoltaic terminal based on the unique node number through the distributed photovoltaic control node, the control relationship between each photovoltaic terminal and the corresponding distributed photovoltaic control node is obtained. S13. When the total number of online distributed photovoltaic control nodes changes due to expansion or contraction, S11 is executed again.

[0009] Optionally, S2 specifically includes: S21. Receive the distribution area control work order issued by the dispatching side and record the work order reception timestamp. The distribution area control work order includes off-grid work orders and grid-connected work orders. The information carried by the distribution area control work order includes work order number, work order type, distribution area number, unique identifier of each photovoltaic terminal to which the distribution area belongs, flexible control strategy switch and flexible power percentage parameter. S22. The control work order of the transformer area is split, and one photovoltaic terminal corresponds to one terminal subtask. The terminal subtask is traversed through any of the distributed photovoltaic control nodes. According to the control affiliation relationship, it is determined whether the photovoltaic terminal corresponding to the terminal subtask belongs to the distributed photovoltaic control node. If yes, the terminal subtask is pulled to the node's local waiting queue. If no, the terminal subtask is discarded. S23. For the terminal subtask in the local pending queue, if it is an off-network work order and the flexible control strategy switch is off, the corresponding flexible power percentage parameter is filled with 0% by default; if it is a grid-connected work order and the flexible control strategy switch is off, the corresponding flexible power percentage parameter is filled with 100% by default. S24. For the terminal subtask in the local pending queue, read the local cache to obtain the preset tag of the user side of the photovoltaic terminal. The user side is verified by prediction test to see if it supports flexible power adjustment. If it does, the preset tag is marked as flexible available. If not, the preset tag is marked as non-flexible available.

[0010] Optionally, step S4, which involves sending the control command to the corresponding photovoltaic terminal through the distributed photovoltaic control node and suspending the process to wait for the execution result from the photovoltaic terminal, specifically includes: S41. According to the control instruction, a coroutine object is generated through the distributed photovoltaic control node, wherein the coroutine object is bound to the type of the control work order of the transformer area to which the terminal subtask belongs, the unique identifier of the photovoltaic terminal, the type of the control instruction, the remaining number of retries, and the preset waiting time; S42. The control command is sent from the distributed photovoltaic control node to the corresponding photovoltaic terminal, and the corresponding coroutine object enters a suspended state to release the business thread and wait for the execution result of the photovoltaic terminal. S43. In real time, determine whether the execution result of the photovoltaic terminal corresponding to the coroutine object in the suspended state is received, and at the same time determine whether the waiting time exceeds the preset waiting time bound to the coroutine object. If the result of at least one of the two determinations is yes, wake up the coroutine object, and when the waiting time exceeds the preset waiting time bound to the coroutine object, determine that the execution result is an execution failure. S44. Real-time statistics are collected on the number of coroutine objects currently in the suspended state of the distributed photovoltaic control node. When the number exceeds the preset maximum concurrent coroutine threshold, the retrieval of the terminal subtask through the distributed photovoltaic control node is paused. When the number is lower than the preset maximum concurrent coroutine threshold, the retrieval of the terminal subtask through the distributed photovoltaic control node is resumed.

[0011] Optionally, the step of sending the control command to the corresponding photovoltaic terminal through the distributed photovoltaic control node in S4 specifically includes: sending the control command to the photovoltaic terminal through the distributed photovoltaic control node via a message middleware and a data collection front-end group, wherein the message middleware sets a downlink command topic, the data collection front-end group consumes the downlink command topic, and sends the control command to the photovoltaic terminal.

[0012] Optionally, the process of feeding back the execution result of S5 to the distributed photovoltaic control node specifically includes: the execution result is fed back from the photovoltaic terminal to the distributed photovoltaic control node via the acquisition front-end group, the message middleware, and the uplink result routing, wherein the message middleware sets up an uplink result topic, the acquisition front-end group receives the uplink execution result message from the photovoltaic terminal and writes it into the uplink result topic, the uplink result routing consumes the message in the uplink result topic, extracts the unique identifier, and reuses the control attribution relationship to determine the distributed photovoltaic control node corresponding to the unique node number to which the unique identifier belongs, and forwards the execution result to the distributed photovoltaic control node.

[0013] Optionally, the low-voltage distributed photovoltaic flexible and rigid dual-mode control instruction scheduling and execution method further includes: when the execution result is fed back to the distributed photovoltaic control node, if the execution result is determined to be an execution failure, the remaining retry count bound to the coroutine object is read; if the remaining retry count is greater than 0, the remaining retry count is reduced by one and S4 is re-executed; if the remaining retry count is equal to 0 and the control instruction is the rigid control instruction, the task is marked as failed.

[0014] Optionally, in step S5, if the preset instruction switching time is exceeded based on the first issuance timestamp, the task is marked as ultimately failing. In S5, the step of executing the control instruction generation process to generate the rigid control instruction and then issuing it specifically includes: modifying the control instruction to the rigid control instruction, resetting the remaining retry count bound to the corresponding coroutine object, and then issuing the rigid control instruction to the corresponding photovoltaic terminal.

[0015] Optionally, the low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling and execution method further includes: if the type of the control work order of the distribution area to which the terminal subtask belongs is the grid-connected work order, and the task is marked as failed, a preset delay timer is started, and after the preset delay timer expires, the control command of the terminal subtask is reissued; if the task is marked as failed again, the local field is marked as faulty.

[0016] Optionally, the low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling and execution method further includes: after all the terminal sub-tasks of the control work order in the transformer area have been processed, the work order indicators are statistically analyzed and written into the work order execution log and the work order indicators to the storage, and the execution results and fault markers are reported to the scheduling side. The work order indicators include the command success rate, the number of rigid and flexible command switching and the switching time. Attached Figure Description

[0017] The present invention will now be described in further detail with reference to the accompanying drawings.

[0018] Figure 1 This is a flowchart illustrating the low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling and execution method in this embodiment of the invention. Detailed Implementation

[0019] To better understand the present invention, the following embodiments further illustrate the content of the invention, but the scope of protection of the present invention is not limited to the following embodiments. Numerous specific details are set forth in the following description to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the present invention can be practiced without one or more of these details.

[0020] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0021] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0022] An embodiment of the present invention provides a method for scheduling and executing flexible and rigid dual-mode control commands for low-voltage distributed photovoltaic (PV) systems, comprising: S1, registering distributed PV control nodes to obtain unique node numbers, performing segmentation mapping based on the unique node numbers and unique identifiers of PV terminals, and obtaining the control affiliation relationship between each PV terminal and its corresponding distributed PV control node; S2, splitting the control work orders issued by the dispatching side, and according to the control affiliation relationship, retrieving the terminal sub-tasks of the PV terminals obtained from the splitting through the distributed PV control nodes for the distributed PV control nodes to read; S3, reading a terminal sub-task of a PV terminal and a preset tag on the user side corresponding to the PV terminal, and executing the command through the distributed PV control nodes. The control node generates control instructions, where preset tags include flexible availability and non-flexible availability, corresponding to the generation of flexible control instructions and rigid control instructions; S4, the control instructions are sent to the corresponding photovoltaic terminals through the distributed photovoltaic control node, the execution result of the photovoltaic terminals is suspended and waited for, and the control instruction generation process of a terminal subtask of another photovoltaic terminal is read. If the issued control instruction is a flexible control instruction, the first issuance timestamp is recorded; S5, when the execution result is fed back to the distributed photovoltaic control node, if the execution result is that the flexible control instruction failed to execute, and it is determined according to the first issuance timestamp that the preset instruction switching time has not been exceeded, the control instruction generation process is executed to generate rigid control instructions and issue them.

[0023] In this embodiment, firstly, as... Figure 1As shown in S1, during the startup of the control service node or the cluster scaling up / down phase, each distributed photovoltaic control node registers its instance with the registration center, which assigns a globally unique node number. Then, based on the node number and the unique identifier of the photovoltaic terminal, a sharding mapping operation is performed to determine the control affiliation of each photovoltaic terminal to which control node it belongs. The technical feature of registering and obtaining a unique node number provides a unique identity for each service instance within the cluster, providing computational parameters for subsequent sharding hash operations. Sharding mapping can bind a massive number of photovoltaic terminals to a single control node, ensuring that all work orders for the same photovoltaic terminal are processed by only one node. This eliminates the phenomenon of multiple nodes competing for the same terminal's work orders in traditional contention-based distributed architectures, saving complex business logic such as distributed locks, cross-node task synchronization, and cross-node deduplication, reducing overall system complexity. Simultaneously, all business logs for the same terminal are concentrated on a single node, improving fault location efficiency. Secondly, as... Figure 1 As shown in S2, the system receives distribution area control work orders from the dispatching side's source-grid-load-storage system. These work orders are batch group control tasks covering the entire distribution area and cannot be directly executed by a single node. Therefore, it's necessary to decompose the distribution area control work orders into terminal sub-tasks at the granularity of individual photovoltaic terminals. This breaks down the large-scale batch tasks into the smallest distributed execution units. Then, the control attribution relationship obtained from the previous steps is reused. Each distributed photovoltaic control node only pulls the terminal sub-tasks belonging to itself and stores them in its local queue, discarding sub-tasks outside its jurisdiction. This achieves node-isolated distribution of work order tasks, preventing task drift across nodes, and thus evenly distributing millions of terminal work orders across the cluster nodes for distributed parallel processing. Then, as... Figure 1 As shown in S3, a single terminal subtask is retrieved from the local pending queue, and a preset tag on the photovoltaic terminal user side is read. The preset tags are divided into two categories: flexible availability and non-flexible availability. The tags originate from the pre-flexibility test results of day T-1, indicating whether the photovoltaic user equipment supports flexible adjustment of active power percentage. Only flexible available users can execute flexible control commands; non-flexible available users can only execute rigid control commands such as hard closing and hard opening. This enables pre-judgment of the business layer's "flexible first, rigid later" scheduling strategy. Nodes generate flexible or rigid control commands based on the tag type, solving the problem of traditional systems where rigid and flexible control are disconnected and cannot be integrated for scheduling. Based on this, as... Figure 1As shown in S4, the control command is sent to the corresponding photovoltaic terminal. A coroutine suspension and waiting mode is used to wait for the photovoltaic terminal to return the execution result, instead of the traditional thread blocking polling method. During the period when the coroutine is suspended waiting for the terminal to return the message, the business thread is released, preventing the thread from idling and causing invalid CPU resource occupation. It can continue to read the terminal subtask of another photovoltaic terminal and continue the control command generation process, realizing parallel processing between different photovoltaic terminal tasks. This significantly improves server resource utilization, enhances cluster concurrency throughput, and supports simultaneous control of millions of photovoltaic terminals. Simultaneously, when a flexible control command is issued, the timestamp of the first issuance of the flexible command is recorded, providing a benchmark data source for subsequent steps to determine the rigid-flexible switching time window. The function of the coroutine suspension and waiting feature in this step is to read the features of other terminal subtasks in parallel to achieve concurrent processing of multiple terminal tasks, and the recording of the first issuance timestamp provides a basis for time window verification. Finally, as... Figure 1 As shown in S5, the system receives the command execution results from the photovoltaic terminal. If it determines that the flexible control command has failed, and the calculation based on the first issuance timestamp recorded when the flexible control command was issued shows that the preset command switching time (e.g., 60 seconds) has not yet been exceeded, the control command generation process in S3 is called again to generate a rigid control command for backup. This process relies on the execution results and timestamps to make judgments, automatically switching from flexible control failure to rigid command within a limited time window, without manual intervention. This solves the pain points of slow response when switching from flexible control failure to rigid command and prolonged forced grid disconnection time in traditional solutions, ensuring that the command switching time meets the performance constraints. This setup achieves a complete closed loop of distributed task distribution, flexible-to-rigid command generation, asynchronous coroutine issuance, and automatic rigid-flexible backup switching under time window constraints. While reducing system complexity, it effectively reduces command switching time, improves the overall command execution success rate, and shortens the forced grid disconnection time for photovoltaic users.

[0024] It should be noted that each photovoltaic terminal may have multiple meters. Therefore, to further match photovoltaic terminals with multiple meters, when splitting the control work order for the distribution area, the terminal subtask can be further divided into meter subtasks. The execution of terminal subtasks between different photovoltaic terminals is independent and can be executed in parallel. Since multiple meter subtasks are under the same photovoltaic terminal, in order to ensure the stable execution of control, the meter subtasks corresponding to multiple meters within the same photovoltaic terminal must be executed serially and in a queue. The meter subtask of the next meter is started only after the control processing of the previous meter is completed. When the control instruction of the next meter subtask is issued and suspended, the business thread is released and continues to read the terminal subtask of another photovoltaic terminal. If the photovoltaic terminal has multiple meters, it continues to read one meter subtask contained in the terminal subtask of another photovoltaic terminal.

[0025] Optionally, the step S1, which involves segmenting and mapping photovoltaic terminals based on unique node numbers and unique identifiers to obtain the control affiliation between each photovoltaic terminal and its corresponding distributed photovoltaic control node, specifically includes: S11, obtaining the total number of online distributed photovoltaic control nodes in real time, and determining whether the following formula holds true based on the unique node number and unique identifier. If true, determining that the photovoltaic terminal corresponding to the unique identifier and the distributed photovoltaic control node corresponding to the unique node number have a control affiliation: , Wherein, the terminal ID is a unique identifier, N is the total number of online distributed photovoltaic control nodes, and nodeId is a unique node number; S12, by traversing the unique identifier of each photovoltaic terminal based on the unique node number of the distributed photovoltaic control node, the control affiliation relationship between each photovoltaic terminal and the corresponding distributed photovoltaic control node is obtained; S13, when the total number of online distributed photovoltaic control nodes changes due to expansion or contraction, S11 is re-executed.

[0026] In this optional embodiment, in the specific process of obtaining the control affiliation relationship between each photovoltaic terminal and the corresponding distributed photovoltaic control node, firstly, the total number N of online distributed photovoltaic control nodes in the cluster is collected in real time, the unique node number nodeId of the current node and the unique identifier terminal ID of the photovoltaic terminal are read, and a hash sharding operation is performed, i.e. The system employs a hash function to convert the string-formatted terminal ID into a non-negative large integer. The modulo operation distributes the hash result evenly across the total number of online nodes. If the equation holds true, the photovoltaic terminal is determined to belong to the control node corresponding to the current nodeId. Thus, when the total number of online nodes remains constant, the assigned node for the same terminal ID remains fixed each time, achieving static binding of terminal tasks to fixed nodes. This avoids multiple nodes competing for the same terminal work order, eliminates the need for distributed locks and cross-node state synchronization components, and reduces system design complexity. Furthermore, each distributed photovoltaic control node uses its own nodeId to iterate through all unique identifiers of photovoltaic terminals, cyclically calling the aforementioned photovoltaic terminals and distributed photovoltaic control nodes. The system uses an attribution judgment logic to batch filter out all photovoltaic terminals belonging to the current node, obtaining a complete set of control attribution relationships for this node. This provides a filtering basis for subsequently pulling corresponding terminal subtasks. Finally, it continuously monitors cluster node online / offline events. When the cluster expands or shrinks, changing the total number of online nodes N, it re-executes hash sharding calculations to refresh the control attribution relationships of all photovoltaic terminals. This adapts to dynamic cluster expansion / shrinking operation scenarios. Automatic re-sharding after node changes ensures the sharding logic always adapts to the current cluster instance size. Meanwhile, running coroutine tasks continue to execute without interruption from sharding updates; only newly generated work orders are allocated according to the new attribution relationships, ensuring uninterrupted service. This setup enables balanced sharding of millions of terminal tasks and dynamic node expansion / shrinking adaptation, eliminating task conflicts and high system complexity issues caused by contention-driven distributed architectures.

[0027] Optionally, S2 specifically includes: S21, receiving the distribution area control work order issued by the dispatching side and recording the work order reception timestamp, wherein the distribution area control work order includes off-grid work orders and grid-connected work orders, and the information carried by the distribution area control work order includes work order number, work order type, distribution area number, unique identifier of each photovoltaic terminal to which the distribution area belongs, flexible control strategy switch and flexible power percentage parameters; S22, splitting the distribution area control work order, with one photovoltaic terminal corresponding to one terminal subtask, traversing the terminal subtasks through any distributed photovoltaic control node, and determining whether the photovoltaic terminal corresponding to the terminal subtask belongs to the distributed photovoltaic control node according to the control affiliation relationship. If so, pulling the terminal subtask S23. For terminal subtasks in the local pending queue, if it is an off-grid work order and the flexible control strategy switch is off, the corresponding flexible power percentage parameter is filled with 0% by default; if it is a grid-connected work order and the flexible control strategy switch is off, the corresponding flexible power percentage parameter is filled with 100% by default. S24. For terminal subtasks in the local pending queue, read the local cache to obtain the preset tag of the user side of the corresponding photovoltaic terminal. Among them, after the prediction test verifies whether the user side supports flexible power adjustment, if yes, the corresponding preset tag is marked as flexible available; if no, the corresponding preset tag is marked as non-flexible available.

[0028] In this optional embodiment, during the specific execution of S2, firstly, the distribution area control work order issued by the source-grid-load-storage system on the dispatching side is received, the dispatching side task access is completed, and all original business parameters of the work order are completely retained to provide the original work order data source for subsequent steps. Simultaneously, the work order reception timestamp is recorded for subsequent work order full-process time statistics. The distribution area control work order is divided into two categories: off-grid work orders and grid-connected work orders. Each work order carries a work order number, work order type, distribution area number, unique identifiers of all photovoltaic terminals under the distribution area, flexible control strategy switches, and flexible power percentage parameters. Based on this, the distribution area control work order is task-split, with one photovoltaic terminal corresponding to a task. Each distributed photovoltaic control node generates a terminal subtask, breaking down the batch tasks in the transformer area into the smallest execution unit at the single terminal level. Each node iterates through the generated terminal subtasks, reusing the control affiliation relationship for matching. If the terminal belongs to the current node, the terminal subtask is retrieved and stored in the node's local queue. If it does not belong to the node, the subtask is discarded and handed over to the node to which it belongs. This process decomposes large tasks into distributed executable subtasks, and the affiliation relationship matching for subtask retrieval ensures task isolation and distribution by node, preventing cross-node processing of terminal tasks that do not belong to the node, thus achieving task decoupling. The node's local queue is then output. Furthermore, if the photovoltaic terminal has multiple meters, it can be further divided into meter sub-tasks, each with a unique identifier. Then, the terminal sub-tasks in the local processing queue are traversed, and parameter completion logic is implemented. Specifically, when the work order type is an off-grid work order and the flexible control strategy switch is off, the flexible power percentage is automatically filled with 0% by default. Conversely, when the work order type is a grid-connected work order and the flexible control strategy switch is off, the flexible power percentage is automatically filled with 100% by default. This automatically completes valid power parameters in scenarios where the flexible control strategy is off, preventing parameter loss during subsequent instruction generation and ensuring the validity of the instruction message. The completed parameters... The data follows the terminal subtasks downwards. Finally, for the terminal subtasks in the local processing queue, the node's local memory cache is read to obtain the preset tags on the photovoltaic terminal user side. The preset tags are obtained from the T-1 day prediction test, which verifies whether the photovoltaic user equipment supports flexible power regulation. If it supports it, it is marked as flexible and available; otherwise, it is marked as non-flexible and available. At the same time, the tags are preloaded into the node's local cache, which avoids accessing the database to query tags for each subtask, reducing database access pressure and improving task processing speed. The retrieved preset tags follow the terminal subtasks downwards for subsequent steps to determine the type of control instruction. This setting can effectively solve the problems of the original transformer area work order granularity being too large to be suitable for distributed execution, missing parameters, and frequent database queries, ensuring the completeness and reliability of business parameters in the subsequent instruction generation process.

[0029] Optionally, S4, which involves sending control commands to the corresponding photovoltaic terminals through distributed photovoltaic control nodes and suspending the process to wait for the execution results from the photovoltaic terminals, specifically includes: S41, generating a coroutine object through the distributed photovoltaic control nodes based on the control commands, wherein the coroutine object is bound to the type of control work order of the transformer area to which the terminal subtask belongs, the unique identifier of the photovoltaic terminal, the type of control command, the remaining number of retries, and the preset waiting time; S42, sending control commands to the corresponding photovoltaic terminals through the distributed photovoltaic control nodes, and the corresponding coroutine object entering a suspended state to release the business thread and wait for the execution results from the photovoltaic terminals; S43, determining in real time whether a suspended state has been received. The execution result of the photovoltaic terminal corresponding to the coroutine object in the starting state is checked, and it is also determined whether the waiting time exceeds the preset waiting time bound to the coroutine object. If the result of at least one of the two checks is yes, the coroutine object is woken up. If the waiting time exceeds the preset waiting time bound to the coroutine object, the execution result is determined to be execution failure. S44. The number of coroutine objects currently in the suspended state of the distributed photovoltaic control node is counted in real time. When the number exceeds the preset maximum concurrent coroutine threshold, the retrieval of terminal subtasks through the distributed photovoltaic control node is suspended. When the number is lower than the preset maximum concurrent coroutine threshold, the retrieval of terminal subtasks through the distributed photovoltaic control node is resumed.

[0030] In this optional embodiment, during the specific execution process of issuing control commands to the corresponding photovoltaic terminals through distributed photovoltaic control nodes and suspending the process to wait for the execution results from the photovoltaic terminals, firstly, a coroutine object is created based on the generated control command. The coroutine object is bound with complete context information, including the work order type of the sub-task to which the terminal belongs, the unique identifier of the photovoltaic terminal, the control command type, the remaining retries, and the preset waiting time. It may also include the unique identifier of the meter. This encapsulates all business parameters, retry parameters, and timeout parameters of a single command within the coroutine. After the coroutine is subsequently awakened, it can obtain the complete context without querying the external database again, reducing database interaction. The remaining retries are used for subsequent failure retry logic, and the preset waiting time is used for command timeout determination, facilitating subsequent awakening of the coroutine object. Based on this, the control command is issued to the photovoltaic terminal, and the corresponding coroutine object enters a suspended waiting state and actively releases its business thread. After the business thread is released, it can continue to process other terminal sub-tasks instead of being blocked and waiting for the terminal to reply. This differs from traditional thread blocking waiting; it does not occupy the working thread after the command is issued, thus realizing CPU... By fully utilizing resources, parallel processing of tasks from different terminals is achieved, enhancing the concurrent processing capabilities of nodes. Then, during the period when the coroutine object enters a suspended waiting state, two real-time checks are performed in parallel: first, whether an execution result message has been received from the photovoltaic terminal corresponding to the coroutine; and second, whether the coroutine's waiting time has exceeded the preset waiting time bound to the coroutine object. If either condition is met, the coroutine object is awakened to resume subsequent business processing. This ensures normal response to success or failure messages returned by the terminal and also handles timeout scenarios where communication is interrupted and the terminal returns no message, preventing the coroutine from being permanently suspended and ensuring the process can continue smoothly. The process continues downwards. If a wake-up is triggered due to the waiting time exceeding the preset waiting time, the execution result of this instruction is directly determined as a timeout failure. Finally, the total number of currently suspended coroutine objects on the node is counted in real time to implement a backpressure rate limiting mechanism. Specifically, when the number of active suspended coroutines exceeds the preset maximum concurrent coroutine threshold, the retrieval of new terminal subtasks from the local waiting queue is paused. When the number of active coroutines decreases and falls below the threshold, the retrieval of new subtasks resumes. This limits the maximum concurrent task scale of the node, preventing a surge of tasks in a short period from causing memory spikes and service memory overflows, thus ensuring the stability of service operation in high-concurrency scenarios. This setting achieves non-blocking asynchronous waiting through coroutine objects while simultaneously providing concurrency rate limiting protection, overcoming the resource waste and high-concurrency crash defects of traditional thread blocking models. The execution result after the coroutine is woken up is output to subsequent steps for failure retry and rigid-flexible switching logic.

[0031] Optionally, the process of sending control instructions to the corresponding photovoltaic terminals through distributed photovoltaic control nodes in S4 specifically includes: sending control instructions to photovoltaic terminals through distributed photovoltaic control nodes via message middleware and collection front-end group, wherein the message middleware sets downlink instruction topics, the collection front-end group consumes downlink instruction topics, and sends control instructions to photovoltaic terminals.

[0032] In this optional embodiment, in the specific process of issuing control instructions, firstly, after the distributed photovoltaic control nodes assemble the control instruction message, they deliver the message to the downlink instruction topic pre-set in the message middleware. The message middleware uses a message queue component such as Kafka, and uses topic decoupling to decouple the control service node and the collection front-end cluster. The control node is only responsible for producing messages and does not need to directly establish communication connections with massive photovoltaic terminals, thus avoiding excessive pressure on the control node caused by massive terminal communication requests. Meanwhile, the collection front-end cluster continuously consumes the downlink instruction topics of the message middleware, reads the control instruction message, converts it into a device communication protocol message that the photovoltaic terminal can recognize, and sends the protocol message to the corresponding photovoltaic terminal device, realizing the execution of the instruction message to the physical device. With this setup, the control node is only responsible for generating instructions based on business logic, the message middleware achieves asynchronous decoupling and peak shaving between upstream and downstream, and the data acquisition front-end cluster is responsible for terminal communication and protocol conversion. Each component has a clear division of labor and cooperates with each other, avoiding the control node from directly facing the pressure brought by a massive number of terminals. This enables reliable instruction delivery in high-concurrency scenarios. After receiving the instruction, the photovoltaic terminal executes the corresponding control action and generates an uplink execution result message, providing a data source for the uplink result feedback process.

[0033] Optionally, the process of feeding back the execution result of S5 to the distributed photovoltaic control node specifically includes: the execution result is fed back from the photovoltaic terminal to the distributed photovoltaic control node via the acquisition front-end group, message middleware, and uplink result routing. The message middleware sets the uplink result topic, the acquisition front-end group receives the uplink execution result message from the photovoltaic terminal and writes it into the uplink result topic, the uplink result routing consumes the message of the uplink result topic, extracts the unique identifier, and reuses the control attribution relationship to determine the distributed photovoltaic control node corresponding to the unique node number to which the unique identifier belongs, and forwards the execution result to the distributed photovoltaic control node.

[0034] In this optional embodiment, in the specific process of execution result feedback, after the photovoltaic terminal completes the control action, it generates an uplink execution result message. The message carries the unique identifier of the photovoltaic terminal, the message sequence number, and the execution success or failure result code. The message is first uploaded to the acquisition front-end cluster. The acquisition front-end cluster completes the message integrity verification. After the verification is successful, the uplink result message is written into the uplink result topic pre-set by the message middleware to realize the asynchronous temporary storage of the uplink message and decouple the acquisition front-end and the control service node. The uplink result routing component can continuously consume the messages in the uplink result topic, extract the unique identifier of the photovoltaic terminal carried in the message, reuse the control attribution relationship obtained by hash sharding, use the same hash operation to calculate the unique node number to which the unique identifier of the terminal belongs, and forward this uplink result message to the distributed photovoltaic control node with the corresponding nodeId. Thus, it is not necessary to maintain an independent global routing table. By directly reusing the sharding calculation logic, the uplink result can be accurately sent back to the original control node that issued this instruction, avoiding the complex logic of global routing tables and cross-node message forwarding required by traditional distributed solutions. With this setup, the target distributed photovoltaic control node receives the uplink result message forwarded from the route, matches the locally suspended coroutine object according to the message sequence number, triggers the coroutine wake-up logic, and performs failure judgment, retry, and rigid-flexible switching processing based on the execution result. Each link in the entire uplink works in sequence: the photovoltaic terminal outputs the execution message, the data acquisition front-end receives the verification message, the message middleware stores the uplink message and the uplink route reuse fragmentation affiliation relationship and sends it back to the original node, forming a complete end-to-end message closed loop with the downlink transmission link. No additional global routing table is required, reducing the complexity of the distributed system and ensuring that the execution result is accurately sent back to the control node that issued the instruction.

[0035] Optionally, the low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling and execution method further includes: when the execution result is fed back to the distributed photovoltaic control node, if the execution result is determined to be an execution failure, the remaining retry count bound to the coroutine object is read; if the remaining retry count is greater than 0, the remaining retry count is reduced by one and S4 is re-executed; if the remaining retry count is equal to 0 and the control command is a rigid control command, the task is marked as failed.

[0036] In this optional embodiment, when the uplink feeds back the execution result to the distributed photovoltaic control node, the coroutine wake-up parsing obtains the result of instruction execution failure, reads the remaining retry count parameter pre-bound inside the coroutine object, where the remaining retry count comes from the information bound to the coroutine object, and records how many more times the instruction can be retried. If the remaining retry count is greater than 0, the remaining retry count is decremented by one and updated, and then the entire instruction delivery process is re-executed, and the same control instruction is sent to the photovoltaic terminal again. Multiple retries are used to overcome short-term communication failures and improve the overall instruction execution success rate. When the remaining retry count is equal to 0, and the current control instruction itself is already a rigid control instruction, the meter subtask is directly marked as a final task failure and no further retries are made. This configuration reads the remaining retries bound to the coroutine without accessing an external database to read the retry count, reducing database interaction overhead. The branch judgment for rigid instructions with a remaining retries greater than 0 and a sum equal to 0 is marked as failed, implementing a limited-retry mechanism. This not only improves the success rate by mitigating transient communication failures but also prevents the exhaustion of system resources due to infinite retries. Simultaneously, it can work in conjunction with the flexible instruction failure judgment logic. If a flexible control instruction fails, it is prioritized for time window judgment; if the conditions are met, a rigid instruction is generated and issued as a fallback. Only when it is already a rigid instruction and retries have been exhausted is the task directly marked as failed. The retry logic provides failure compensation capabilities for both rigid and flexible control modes, jointly ensuring the overall instruction execution success rate.

[0037] Optionally, in S5, if the preset instruction switching time is exceeded based on the first issuance timestamp, the task is marked as ultimately failed; in S5, the execution of the control instruction generation process to generate rigid control instructions and issue them specifically includes: modifying the control instruction to a rigid control instruction, resetting the remaining retry count bound to the corresponding coroutine object, and then issuing the rigid control instruction to the corresponding photovoltaic terminal.

[0038] In this optional embodiment, the rigid-flexible switching logic is further refined. When judging the failure of flexible control, the timestamp of the first issuance of the flexible instruction is read, and the time difference between the current time and the first issuance of the flexible instruction is calculated. If the time difference has exceeded the preset instruction switching time, even if the flexible instruction fails, the rigid instruction fallback switch will not be executed, and the task will be marked as ultimately failed. This constrains the maximum time consumption of rigid-flexible switching and prevents the unlimited triggering of the fallback rigid instruction after repeated failures of the flexible instruction over a long period of time, ensuring that the rigid-flexible instruction switching time is controllable. On this basis, when the flexible control fails and the preset instruction switching time has not been exceeded, the control instruction type is modified from flexible to rigid control instruction. At the same time, the remaining retry count bound inside the coroutine object is reset to the configured maximum retry count, and then the rigid control instruction is issued again, thereby realizing the business switch from flexible instruction to rigid instruction. Since the coroutine object inherits from the previously failed flexible instruction, the original remaining retry count has been exhausted. If it is not reset, the rigid fallback instruction will not have a chance to retry. After resetting the remaining retry count, the rigid instruction can fully execute the retry logic and retry the fallback rigid instruction multiple times, maximizing the success rate of fallback control. This configuration controls the maximum duration of the time window switch, resets the retry count within the coroutine to ensure that the fallback rigid instruction has full retry capability, and is linked with the retry logic. After the rigid-flexible switch, the rigid instruction can be executed normally and retried if it fails. This ensures both the time window constraint and the success rate of the fallback rigid instruction, fully realizing the control logic of flexible-then-rigid and fallback within the time window.

[0039] Optionally, the low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method further includes: if the type of the control work order of the transformer area to which the terminal subtask belongs is a grid-connected work order, and the task is marked as failed, a preset delay timer is started. After the preset delay timer expires, the control command of the terminal subtask is reissued. If the task is marked as failed again, the local machine is marked as having a fault.

[0040] In this optional embodiment, based on the task failure marking, a special fault handling branch is added for grid connection work orders, and a dedicated exception compensation logic for grid connection work orders is added to take over the result of the previous process marking the task failure. First, when the type of control work order to which the terminal subtask belongs is a grid connection work order, and the task is still marked as failed after all the previous retry and rigid-flexible fallback switching processes, a preset delay timer is started, such as a set time of 10 minutes. This delay timer allows for waiting for the brief grid environment and subsequent communication link disturbance to recover, without immediately determining that on-site handling is required. Next, after the preset delay timer expires, the control command corresponding to the terminal subtask is reissued, and the entire process of command issuance, coroutine waiting, and failure retry is repeated. If the task is marked as failed again after the timer expires and the command is reissued, the local equipment is marked as having a fault, indicating that there is indeed a hardware or on-site fault in the current equipment, requiring maintenance personnel to handle it on-site. This configuration allows for a hierarchical progression with retry and rigid-flexible switching logic. First, the command is executed to retry multiple times. Within the flexible failure time window, a rigid fallback is implemented. After all grid connection work orders fail, a second attempt is made with a delay. Only if the delayed retry still fails is the field defect identified. This multi-level failure compensation mechanism minimizes unnecessary field defect identification and reduces maintenance workload. Meanwhile, off-grid work orders do not execute this delayed retry logic, ensuring that off-grid scenarios can be quickly closed-loop and adapting to the differentiated handling needs of different power grid business scenarios.

[0041] Optionally, the low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method further includes: after all terminal sub-tasks of the control work order in the distribution area have been processed, the work order indicators are statistically analyzed and written into the work order execution log and the work order indicators are stored. At the same time, the execution results and fault markers are reported to the scheduling side. The work order indicators include the command success rate, the number of rigid and flexible command switching and the switching time.

[0042] In this optional embodiment, after all terminal subtasks obtained from the substation control work order have been processed, including all scenarios such as success, failure due to retry exhaustion, and marking on-site troubleshooting after grid connection delay retry, the entire substation work order is statistically analyzed. The statistical work order indicators include instruction success rate, number of rigid-flexible instruction switching times, and rigid-flexible instruction switching time. Based on the success and failure records recorded throughout the entire process, the timestamp of the first issuance of flexible instructions, and the timestamp of the issuance of rigid instructions, calculations are performed for subsequent business effect evaluation and system performance statistics. On this basis, the entire process execution log of the work order and the statistical work order indicators are written to persistent storage. The logs are stored in HBase, and the statistical indicators are stored in a Hive-like data warehouse component, thereby retaining the original records of the entire process and supporting post-event troubleshooting and big data statistical analysis. At the same time, the final execution result of the entire work order, fault marking, and on-site troubleshooting marking are uniformly reported to the dispatching side source-grid-load-storage system, so that the dispatching side can obtain the final execution status of the substation group control work order. This setup allows for the aggregation of all subtask results, enabling log persistence, metric statistics, and dispatch-side result reporting, forming a complete business loop. It provides comprehensive feedback for power grid dispatch operations, facilitates power grid-side evaluation of control execution effectiveness, and supports system operation and maintenance as well as business review.

[0043] The above are merely preferred embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for executing flexible and rigid dual-mode control commands in low-voltage distributed photovoltaic systems, characterized in that, include: S1. Register the distributed photovoltaic control nodes to obtain unique node numbers, and perform segmentation mapping based on the unique node numbers and the unique identifiers of the photovoltaic terminals to obtain the control affiliation relationship between each photovoltaic terminal and the corresponding distributed photovoltaic control node; S2. The control work orders issued by the dispatching side are split into sub-tasks, and the terminal sub-tasks of the photovoltaic terminals obtained by the distributed photovoltaic control nodes are pulled according to the control attribution relationship, so that the distributed photovoltaic control nodes can read them. S3. Read a terminal subtask of the photovoltaic terminal and a preset tag on the user side corresponding to the photovoltaic terminal, and generate a control instruction through the distributed photovoltaic control node. The preset tag includes flexible availability and non-flexible availability, and generates flexible control instructions and rigid control instructions accordingly. S4. The control instruction is sent to the corresponding photovoltaic terminal through the distributed photovoltaic control node, and the execution result of the photovoltaic terminal is suspended and waited for. The control instruction generation process of a terminal subtask of another photovoltaic terminal is read. If the control instruction sent is the flexible control instruction, the first issuance timestamp is recorded. S5. When the execution result is fed back to the distributed photovoltaic control node, if the execution result is that the flexible control instruction failed to be executed, and the preset instruction switching time is not exceeded according to the first issuance timestamp, the control instruction generation process is executed to generate the rigid control instruction and issue it.

2. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in claim 1, characterized in that, The step S1, which involves segmenting and mapping photovoltaic terminals based on their unique node numbers and unique identifiers to obtain the control affiliation between each photovoltaic terminal and its corresponding distributed photovoltaic control node, specifically includes: S11. Obtain the total number of online distributed photovoltaic control nodes in real time. Based on the unique node number and the unique identifier, determine whether the following formula is true. If true, determine that the photovoltaic terminal corresponding to the unique identifier and the distributed photovoltaic control node corresponding to the unique node number have a control affiliation relationship: , Wherein, the terminal ID is the unique identifier, N is the total number of online distributed photovoltaic control nodes, and nodeId is the unique node number; S12. By traversing the unique identifier of each photovoltaic terminal based on the unique node number through the distributed photovoltaic control node, the control relationship between each photovoltaic terminal and the corresponding distributed photovoltaic control node is obtained. S13. When the total number of online distributed photovoltaic control nodes changes due to expansion or contraction, S11 is executed again.

3. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in claim 1, characterized in that, S2 specifically includes: S21. Receive the distribution area control work order issued by the dispatching side and record the work order reception timestamp. The distribution area control work order includes off-grid work orders and grid-connected work orders. The information carried by the distribution area control work order includes work order number, work order type, distribution area number, unique identifier of each photovoltaic terminal to which the distribution area belongs, flexible control strategy switch and flexible power percentage parameter. S22. The control work order of the transformer area is split, and one photovoltaic terminal corresponds to one terminal subtask. The terminal subtask is traversed through any of the distributed photovoltaic control nodes. According to the control affiliation relationship, it is determined whether the photovoltaic terminal corresponding to the terminal subtask belongs to the distributed photovoltaic control node. If yes, the terminal subtask is pulled to the node's local waiting queue. If no, the terminal subtask is discarded. S23. For the terminal subtask in the local pending queue, if it is an off-network work order and the flexible control strategy switch is off, the corresponding flexible power percentage parameter is filled with 0% by default; if it is a grid-connected work order and the flexible control strategy switch is off, the corresponding flexible power percentage parameter is filled with 100% by default. S24. For the terminal subtask in the local pending queue, read the local cache to obtain the preset tag of the user side of the photovoltaic terminal. The user side is verified by prediction test to see if it supports flexible power adjustment. If it does, the preset tag is marked as flexible available. If not, the preset tag is marked as non-flexible available.

4. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in claim 3, characterized in that, The step S4, which involves sending the control command to the corresponding photovoltaic terminal through the distributed photovoltaic control node and suspending the process to wait for the execution result from the photovoltaic terminal, specifically includes: S41. According to the control instruction, a coroutine object is generated through the distributed photovoltaic control node, wherein the coroutine object is bound to the type of the control work order of the transformer area to which the terminal subtask belongs, the unique identifier of the photovoltaic terminal, the type of the control instruction, the remaining number of retries, and the preset waiting time; S42. The control command is sent from the distributed photovoltaic control node to the corresponding photovoltaic terminal, and the corresponding coroutine object enters a suspended state to release the business thread and wait for the execution result of the photovoltaic terminal. S43. In real time, determine whether the execution result of the photovoltaic terminal corresponding to the coroutine object in the suspended state is received, and at the same time determine whether the waiting time exceeds the preset waiting time bound to the coroutine object. If the result of at least one of the two determinations is yes, wake up the coroutine object, and when the waiting time exceeds the preset waiting time bound to the coroutine object, determine that the execution result is an execution failure. S44. Real-time statistics are collected on the number of coroutine objects currently in the suspended state of the distributed photovoltaic control node. When the number exceeds the preset maximum concurrent coroutine threshold, the retrieval of the terminal subtask through the distributed photovoltaic control node is paused. When the number is lower than the preset maximum concurrent coroutine threshold, the retrieval of the terminal subtask through the distributed photovoltaic control node is resumed.

5. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in claim 4, characterized in that, The step of sending the control command to the corresponding photovoltaic terminal through the distributed photovoltaic control node in S4 specifically includes: sending the control command to the photovoltaic terminal through the distributed photovoltaic control node via message middleware and collection front-end group, wherein the message middleware sets the downlink command topic, the collection front-end group consumes the downlink command topic, and sends the control command to the photovoltaic terminal.

6. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in claim 5, characterized in that, The process of feeding back the execution result of S5 to the distributed photovoltaic control node specifically includes: the execution result is fed back from the photovoltaic terminal to the distributed photovoltaic control node via the acquisition front-end group, the message middleware, and the uplink result routing, wherein the message middleware sets the uplink result topic, the acquisition front-end group receives the uplink execution result message from the photovoltaic terminal and writes it into the uplink result topic, the uplink result routing consumes the message in the uplink result topic, extracts the unique identifier, and reuses the control attribution relationship to determine the distributed photovoltaic control node corresponding to the unique node number to which the unique identifier belongs, and forwards the execution result to the distributed photovoltaic control node.

7. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in claim 4, characterized in that, Also includes: When the execution result is fed back to the distributed photovoltaic control node, if the execution result is determined to be an execution failure, the remaining retry count bound to the coroutine object is read. If the remaining retry count is greater than 0, the remaining retry count is reduced by one and S4 is re-executed. If the remaining retry count is equal to 0 and the control instruction is the rigid control instruction, the task is marked as failed.

8. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in claim 7, characterized in that, In step S5, if the preset instruction switching time is exceeded based on the first issuance timestamp, the task is marked as ultimately failing. In S5, the step of executing the control instruction generation process to generate the rigid control instruction and then issuing it specifically includes: modifying the control instruction to the rigid control instruction, resetting the remaining retry count bound to the corresponding coroutine object, and then issuing the rigid control instruction to the corresponding photovoltaic terminal.

9. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in claim 8, characterized in that, Also includes: If the type of the control work order of the distribution area to which the terminal subtask belongs is the grid connection work order, and the task is marked as failed, a preset delay timer is started. After the preset delay timer expires, the control instruction of the terminal subtask is reissued. If the task is marked as failed again, the local machine is marked as having a fault.

10. The low-voltage distributed photovoltaic flexible and rigid dual-mode control command scheduling execution method as described in any one of claims 1 to 9, characterized in that, Also includes: After all terminal subtasks of the control work order in the distribution area have been processed, the work order indicators are statistically analyzed and written into the work order execution log and the work order indicators to storage. At the same time, the execution results and fault markers are reported to the scheduling side. The work order indicators include instruction success rate, number of rigid-flexible instruction switching and switching time.

Citation Information

Patent Citations

  • Dynamic optimization regulation and control method and device for distributed photovoltaic access power distribution area

    CN119231468A