A Photovoltaic Charging and Discharging Strategy Optimization Method Based on Energy Storage State Profile

By dividing the task event intervals and recursively calculating the energy storage state in the photovoltaic charging and discharging strategy, an energy storage state profile is formed. This allows for reverse tracing of the configuration of previous charging tasks, solving the problems of limited photovoltaic charging resources and data conflicts, and achieving the consistency of the execution of the target charging and discharging strategy and the conservation of task volume.

CN123121799APending Publication Date: 2026-11-17ZHEJIANG JIASHUO SMART ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611416873.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing photovoltaic charging and discharging strategies are unable to reflect the time-varying changes in charging power margin and energy storage capacity, resulting in the inability to continuously undertake target photovoltaic charging sub-tasks. Furthermore, resource duplication and task imbalance occur during periods of missing data and when photovoltaic allocation data conflicts.

Method used

By organizing the photovoltaic and energy storage operation data and existing charging and discharging tasks according to the strategy time period, dividing the task event intervals, recursively estimating the energy storage energy status, determining the allocable charging amount in the task event interval, forming an energy storage status profile, and tracing back the configuration of previous charging tasks to the selectable positions to form a target charging and discharging strategy, the final strategy is determined after execution constraint verification.

Benefits of technology

It reduces discrepancies in data boundary inconsistencies and duplicate task counts, identifies resource constraints, avoids redundant resource allocation and task imbalance, and ensures consistency of execution constraints and conservation of task volume in the target charging and discharging strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123121799A_ABST
    Figure CN123121799A_ABST
Patent Text Reader

Abstract

This invention discloses a photovoltaic charging and discharging strategy optimization method based on energy storage status profiles, which addresses the problem of limited charging resources and difficulty in identifying the period when photovoltaic power generation is in a given timeframe. The method unifies photovoltaic and energy storage operation data, existing charging and discharging tasks, and energy storage constraint parameters to a single strategy timeframe, divides task event intervals, and recursively calculates the energy storage status. This determines the allocatable charging amount within each task event interval and forms an energy storage status profile. The target photovoltaic charging sub-task quantity is formed based on the positive difference between photovoltaic power generation and non-energy storage consumption and allocated photovoltaic power. This target is matched with the allocatable charging amount within the same task event interval to determine the continuous gap and the first cutoff position for each timeframe. A reverse tracing process is used to form a prior occupancy chain, configuring prior charging tasks to selectable task positions and replaying them completely. Migrating matching positions where the target photovoltaic charging task quantity coverage increases and the actual matching amount completed in each strategy timeframe does not decrease are retained. The target charging and discharging strategy is determined after execution constraint verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of photovoltaic and energy storage scheduling technology, and more specifically, to a method for optimizing photovoltaic charging and discharging strategies based on energy storage state profiles. Background Technology

[0002] Photovoltaic-storage (PV-SES) operating systems typically formulate charging and discharging strategies based on PV power generation, non-storage load power, storage unit constraints, and existing charging and discharging task plans. Within the continuous optimization range, PV power generation, non-storage power consumption, allocated PV power, and existing charging and discharging tasks are distributed across different strategy time periods. Existing charging and discharging tasks may also span strategy time periods or overlap within the same task event interval. Current processing methods mostly rely on summarizing and judging based on the energy storage status, the upper limit of energy storage capacity, or the total number of charging tasks within the entire optimization range, and then allocate surplus PV power to the storage units.

[0003] The above methods fail to reflect the temporal changes in charging power margin and energy storage capacity margin as the task execution location changes. When existing charging tasks occupy charging power within a specific task event interval or prematurely occupy energy storage space, even if the energy storage unit still has an upper limit of energy storage margin throughout the entire optimization range, the target photovoltaic charging sub-task may still be unable to continuously accept the photovoltaic power generation period. Moving existing charging tasks solely based on total coverage may also reduce the actual matching volume for other strategy periods; the lack of unified handling for data missing periods, photovoltaic allocation data conflicts, and violations of task replay constraints can also lead to redundant resource allocation, task imbalance, or unexecutable output strategies. Therefore, it is necessary to address how to identify the temporal gaps of the target photovoltaic charging sub-task and determine the actually executable charging and discharging strategies while maintaining existing charging and discharging task constraints and task volume conservation. Summary of the Invention

[0004] To overcome the aforementioned deficiencies in the prior art, embodiments of the present invention provide a photovoltaic charging and discharging strategy optimization method based on energy storage state profiles, which addresses the problem of limited charging resources and difficulty in identifying the period during which photovoltaic power generation occurs. This method unifies photovoltaic and energy storage operation data, existing charging and discharging tasks, and energy storage constraint parameters to a single strategy period, divides task event intervals, and recursively calculates the energy storage state. It then determines the allocable charging capacity within each task event interval and forms an energy storage state profile. Based on the positive difference between photovoltaic power generation and non-energy storage power consumption and allocated photovoltaic power, a target photovoltaic charging sub-task quantity is formed. This is matched with the allocable charging capacity within the same task event interval to determine the continuous gap and the first cutoff position for each period. A reverse tracing process is used to form a prior occupancy chain, configuring prior charging tasks to selectable task positions and replaying them completely. Migrating matching positions where the target photovoltaic charging task quantity coverage increases and the actual completed matching quantity in each strategy period does not decrease are retained. After verifying the execution constraints, the target charging and discharging strategy is determined to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: S1. Organize the photovoltaic and energy storage operation data and existing charging and discharging tasks according to the strategy time period, divide the task event interval, recursively calculate the energy storage status, determine the allocable charging amount for the task event interval based on the charging power margin and the upper limit margin of the energy storage, accumulate the allocable charging amount for the task event interval within the same strategy time period as the allocable charging amount for the time period, and form an energy storage status profile based on the allocable charging amount for the time period of adjacent strategy time periods. S2, the positive difference between the photovoltaic power generation during the strategy period and the non-energy storage electricity consumption and the allocated photovoltaic power is determined as the target photovoltaic charging electronic task quantity; S3, match the target photovoltaic charging task quantity with the allocable charging quantity of the task event interval in the same strategy period, determine the continuous acceptance gap quantity of the period, and determine the earliest unallocated task event interval and the restriction position corresponding to the first positive value of the continuous acceptance gap quantity of the period as the first cutoff position; reverse trace the prior charging tasks that occupy the first cutoff position to form a prior occupancy chain, configure the prior charging tasks to the optional task positions and replay them completely, and only retain the migration matching positions where the coverage result of the target photovoltaic charging task quantity increases and the actual completed matching quantity of each strategy period does not decrease. S4, based on the migration matching location, reconfigure the prior charging task, re-execute the matching of the target photovoltaic charging sub-task quantity, and form a charging and discharging strategy to be verified; S5, fully replay the charging and discharging strategy to be verified and check the execution constraints. The charging and discharging strategy to be verified that passes the execution constraint check and has the largest target photovoltaic charging task coverage result is determined as the target charging and discharging strategy.

[0006] Furthermore, after multiplying the upper limit of charging power by the duration of the task event interval and subtracting the cumulative charging task amount, the larger of the result and zero is taken to obtain the receiveable power corresponding to the charging power margin. Subtracting the energy states of each energy storage from the end of the task event interval to the end of the optimization range from the upper limit of the energy storage, the minimum difference is selected, and the larger value between the minimum difference and zero is taken and converted according to the charging efficiency to obtain the receiveable electricity corresponding to the upper limit of the energy storage. The smaller of the two acceptable power values ​​is taken as the allocable charging amount for the task event interval, and the subsequent energy storage status is updated according to the charging efficiency.

[0007] Furthermore, the strategy period during which the earliest positive value of the gap volume is continuously absorbed during the positioning period; For the energy storage units participating in the matching, when the charging power margin reaches zero first, the corresponding task event interval is determined as the power limit position. When the energy storage upper limit margin reaches zero first, the energy storage energy state position that first obtains the minimum energy storage upper limit margin is determined as the energy limit state position. When both reach zero at the same time, the two limit positions are recorded. The strategy period, energy storage unit, earliest unallocated task event interval, restriction location, and restriction type are recorded as the first cutoff location.

[0008] Furthermore, the first cutoff position includes the energy-limited state position, and existing charging tasks are removed and replayed one by one from the nearest to the energy-limited state position; If at least one of the following occurs after removal: the energy storage state decreases or the available charging amount in the task event interval increases, the task will be included in the prior occupancy chain. If neither of the two occurs, the task will not be included in the prior occupancy chain and will be restored to its original position. The entire task volume of the previously occupied in-chain tasks will be configured to the optional task position and replayed in its entirety; If the target photovoltaic charging task coverage increases and the actual completed matching amount in each strategy period does not decrease, the optional task position is retained; otherwise, the original task position is restored.

[0009] Furthermore, when the charging task adopts a constant task power, the policy time period boundary, the task event interval boundary, and the executable start time in the task plan table are merged into a candidate start time set. Select the task start time from this set, keep the task quantity and duration unchanged, and determine the task end time; If the start and end times of a task are within the allowed execution period, the energy storage unit being executed is an adapted energy storage unit, and the task power and cumulative charge / discharge power of each task event interval do not exceed the power limit, the corresponding position will be determined as an optional task position. If any condition is not met, the corresponding position will be excluded.

[0010] Furthermore, when the charging task has a task power curve, the policy time period boundary, task event interval boundary, and executable start time in the task plan table are merged into a candidate start time set, and a candidate start time is selected from the candidate start time set; the time offset of each power value relative to the original task start time is retained, the task power curve is shifted to the candidate start time, and the power change time and task end time are determined according to the time offset. If the candidate start time to task end time is within the allowed execution period, the execution energy storage unit is an adaptive energy storage unit, and the task power and cumulative charge / discharge power of each task event interval redefined according to the power change time do not exceed the power limit, the corresponding position will be determined as an optional task position. If any condition is not met, the corresponding position will be excluded.

[0011] Furthermore, when a sample value is missing, the cumulative electricity consumption of the metering interval to which the sampling time belongs is used to supplement the sample value; When the completion is completed, the continuous range is defined as the continuous effective optimization segment, and the target photovoltaic charging electronic task and charging and discharging strategy are formed within this segment. When the missing data is not completed, the corresponding strategy period is recorded as the data missing period. The continuous effective optimization segment is divided by the data missing period. Existing charging and discharging tasks that cross the data missing period are split into tasks to be supplemented according to the boundary. Before the missing data is supplemented and the initial energy storage state is determined, no charging and discharging strategy that crosses the data missing period is formed.

[0012] Furthermore, after calculating the allocable charging amount for the task event intervals of each strategy period, the allocable charging amount for adjacent strategy periods is compared. A depletion state change relationship is formed when the value changes from positive to zero, and a recovery state change relationship is formed when the value changes from zero to positive. Each state change relationship record includes the strategy period, energy storage unit, allocable charging amount before the change, allocable charging amount after the change, change direction, restriction type, occupied task identifier, and task occurrence sequence. All state change relationships are arranged according to the strategy period, energy storage unit, and task occurrence sequence to form an energy storage state profile.

[0013] Furthermore, a cutoff position record is formed based on the first cutoff position. The cutoff position record includes the gap strategy period, energy storage unit, the earliest unallocated task event interval, power limit position, energy limit status position, and limit type. If only the power limiting position exists, the energy limiting position is recorded as empty; if only the energy limiting position exists, the power limiting position is recorded as empty; if both exist simultaneously, they are recorded separately. When multiple energy storage units have exhausted the available charging capacity within the task event interval, the limit positions of each energy storage unit are saved according to the matching order.

[0014] Furthermore, the execution constraint check forms a set of retention policies; When the set of retention strategies contains at least one retention strategy, they are arranged in order of the target photovoltaic charging task coverage results from largest to smallest, the number of prior charging tasks to be reconfigured from smallest to largest, and the number of task movement strategy time periods from smallest to largest. The retention strategy ranked first is determined as the target charging and discharging strategy. When the set of retained strategies is empty, record that there is no executable target charging and discharging strategy, output the first constraint violation location, constraint type, constraint boundary value and actual calculated value of the charging and discharging strategy to be verified, and retain the existing charging and discharging task plan that was in effect before the optimization process started.

[0015] The technical effects and advantages of the photovoltaic charging and discharging strategy optimization method based on energy storage state profile of this invention are as follows: By unifying the strategy time period, clock reference, and energy quantity caliber on the energy storage AC interface side, and by performing task quantity conservation decomposition on existing charging and discharging tasks spanning the strategy time period, deviations caused by inconsistencies in the boundaries of different data sources, duplicate inclusion of the same task quantity, and mixing of planned remaining quantity and actual completed quantity can be reduced. Time periods with missing data and photovoltaic allocation data conflicts are divided into continuous and effective optimization segments. Data that has not been supplemented is not included in the charging and discharging strategy calculation, thus avoiding the participation of missing data in resource allocation.

[0016] The allocable charging capacity within a task event interval is constrained by both the charging power margin and the upper limit of energy storage capacity within the optimization range. It can identify resource constraints in task event intervals where there is still a surplus in total energy storage capacity but the photovoltaic power generation period cannot be charged. The first cutoff position and the prior occupancy chain limit the gap to the existing charging task that actually generates occupancy, reducing the participation of irrelevant tasks in the reconfiguration. The migration matching position is retained after complete playback and verification of the matching amount for each strategy period, avoiding the masking of new gaps in other strategy periods by increasing the total coverage.

[0017] The target charging and discharging strategy is determined from the retained strategies that have been verified by executing constraints, based on the target photovoltaic charging task coverage results. If no executable strategy exists, the existing charging and discharging task plan is maintained and the first constraint violation position is recorded, so that the output results have definite constraint boundaries and consistent task volume. Attached Figure Description

[0018] Figure 1 Overall flowchart of the photovoltaic charging and discharging strategy optimization method based on energy storage state profile; Figure 2 Flowchart for forming an energy storage status profile and determining the allocable charging capacity; Figure 3 Flowchart for matching the target photovoltaic task with the first cutoff position. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Please see Figure 1 This invention provides a method for optimizing photovoltaic charging and discharging strategies based on energy storage state profiles, including: S1. Organize the photovoltaic and energy storage operation data and existing charging and discharging tasks according to the strategy time period, divide the task event interval, recursively calculate the energy storage status, determine the allocable charging amount for the task event interval based on the charging power margin and the upper limit margin of the energy storage, accumulate the allocable charging amount for the task event interval within the same strategy time period as the allocable charging amount for the time period, and form an energy storage status profile based on the allocable charging amount for the time period of adjacent strategy time periods. S2, the positive difference between the photovoltaic power generation during the strategy period and the non-energy storage electricity consumption and the allocated photovoltaic power is determined as the target photovoltaic charging electronic task quantity; S3, match the target photovoltaic charging task quantity with the allocable charging quantity of the task event interval in the same strategy period, determine the continuous acceptance gap quantity of the period, and determine the earliest unallocated task event interval and the restriction position corresponding to the first positive value of the continuous acceptance gap quantity of the period as the first cutoff position; reverse trace the prior charging tasks that occupy the first cutoff position to form a prior occupancy chain, configure the prior charging tasks to the optional task positions and replay them completely, and only retain the migration matching positions where the coverage result of the target photovoltaic charging task quantity increases and the actual completed matching quantity of each strategy period does not decrease. S4, based on the migration matching location, reconfigure the prior charging task, re-execute the matching of the target photovoltaic charging sub-task quantity, and form a charging and discharging strategy to be verified; S5, fully replay the charging and discharging strategy to be verified and check the execution constraints. The charging and discharging strategy to be verified that passes the execution constraint check and has the largest target photovoltaic charging task coverage result is determined as the target charging and discharging strategy.

[0021] This invention uses photovoltaic power generation and non-energy storage load power obtained from an energy management platform, energy storage status and energy storage constraint parameters obtained from an energy storage management controller, and existing charging and discharging tasks obtained from a task schedule as processing objects. First, under a unified clock reference, a strategy time period, task unit, and task event interval are formed. Then, through task playback, an energy storage status trajectory, allocable charging amount for task event intervals, allocable charging amount for time periods, and energy storage status profile are formed. Next, according to the strategy time period, the photovoltaic power generation, non-energy storage electricity consumption, and allocated photovoltaic electricity are verified to form the target photovoltaic charging sub-task quantity and the target photovoltaic surplus time period. Subsequently, the target photovoltaic charging sub-task quantity is matched with the concurrent charging resources. The first cutoff position is determined based on the continuous acceptance gap of the time period. The prior occupancy chain is formed by reverse tracing, and the migration matching position of the prior charging tasks is verified item by item. After completing the task reconfiguration and complete playback, the execution constraints of energy storage status, charging and discharging power, prohibition of simultaneous charging and discharging, allowed execution time period, adapted energy storage unit, and task quantity conservation are checked, and the target charging and discharging strategy is determined from the retained charging and discharging strategies.

[0022] The specific implementation method of step S1 is as follows: Step S1 is used to unify the continuously collected photovoltaic and energy storage operation data, existing charging and discharging task plans, and energy storage constraint parameters into the same strategy time period and clock reference, forming task units and task event intervals with conserved task quantity. The energy storage energy state is deduced according to the task event interval, and the allocable charging amount, allocable charging amount and energy storage state profile of the task event interval are determined. This provides time-by-time photovoltaic and energy storage data for S2 and charging resource records that can be located to specific task event intervals for S3.

[0023] S101, Time-based processing of photovoltaic and energy storage operation data and decomposition of existing charging and discharging tasks: The system obtains photovoltaic power generation and non-storage load power with the acquisition time from the energy management platform. It also obtains the initial energy storage status, actual charging power, actual discharging power, charging efficiency, discharging efficiency, upper limit of charging power, upper limit of discharging power, upper limit of energy storage capacity, and lower limit of energy storage capacity for each energy storage unit from the energy storage management controller. Furthermore, it obtains the task identifier, task type, task quantity, planned start time, planned end time, allowed execution period, compatible energy storage unit, original task location, and task occurrence sequence for each existing charging and discharging task from the task schedule table. The system uses the start time of the optimization range as the start time of the first strategy period. Strategy periods are continuously divided according to the pre-configured scheduling time granularity in the energy management platform. The portion of the optimization range that is less than one complete scheduling time granularity at the end forms a separate final strategy period. All data sources use a unified clock reference, and the timestamp accuracy reaches the minimum time granularity used for task event interval division. The initial state of charge (SOC) of the energy storage is directly provided by the energy storage management controller (ESC). When the SOC provided by the ESC is based on the allowable operating energy range between the lower and upper limits of the energy storage capacity, the initial SOC for the optimization range is obtained by multiplying the SOC by the difference between the upper and lower limits of the energy storage capacity, and then adding the lower limit of the energy storage capacity. The charging efficiency, discharging efficiency, upper limit of charging power, upper limit of discharging power, upper limit of energy storage capacity, and lower limit of energy storage capacity use the effective configuration values ​​in the ESC at the start of the optimization range and remain unchanged during one optimization process.

[0024] The amount of charging and discharging tasks executed before the start time of the optimization range is calculated using the actual charging power and actual discharging power recorded by the energy storage management controller. For existing charging and discharging tasks currently in progress that cross the start time of the optimization range, the remaining task amount is obtained by subtracting the actual task amount completed before the start time of the optimization range from the original task amount. The task event interval from the start time of the optimization range to the present is replayed using the remaining task amount and task power curve in the task plan table. The actual completed amount and the planned remaining amount are recorded separately, thus ensuring that the same charging and discharging task amount is counted once in the energy storage state recursion. The charging and discharging amounts used in the energy storage state recursion are both based on the energy storage AC interface side power.

[0025] Photovoltaic power generation, non-energy storage load power, actual charging power, and actual discharging power are compiled according to a unified strategy time period start and end time. For continuous power data within a strategy time period, the average power of each sampling interval is multiplied by the duration of the sampling interval, and then the calculation results within the same strategy time period are accumulated to obtain photovoltaic power generation, non-energy storage power consumption, actual charging power, and actual discharging power. When a sampling interval crosses the boundary of a strategy time period, the power is calculated separately according to the overlapping duration of the sampling interval and each strategy time period. Power is expressed in kilowatts, duration in hours, and the resulting power is expressed in kilowatt-hours. When sampling records are missing, the cumulative power records of the same metering point are used first to fill in the gaps; if the cumulative power records of the intervals are still missing, the corresponding strategy time period is marked as a data missing period, and the corresponding strategy time period is stopped from entering the candidate charging and discharging strategy calculation.

[0026] The data missing period serves as the boundary of the continuous effective optimization segment. Data before and after the data missing period constitute independent continuous effective optimization segments. The energy storage state at the start of each continuous effective optimization segment is the energy storage state recorded by the energy storage management controller at the start of the segment. When only the state of charge ratio is recorded at the start of the segment, the energy storage state is determined according to the conversion relationship described in the first natural paragraph of S101. When both the energy storage state and the state of charge ratio are missing at the start of the segment, the corresponding continuous effective optimization segment is recorded as a segment to be supplemented. The target photovoltaic surplus period, energy storage state trajectory, and candidate charge / discharge strategies are all formed within the same continuous effective optimization segment. Existing charge / discharge tasks that cross the data missing period are split according to the boundary of the data missing period, and the crossed portion is recorded as a task to be supplemented. After completing the supplementation of missing data and the initial energy storage state of the segment and re-executing the strategy time-based processing, the continuous range including the data missing period is entered into the candidate charge / discharge strategy calculation.

[0027] When an existing charging / discharging task crosses a policy time period boundary, the existing charging / discharging task is split at each policy time period boundary. For existing charging / discharging tasks with task power curves, the task split amount is determined based on the power integral result of the overlapping portion of the task power curve and each policy time period; for existing charging / discharging tasks using constant task power, the task split amount is determined based on the product of the constant task power and the overlapping duration. The cumulative value of all split task amounts remains the same as the task amount before splitting.

[0028] Each splitting result is recorded as a task unit. The task unit continues to use the original task identifier and adds a task unit sequence number. It also records the task type, the amount of split task, the allowed execution period, the adapted energy storage unit, the original task location, the start time, the end time, and the order in which the task occurs. S101 outputs the photovoltaic and energy storage operation data and task unit records organized according to the strategy period, providing a unified time stamp for S102 to divide the task event intervals.

[0029] S102, Task event interval division and energy storage state deduction: The task units formed by S101 may occur sequentially within the same strategy time period, or their execution times may overlap. The start and end times, the times when the task power curve changes, the power sampling interval boundaries, and the strategy time period boundaries of all task units within each strategy time period are merged. After removing duplicate times, they are arranged chronologically, and the time range between two adjacent times is defined as a task event interval. Within each task event interval, the set of task units participating in the execution and the power values ​​of each task unit remain unchanged, thus enabling the verification of the cumulative charge / discharge power and energy storage changes of the same energy storage unit according to the task event interval.

[0030] Regarding the first For each energy storage unit, the cumulative charging and discharging amounts within each task event interval are determined according to the time sequence of the task event intervals. When a task unit has a power curve, the power value of the overlapping portion of the power curve and the task event interval is integrated over the duration of the sampling interval; when a task unit uses constant power, the constant power is multiplied by the duration of the task event interval. The calculated amounts of all charging task units for the same energy storage unit within the same task event interval are accumulated. The calculated charge of all discharge task units is accumulated as follows: . and All figures represent the electrical energy at the AC interface side of the energy storage system. Within the first strategic period The energy storage state after the end of each task event interval is denoted as: The energy storage state at the start of the task event interval is denoted as Charging efficiency is denoted as The discharge efficiency is denoted as The energy storage state is calculated according to the recursive formula for the energy storage state immediately following this paragraph: The energy storage state at the start of the first task event interval of the first strategy period adopts the initial energy storage state of the optimization range. The energy storage state at the end of a task event interval is used as the energy storage state at the start of the next task event interval of the same strategy period; the energy storage state at the end of the last task event interval of a strategy period is used as the energy storage state at the start of the first task event interval of the next strategy period. , and All parameters are in kilowatt-hours, and the charging and discharging efficiencies are dimensionless parameters that are greater than zero and not greater than 1.

[0031] For each completed task event interval, the energy storage state is recursively calculated, and constraint checks are performed sequentially. First, it is checked whether the energy storage state lies between the lower and upper limits of the energy storage capacity. Second, the cumulative charging task quantity is compared with the product of the upper limit of charging power and the duration of the task event interval, and the cumulative discharging task quantity is also compared with the product of the upper limit of discharging power and the duration of the task event interval. If both cumulative charging and discharging tasks exist simultaneously within the same task event interval, a simultaneous charging / discharging constraint violation is recorded. When a constraint violation occurs, the actual recursively calculated energy storage state is retained, and the energy storage unit identifier, strategy period, task event interval, participating task unit, constraint type, actual calculated value, and constraint boundary value are recorded. S102 ultimately forms a continuously arranged energy storage state trajectory for each task event interval.

[0032] S103, Determination of available charging capacity for different time periods and formation of energy storage status profile: like Figure 2 As shown, the energy storage state trajectory formed in S102 reflects the occupancy of charging power and energy storage space by existing charging and discharging tasks. For each energy storage unit and each strategy period, the corresponding energy storage state trajectory is copied as the allocatable charging amount calculation trajectory, and then the newly accepted charging amount is calculated according to the time sequence of task event intervals within the strategy period.

[0033] Regarding the first The energy storage unit in the first The first strategy period within the [number]th time period For each task event interval, the upper limit of charging power is multiplied by the duration of the task event interval, and then the cumulative amount of charging tasks already scheduled within the task event interval is subtracted. The positive value obtained is determined as the acceptable amount of electricity corresponding to the charging power margin; if the result is zero or negative, the acceptable amount of electricity is recorded as zero. When there is a discharging task in the task event interval, the acceptable amount of electricity is recorded as zero in accordance with the constraint that simultaneous charging and discharging is prohibited.

[0034] From the Starting from the end of each task event interval, all energy storage states are sequentially read up to the end of the optimization range. Each energy storage state is subtracted from the upper limit of energy storage, and the minimum difference is selected. When the minimum difference is positive, it is divided by the charging efficiency to obtain the acceptable charging amount corresponding to the upper limit of energy storage. When the minimum difference is zero or negative, the acceptable charging amount corresponding to the upper limit of energy storage is recorded as zero. The smaller value between the acceptable charging amount corresponding to the charging power margin and the acceptable charging amount corresponding to the upper limit of energy storage is determined as the allocable charging amount for the task event interval. .

[0035] Each one ,Will The product of charging efficiency increases to the first The total energy storage status from the end of the first task event interval to the end of the optimization range is calculated, and then the allocable charging amount for the next task event interval within the same strategy period is calculated. This completes the first... After calculating the intervals of all task events within each strategy period, all The cumulative number is the The energy storage unit in the first Allocable charging amount per strategy period And save each in chronological order The corresponding task event interval identifier, start time, end time, and allocable charging amount. When calculating the allocable charging amount for the next strategy period, the energy storage state trajectory formed in S102 is copied again as the calculation trajectory, so that each... This indicates the amount of electricity that can be received when a new charge is added separately during the corresponding strategy period; when S3 actually matches the target photovoltaic charging sub-task, it updates the energy storage status sequentially according to the time order to prevent the same energy storage space from being repeatedly allocated.

[0036] For example, an energy storage unit has a maximum energy storage capacity of 100 kWh, a charging efficiency of 0.90, and a maximum charging power of 40 kW. A 1-hour task period has already scheduled 12 kWh of charging, leaving a chargeable capacity of 28 kWh. From the end of the task period to the end of the optimization range, the highest energy storage state is 91 kWh, and the minimum energy storage capacity is 9 kWh. Dividing 9 kWh by 0.90 yields a chargeable capacity of 10 kWh corresponding to the energy storage capacity. Since 10 kWh is less than 28 kWh, the allocable chargeable capacity for the task period is determined to be 10 kWh. Then, multiplying 10 kWh by 0.90 (resulting in 9 kWh) adds this to all energy storage states from the corresponding position onwards, updating the highest energy storage state to 100 kWh, before continuing to verify the next task period.

[0037] After calculating the allocable charging capacity for all time periods, the allocable charging capacity of adjacent policy time periods is compared according to the policy time period order. When the allocable charging capacity changes from a positive value to zero, the depletion state change relationship is recorded; when it changes from zero to a positive value, the recovery state change relationship is recorded. Each state change relationship records the policy time period, energy storage unit, allocable charging capacity before the change, allocable charging capacity after the change, change direction, and restriction type. When the charging power margin reaches zero, all task units occupying charging power within the corresponding task event interval are temporarily canceled one by one according to the order of task occurrence, and the allocable charging capacity of the task event interval is recalculated; task units whose allocable charging capacity increases after task cancellation are recorded as charging power occupancy tasks. After each task verification is completed, the original task position and energy storage energy state trajectory before cancellation of the corresponding task unit are restored. When the energy storage capacity reaches zero, the earliest energy storage state position that achieved the minimum energy storage capacity is recorded as the energy limitation state position. Charging tasks executed before the energy limitation state position are temporarily cancelled one by one, from closest to furthest from the energy limitation state position. Task units whose minimum energy storage capacity increases after cancellation are recorded as energy storage occupancy tasks. After each task is verified, the original task position and the energy storage state trajectory before cancellation are restored for the corresponding task unit. When multiple tasks jointly cause occupancy, all occupancy task identifiers and their order of occurrence are retained in the same state change relationship. All state change relationships are arranged according to the strategy period, energy storage unit, and task occurrence order, forming an energy storage state profile.

[0038] After S1 processing is completed, the photovoltaic and energy storage operation data have been unified into continuous effective optimization segments and strategy time periods. The actual completed amount and the planned remaining amount have been recorded separately. Existing charging and discharging tasks have been converted into task units with task quantity conservation and reservation of scheduling boundaries. The energy storage energy status trajectory, the allocable charging amount in the task event interval, the allocable charging amount in the time period, and the energy storage status profile jointly provide S2 with time-by-time photovoltaic and energy storage data in the same continuous effective optimization segment, and provide S3 with the basis for task playback and the basis for resource constraint positioning.

[0039] The specific implementation method of step S2 is as follows: S1 has already generated photovoltaic and energy storage operation data organized according to continuous effective optimization segments and strategy time periods, and delineated the time periods with missing data; however, S3 needs to receive charging sub-tasks that correspond one by one to the actual photovoltaic power generation time periods, and S2 needs to verify the allocated photovoltaic power within each continuous effective optimization segment, calculate the target photovoltaic charging sub-task quantity, and connect adjacent strategy time periods where the target photovoltaic charging sub-task quantity is continuously greater than zero.

[0040] S201, Determine the target photovoltaic charging electronic task volume for each strategy period: The photovoltaic and energy storage operation data generated by S1 has made photovoltaic power generation and non-energy storage power consumption have the same strategic time period boundaries; however, fixed energy storage charging tasks, fixed external transmission tasks and other predetermined photovoltaic allocation tasks will occupy part of the photovoltaic power generation. It is necessary to first unify the statistical scope of the allocated photovoltaic power and then calculate the surplus photovoltaic power that can be further allocated to the energy storage unit.

[0041] According to the strategy time period index, the first [number]th ... Photovoltaic power generation during each strategic period Non-energy storage electricity consumption Photovoltaic power generation is derived from the photovoltaic grid-connected metering point or the output metering records of the photovoltaic inverter, while non-energy storage electricity consumption is derived from the non-energy storage load metering records. Both are measured in kilowatt-hours and correspond to the same strategy time period.

[0042] Extract the photovoltaic power obtained from fixed energy storage charging tasks, the photovoltaic power occupied by fixed power transmission tasks, and other pre-allocated photovoltaic power not included in non-energy storage power consumption from the established task plan and photovoltaic power allocation records. Accumulate these three types of power within the same strategy period to obtain the [number missing]. Allocated photovoltaic power for each strategic period When stationary energy storage charging tasks utilize both photovoltaic (PV) and grid power, only the portion marked as a PV source in the energy allocation record is extracted; stationary power transmission tasks are counted based on PV power transmission metering values; amounts already included in non-energy storage power consumption are also recorded. The production load, building load, and non-adjustable load are maintained at In order to avoid being counted again .

[0043] After unifying the statistical boundaries, check them one by one. , and The strategy period includes the start and end times, unit of measurement, task identifier, and photovoltaic source marker. Only when two allocation records have the same record identifier, or when the task identifier, strategy period, executing energy storage unit, photovoltaic source, start time, end time, and recorded electricity are all the same, will one of them be identified as a duplicate record. Segmented metering records for the same task formed in different time intervals are retained separately. When the photovoltaic source electricity recorded by different data sources is inconsistent, the value is determined sequentially by the photovoltaic transmission or branch settlement metering value, the cumulative charging electricity of the energy storage management controller, and the task plan record. If, after adopting the preferred data source, the allocated photovoltaic electricity still exceeds the photovoltaic power generation of the same period, the corresponding strategy period is recorded as a photovoltaic allocation data conflict period, and the original value, adoption order, and conflict difference of each data source are recorded. The photovoltaic allocation data conflict period is divided into continuous effective optimization segments according to the handling method for data missing periods in S101. After verification by metering records, the target photovoltaic charging electronic task quantity is calculated.

[0044] No. The target photovoltaic charging sub-task volume for each strategy period is denoted as . In the calculation, the photovoltaic power generation is used as a basis. Non-energy storage electricity consumption is deducted in order. and allocated photovoltaic power When the difference is greater than zero, the positive difference is recorded as... When the difference is equal to or less than zero, The record is zero. This forms a sequence of target photovoltaic charging sub-tasks arranged continuously according to the strategy time period, and for each... The calculation source for photovoltaic power generation, non-energy storage electricity consumption, and allocated photovoltaic power is retained.

[0045] S202, Connect the target photovoltaic surplus period and establish the target photovoltaic charging electronic task: The target photovoltaic charging task sequence already represents the photovoltaic power available for charging new energy storage within each strategy period; however, S3 needs to identify the time range in which surplus photovoltaic power occurs continuously, so adjacent strategy periods in which the target photovoltaic charging task is continuously greater than zero are connected in the order of strategy periods.

[0046] Starting from the earliest strategy time period within the optimization range, read sequentially. First read When the value is greater than zero, the corresponding strategy period is recorded as the starting strategy period of a target photovoltaic surplus period. If the target photovoltaic charging task volume of the next adjacent strategy period continues to be greater than zero, the next adjacent strategy period is added to the same target photovoltaic surplus period. (Read) When the value equals zero, the last positive value strategy period before the zero-value strategy period is recorded as the end strategy period of the current target photovoltaic surplus period. When a positive value appears again after the zero-value strategy period, the next target photovoltaic surplus period is established with the new positive value strategy period.

[0047] Each target photovoltaic surplus period is the largest continuous segment composed of consecutive strategy periods. The strategy periods within each target photovoltaic surplus period... All values ​​are greater than zero. The target photovoltaic surplus period is adjacent to the optimization range or the zero-value strategy period on both sides. Multiple target photovoltaic surplus periods are arranged from earliest to latest according to the starting strategy period, forming a target photovoltaic surplus period sequence.

[0048] For each A target photovoltaic (PV) charging sub-task is established during a strategy period with a value greater than zero. The task record includes the target PV charging sub-task identifier and the target PV charging sub-task quantity. The system includes the photovoltaic power generation period, the target photovoltaic surplus period, and the allowed matching period. The allowed matching period only records the photovoltaic power generation period, allowing the target photovoltaic charging sub-task to call the available charging amount of the same strategy period in S3.

[0049] In one embodiment, the photovoltaic power generation for four consecutive strategy periods is 120 kWh, 100 kWh, 90 kWh, and 110 kWh, respectively; the non-energy storage power consumption is 70 kWh, 60 kWh, 80 kWh, and 70 kWh, respectively; and the allocated photovoltaic power is 20 kWh, 10 kWh, 10 kWh, and 10 kWh, respectively. After deducting each period, the target photovoltaic charging task amounts for the four strategy periods are 30 kWh, 30 kWh, 0 kWh, and 30 kWh, respectively. The first two strategy periods are connected to form the first target photovoltaic surplus period; the third strategy period ends the first target photovoltaic surplus period; and the fourth strategy period establishes the second target photovoltaic surplus period. The three positive values ​​form three target photovoltaic charging tasks, each retaining its original strategy period marker.

[0050] S203, accumulate the target photovoltaic charging task volume and generate S3 call data: The target photovoltaic surplus time series has preserved the continuous distribution of photovoltaic surplus electricity; however, S3 needs to call up the target photovoltaic charging task volume within the entire optimization range, and also needs to read the target photovoltaic charging sub-task volume time by time. Therefore, the accumulation and verification are completed according to two levels: target photovoltaic surplus time and strategy time.

[0051] For each target photovoltaic surplus period, the task volume of each target photovoltaic charging sub-task is accumulated according to the strategy period order to obtain the total photovoltaic charging demand within the corresponding target photovoltaic surplus period. After accumulating all target photovoltaic surplus periods, the target photovoltaic strategy periods are then aggregated. The target photovoltaic charging task quantity is obtained by adding up all the target photovoltaic charging sub-task quantities within the specified time. In one embodiment, the target photovoltaic charging task is 90 kWh, with the first target photovoltaic surplus period containing 60 kWh and the second target photovoltaic surplus period containing 30 kWh.

[0052] After accumulation, verify whether the target photovoltaic charging task amount equals the sum of all target photovoltaic charging sub-task amounts, verify whether the strategy time periods within each target photovoltaic surplus time period are continuous, and verify whether each target photovoltaic charging sub-task has a unique photovoltaic power generation time period and a unique allowed matching time period. S2 maintains each S3 will then calculate the complete value. Matching the available charging capacity within the same strategy period with the available charging capacity during that period ensures that the shortfall caused by insufficient energy storage resources can be accurately recorded in S3 as the continuous capacity gap for that period.

[0053] After S2 processing is completed, the surplus photovoltaic power in each continuous effective optimization segment has been converted into the target photovoltaic charging sub-task volume with a unique photovoltaic power generation period and an allowed matching period. Adjacent positive strategy periods have been connected into target photovoltaic surplus periods. Data missing periods and photovoltaic allocation data conflict periods are processed separately on both sides. The target photovoltaic charging task volume and the corresponding relationship of each period are jointly transmitted to S3 to implement synchronous resource matching.

[0054] The specific implementation method of step S3 is as follows: S1 has formed existing charging and discharging task records, energy storage energy status trajectories, allocable charging amount within task event intervals, allocable charging amount within time periods, and energy storage status profiles. S2 has formed a target photovoltaic charging sub-task with a unique photovoltaic power generation time period. However, changes in the location of existing charging and discharging tasks will simultaneously change the charging power margin within the task event interval and the energy storage energy margin across time periods. S3 needs to determine the type of resource conflict and the range of charging tasks that can be actually migrated through complete playback and synchronous matching at the task event interval level.

[0055] S301, Form a task allocation combination to be verified and determine candidate charging / discharging strategies: Existing charging and discharging tasks have already recorded task volume, allowed execution period, compatible energy storage unit, original task location, and task occurrence sequence. For each task unit, the policy period boundary, task event interval boundary, and executable start time recorded in the task plan table within the allowed execution period are merged into a candidate start time set. Task units using constant task power maintain the task volume and duration unchanged, using the candidate start time as the task start time and determining the task end time according to the original duration. Task units with task power curves retain the time offset of each power value in the power curve relative to the original task start time. During migration, the complete power curve is shifted to the candidate start time, and the power change times and task end times are determined according to the original time offsets. When the task start time and task end time of the candidate task location are both within the allowed execution period, the executing energy storage unit is an compatible energy storage unit, and within each task event interval redefined according to the power change times, the task power and the cumulative charging and discharging power of the same energy storage unit are both within the corresponding power upper limit, the candidate start time, task end time, task power curve, and compatible energy storage unit are combined into a selectable task location.

[0056] Select optional task locations for each task unit in sequence according to the task identifier order, and arrange the order of task occurrence within the same task location to form a limited number of task allocation combinations to be verified. Each task allocation combination to be verified retains the task quantity, task type, allowed execution time period, and compatible energy storage unit of the existing charging and discharging tasks. Then, arrange all tasks according to the task event interval division method in S102, and recursively deduce the energy storage state from the initial energy storage state of the optimization range for each task event interval, and verify the upper and lower limits of energy storage, the upper limit of charging and discharging power, the constraint of prohibiting simultaneous charging and discharging, the allowed execution time period of the task, the compatible energy storage unit, and the conservation of task quantity. The task allocation combination to be verified that satisfies all basic constraints is recorded as a candidate charging and discharging strategy, and the task location, task occurrence order, task event interval, and energy storage state trajectory are saved.

[0057] S302, Perform synchronization matching and determine the continuous shortfall in the target photovoltaic task: like Figure 3 As shown, for each candidate charge / discharge strategy, the allocatable charging amount for each energy storage unit during the task event interval of each strategy period is re-determined according to the calculation method in S103. Available charging amount for different time periods The target photovoltaic charging task quantity is read sequentially according to the target photovoltaic surplus time sequence formed by S2. The energy storage units participating in the matching are based on the current... Arranged from largest to smallest, and if the values ​​are the same, arranged according to the energy storage unit identifier.

[0058] For the first in the permutation Each energy storage unit is read in chronological order according to the task event interval. The remaining amount of the target photovoltaic charging sub-task will be compared with the current amount. The smaller value in the range is determined as the target photovoltaic allocation amount for the task event interval. Each time a ,Will The product of the corresponding charging efficiency increases to the [number]th [unit]. The total energy storage status from the end position of each task event interval to the end of the optimization range is calculated, and then the allocable charging amount for the unprocessed task event intervals is recalculated. The energy storage unit in the first Target photovoltaic allocation for each strategic period All within the same strategy period Cumulative results; the first Actual matching volume for each strategy period From each energy storage unit Accumulated.

[0059] use deduct Receive the continuous gap volume during the period Within each target photovoltaic surplus period, adjacent and... The strategy time period with a value of zero is connected as a continuous segment, and all segments are accumulated. Obtain the continuous shortfall in the target photovoltaic task .when When the value is greater than zero, the earliest occurrence is located according to the time sequence. For strategy periods with a value greater than zero, for each energy storage unit participating in the matching of the corresponding strategy period, the restriction type saved during the calculation of the allocatable charging amount in the task event interval is read. When the charging power margin reaches zero first, the corresponding task event interval is determined as the power restriction position; when the energy storage upper limit margin reaches zero first, the earliest energy storage energy state position from the end position of the corresponding task event interval to the end time of the optimization range to obtain the minimum energy storage upper limit margin is determined as the energy restriction state position. When the charging power margin and the energy storage upper limit margin reach zero simultaneously in the same task event interval, the power restriction position and the energy restriction state position are recorded simultaneously, and the two types of restriction positions are saved according to the energy storage unit matching order and the time order of the task event interval determined in S302. The gap strategy period, the energy storage units participating in the matching, the earliest unallocated task event interval, the power restriction position, the energy restriction state position, and the restriction type are recorded together as the first cutoff position. When multiple energy storage units have exhausted their allocatable charging amount, the restriction positions of each energy storage unit are saved according to the energy storage unit matching order determined in S302.

[0060] S303, Verify the migration of occupied tasks and generate resource conflict decision results: When the target photovoltaic task continuously meets the shortfall When the value is zero, the amount of chain-migratable release will be occupied first. The record is set to zero, and the candidate charge / discharge strategy is directly recorded as a continuous succession type. When When the value is greater than zero, trace back in reverse time the prior charging tasks that occupied the first cutoff position. If the first cutoff position is caused by the depletion of charging power margin, identify the existing charging tasks occupying charging power within the task event interval of the power limit position as prior charging tasks. If the first cutoff position is caused by the depletion of the upper limit of energy storage, starting from the energy limit position, temporarily remove existing charging tasks executed before the energy limit position in order of proximity to the energy limit position, and replay from the initial energy storage state of the optimization range to the energy limit position. If the energy storage state at the energy limit position decreases after removing the task, or if the allocable charging amount in the task event interval corresponding to the first cutoff position increases, identify the corresponding existing charging task as a prior charging task. After completing the single-item verification, restore the original task position of the corresponding existing charging task. When there are no relocatable charging tasks occupying any energy storage units, The record is zero.

[0061] All prior charging tasks are arranged from nearest to farthest from the first cutoff position. If the distances are the same, they are arranged according to the order of occurrence of the tasks in the candidate charging and discharging strategies, forming a prior occupancy chain. For each prior charging task in the prior occupancy chain, a migration matching position is generated according to the candidate start time set in S301, and arranged from least to most according to the number of strategy time periods separated from the original task position. If the distances are the same, the original energy storage unit is verified first, and then other compatible energy storage units are verified.

[0062] For each prior charging task, the migration matching positions are verified sequentially, arranged from closest to furthest from the original task location. The original task location is not considered a migration matching position. After assigning the complete task volume to a migration matching position, all existing charging and discharging tasks are replayed starting from the initial energy storage state within the optimization range. The allocable charging volume for all task event intervals is recalculated, and all target photovoltaic charging sub-tasks are re-matched. The actual completed matching volume for each strategy period is accumulated as the target photovoltaic charging task volume coverage result after this migration. Only when the target photovoltaic charging task volume coverage result after this migration is higher than the coverage result of the previous retained state, and the actual completed matching volume for each strategy period is greater than or equal to the actual completed matching volume for the same strategy period in the previous retained state, is the migration matching position retained, and the difference between the two coverage results is recorded as the actual relocatable release volume for this migration. If the actual completed matching volume decreases in any strategy period, the original task location is restored, and the next migration matching position is verified. If none of the migration matching positions meet the retention conditions, the actual relocatable release volume for this migration is recorded as zero. Each migration is built upon existing migration combinations, and the actual amount of migration that can be released is accumulated to the amount of migration that can be released from the previously occupied chains. The cumulative transferable release capacity has reached the target photovoltaic task's continuous shortfall. Migration verification is stopped when all prior charging tasks have been verified and the cumulative transferable release amount is less than [amount missing]. At that time, the actual cumulative value is used as... .

[0063] In one embodiment, the target photovoltaic charging task of a candidate charging and discharging strategy is 100 kWh, the initial coverage result is 70 kWh, and the continuous coverage gap of the target photovoltaic task is 30 kWh. (This involves migrating prior charging tasks.) After playback was completed, the coverage increased to 82 kWh, and the actual matching volume completed in each strategy period did not decrease. The actual amount that could be migrated and released this time was 12 kWh; continue migrating prior charging tasks. After playback was completed, the coverage increased to 100 kWh, and the actual completed matching volume for each strategy period did not decrease. The actual transferable release volume was 18 kWh, and the cumulative transferable release volume reached 30 kWh. (Task recorded) Location of stop and task and tasks The migration matching position. According to and Perform mutually exclusive classification. When the value is zero, the record is a continuous succession type. Greater than zero and achieve The time record is a movable and occupancy type. Greater than and When the value is greater than zero, it is recorded as a residual gap type. Greater than zero and When the value is zero, it is recorded as a boundary interrupt type.

[0064] After S3 is completed, each candidate charging and discharging strategy obtains the existing task replay results, the target photovoltaic charging sub-task matching results at the task event interval level, the continuous acceptance gap of the target photovoltaic task, at least one of the power limit position and energy limit state position, the first cutoff position, the prior occupied chain, the migration matching position verified by the condition that the total coverage has increased and the matching amount completed in each strategy time period has not decreased, the migration release amount of the prior occupied chain, and the resource conflict type, so that S4 can determine the task reconfiguration range based on the actual migration results without time-by-time matching degradation.

[0065] The specific implementation method of step S4 is as follows: S3 has already established the resource conflict type for each candidate charging and discharging strategy, and saved the target photovoltaic task's continuous occupancy gap, prior occupancy chain, matching position of each migration, actual movable release amount, cumulative release amount, and actual matching amount completed for each strategy period for the movable occupancy candidate charging and discharging strategy; however, the migration in S3 is used to verify the feasibility of resource release, and S4 needs to formally change the task position according to the same migration order, and re-implement the synchronous matching relationship of each target photovoltaic charging electronic task under the condition that the actual matching amount completed in each strategy period does not decrease.

[0066] S401, Filter candidate charge / discharge strategies and determine the shortest first-occupancy chain: The resource conflict decision results have distinguished between continuous acceptance, movable occupation, residual gap, and boundary interruption candidate charging / discharging strategies. However, only the continuous acceptance and movable occupation candidate charging / discharging strategies have the resource conditions to cover the continuous acceptance gap of all target photovoltaic tasks. Therefore, two types of candidate charging / discharging strategies are selected from the resource conflict decision results formed in S3 to proceed to S4. For the continuous acceptance candidate charging / discharging strategies, the existing charging / discharging task positions, task occurrence order, energy storage unit configuration, and target photovoltaic charging / discharging task matching positions are maintained and recorded as the initial record of the charging / discharging strategy to be verified. For the movable occupation candidate charging / discharging strategies, the continuous acceptance gap of the target photovoltaic task is read. The system retrieves the following information: the order of the prior occupied chains, the migration matching positions of each prior charging task, the actual amount of data that can be migrated and released each time, and the cumulative amount of data that can be migrated and released after each migration. The cumulative amount of data that can be migrated and released is read sequentially along the prior occupied chains, and the system first retrieves data when the cumulative amount of data that can be migrated and released reaches or exceeds the specified threshold. The prior charging task is determined as the terminated task. The shortest prior occupancy chain is formed from the first item in the prior occupancy chain to the terminated task, following a predetermined arrangement. The shortest prior occupancy chain is the shortest consecutive task range arranged from closest to furthest from the first cutoff position, not an arbitrary combination of tasks from the prior occupancy chain. Prior charging tasks after the terminated task retain their original positions. A task reassignment list is then established, recording the task identifier, task quantity, original task position, migration matching position, original energy storage unit, migrated energy storage unit, allowed execution period, actual migrateable release amount, and cumulative migrateable release amount for each prior charging task within the shortest prior occupancy chain, in the order of arrangement. The task reassignment list preserves the combination order formed in S3, ensuring that the migration matching position of each subsequent item is always established on top of the migration state of a completed prior charging task.

[0067] S402, sequentially implement task reconfiguration and rematch the target photovoltaic charging sub-task: The task reconfiguration list clearly identifies the prior charging tasks that need to be relocated and their migration order. However, each task migration changes the energy storage state from the task occurrence time to the end of the optimization range, and may also change the minimum energy storage margin referenced in earlier strategy calculations. Therefore, each completed task reconfiguration is replayed from the initial moment of the optimization range. First, the existing charging and discharging task records of the migrateable occupancy-type candidate charging and discharging strategies are copied. The first prior charging task in the shortest prior occupancy chain is moved out of its original position, and the complete task quantity is arranged in the migration matching position saved in S3. The task identifier, task type, task quantity, and allowed execution time period are kept consistent. The task start time, task end time, task occurrence order, and executing energy storage unit are updated according to the migration matching position. After the position update is completed, all task event intervals are redefined. Starting from the initial energy storage state of the optimization range, the energy storage state of all existing charging and discharging tasks is recursively deduced according to the task occurrence order. The upper and lower limits of energy storage, the upper limit of charging and discharging power, the prohibition of simultaneous charging and discharging constraints, the allowed execution time period of the task, the adapted energy storage unit, and the conservation of task quantity are checked item by item. If any fundamental constraint is violated during the full replay after the location update of any prior charging task, the task location and energy storage state trajectory before the task reconfiguration in this round are immediately restored, the remaining tasks in the task reconfiguration list are stopped, and the corresponding candidate charging and discharging strategies are recorded as reconfiguration failure strategies. When all fundamental constraints are met, the allocable charging amount for each strategy period's task event interval and the allocable charging amount for each period are recalculated according to the method in S103. Then, all target photovoltaic charging sub-tasks are rematched according to the target photovoltaic surplus period order formed in S2. Each target photovoltaic charging sub-task only calls the allocable charging amount for the task event interval within the photovoltaic power generation strategy period. Each time a match is completed, the energy storage state is updated and the allocable charging amount for the unprocessed task event interval is recalculated. After the rematch is completed, the actual completed matching amount in this round is compared with the actual completed matching amount in the previous reserved state saved in S3 for each strategy period. If the target photovoltaic charging task coverage increases and the actual completed matching amount in each strategy period does not decrease, the task reconfiguration in this round is retained and the new coverage result is recorded. When the actual completed matching volume decreases during any strategy period, the state before the task reconfiguration in this round is restored, and the corresponding candidate charging / discharging strategy is recorded as a failed reconfiguration strategy. Subsequently, only the candidate charging / discharging strategies that are still in the valid reconfiguration state are processed according to the task reconfiguration list for the next prior charging task. The complete task replay and synchronous matching process is repeated until all tasks in the shortest prior occupied chain have completed the reconfiguration.

[0068] In one embodiment, a movable occupancy-type candidate charge / discharge strategy during the strategy period There is a 10 kWh shortfall during the strategy period. There is a 20 kWh shortfall, and the target photovoltaic task has a continuous shortfall of 30 kWh. S3 records the preceding charging tasks. The cumulative relocatable release capacity after migration is 12 kWh, prior to the charging task. The cumulative migrateable release after migration is 30 kWh, therefore the shortest first-to-first occupancy chain is... and Composition. S4 first... Configure the saved migration matching location and replay it completely to enable the policy period. The 10 kWh gap was matched, and the strategy period was completed. Complete the addition of 2 kWh of matching; then Configure the saved migration matching location and replay it completely to enable the policy period. The remaining 18 kWh shortfall has been matched. Both reconfigurations maintained the actual matching volume during other strategy periods without decreasing, thus fulfilling the task. Subsequent charging tasks will remain in their original positions.

[0069] S403, verify the completion status of the configuration change and generate a charge / discharge strategy to be verified: The shortest first-occupancy chain has completed task reconfiguration according to the migration combination saved in S3; however, S5 needs to receive the charging and discharging strategies to be verified with complete task event records and time-by-time synchronous matching results, so it is necessary to uniformly check and organize the two types of strategies. For the continuous succession candidate charging and discharging strategies, check the task positions of all existing charging and discharging tasks and the target photovoltaic charging sub-task matching records, and maintain the energy storage energy state trajectory, allocable charging amount in the task event interval, and allocable charging amount in the time period formed in S3. For the migratable occupancy candidate charging and discharging strategies that have completed task reconfiguration, check in turn whether the task quantity of each task in the shortest first-occupancy chain is conserved, whether the migration matching position is within the allowed execution time period, whether the executing energy storage unit is an adapted energy storage unit, and whether the task occurrence order is consistent with the migration combination saved in S3. Then, check the target photovoltaic charging sub-task quantity and the actual completed matching amount item by item according to the strategy time period, confirm that each target photovoltaic charging sub-task completes all task quantity matching within the photovoltaic power generation strategy time period, and confirm that the target photovoltaic charging task quantity coverage result is equal to the target photovoltaic charging task quantity formed in S2. When all verification conditions are met, the reconfigured task combination is recorded as the charging / discharging strategy to be verified. If a task reconfiguration causes the next migration matching position saved by S3 to lose its complete capacity, or if there is still a continuous gap in capacity after rematching, the candidate charging / discharging strategy before the task reconfiguration in this round is restored, and the task position, strategy period, and constraint type of the deviation are recorded. Each charging / discharging strategy to be verified uniformly records the strategy identifier, resource conflict type, existing charging / discharging task position, reconfigured task position, target photovoltaic charging sub-task matching position, task quantity, task occurrence sequence, energy storage energy state trajectory, allocable charging quantity within the task event interval, allocable charging quantity within the time period, target photovoltaic charging task quantity coverage result, number of reconfigured tasks, and number of task movement strategy periods, so that S5 can perform complete verification according to the task event occurrence sequence.

[0070] After S4 processing is completed, the continuous succession candidate charging and discharging strategies have been converted into charging and discharging strategies to be verified while maintaining the original task position. The transferable occupancy candidate charging and discharging strategies have completed basic constraint verification, task reconfiguration, and phase-by-phase non-degradation gap filling according to the shortest first-occupancy chain. The reconfiguration failure strategy has been restored to the state before this round of reconfiguration and has stopped entering the set of charging and discharging strategies to be verified, so that S5 can directly verify the actual executability of each task event.

[0071] The specific implementation method of step S5 is as follows: S4 has formed a charge-discharge strategy to be verified, which includes existing charge-discharge tasks, prior charge tasks that have been modified, target photovoltaic charging sub-tasks, and task event interval-level matching positions. However, local migration verification cannot replace unified playback within the complete optimization range. S5 needs to locate the earliest constraint violation position according to the unified task event interval, and use the updated time period allocable state boundary to complete a strategy correction, synchronous matching verification, and final arrangement.

[0072] S501, Full playback of the charge / discharge strategy to be verified and determination of the first constraint violation location: The charging and discharging strategy to be verified has recorded all task locations and task occurrence sequences. The start and end times of all tasks, task power change times, power sampling interval boundaries, and strategy time period boundaries are arranged chronologically, forming task event intervals between adjacent time locations. From S4, existing charging and discharging tasks, previously modified charging tasks, target photovoltaic charging sub-tasks, task start and end times, executing energy storage units, and task occurrence sequences are read. From S1, the initial energy storage state of the optimization range, charging efficiency, discharging efficiency, upper and lower limits of energy storage, and upper limits of charging and discharging power are read. From S2, the target photovoltaic charging sub-task quantity for each strategy time period is read.

[0073] For each task event interval, the charging and discharging task quantities of the same energy storage unit are accumulated, and calculated interval by interval according to the recursive relationship of energy storage state in S102. After each task event interval is completed, the upper and lower limits of energy storage, the cumulative charging and discharging power, the constraint prohibiting simultaneous charging and discharging, the allowed execution period of the task, the adapted energy storage unit, and the conservation of task quantity are checked in sequence. For the target photovoltaic charging sub-task, it is checked whether the actual completed matching quantity is between zero and the corresponding value. Between these points, verify that the target photovoltaic charging period is equal to the photovoltaic power generation period. The actual completed matching amount is less than... At that time, the difference will be recorded as the continuous shortfall for the period, and the violation of the synchronous matching of the target photovoltaic charging sub-task will also be recorded; if the actual completed matching exceeds Alternatively, if the charging period is inconsistent with the photovoltaic power generation period, record the target photovoltaic charging sub-task synchronization mismatch.

[0074] Task quantity conservation is checked based on task identifier and task unit sequence number. When the cumulative executed task quantity first exceeds the original task quantity, the task event interval in which the cumulative value first exceeds the original task quantity is recorded as the task quantity over-allocation violation position; when the cumulative executed task quantity is still less than the original task quantity at the end of the allowed execution period, the end position of the allowed execution period is recorded as the task quantity under-allocation violation position. When a task unit is repeatedly scheduled, the task event interval in which the same task unit identifier appears for the second time is recorded as the duplicate task violation position.

[0075] Locate the earliest constraint violation location according to the time sequence of the task event interval, and record the strategy identifier, strategy period, task event interval, energy storage unit, task identifier, constraint type, constraint boundary value, and actual calculated value. When multiple constraint violations occur at the same time location, all violations are recorded together at the same initial constraint violation location.

[0076] S502, update the allocatable state boundary during the time period and re-execute the resource conflict check: The time-assignable state boundary is updated based on the constraint type at the location of the first constraint violation. When the energy storage limit is violated, the... The energy storage unit in the first The first strategy period The energy storage state at the beginning of each task event interval is denoted as . The cumulative charging task volume that has been scheduled within the task event interval and is not included in the newly allocated volume is recorded as follows: The cumulative discharge task amount is recorded as The maximum amount of additional charging that can be accepted within the task event interval under the constraint of the energy storage limit is denoted as . Determined according to the following formula: In the formula, This is the upper limit of energy storage. For charging efficiency, This refers to the discharge efficiency. , , , and All use kilowatt-hours. After separating the task positions according to the prohibition of simultaneous charging and discharging constraints, the task event interval for adding charging is executed within the specified timeframe. Take zero. The smaller value among the available charge capacity corresponding to the charging power margin in the same task event interval is recorded as the updated upper limit of charging resources in the task event interval, and the position where the energy storage capacity limit is reached is recorded as the charging resource termination position.

[0077] When the lower limit of energy storage is violated, the discharge task quantity is divided by the discharge efficiency, and then added to the lower limit of energy storage. The result is determined as the minimum energy storage required before the start of the discharge task. When regenerating the migration matching position, each position is replayed back to the start time of the discharge task, and only the task position that can make the energy storage state reach the minimum energy storage is retained.

[0078] When the charging power limit is violated, the remaining available charging capacity for the task event interval is obtained by subtracting the already scheduled cumulative charging task quantity from the product of the charging power limit and the duration of the task event interval. When the discharging power limit is violated, the remaining available discharging capacity is determined in the same way. If the result is zero or negative, the corresponding task event interval is recorded as a restricted position. Simultaneously, when charging and discharging violations occur, conflict records are established for charging and discharging task positions with overlapping times. When the allowed execution period or adapted energy storage unit is violated, the task position violating the constraint is removed from the selectable task positions. When the task quantity conservation is violated, all task units are recombined according to the original task quantity. When the synchronization matching of the target photovoltaic charging sub-task is violated, tasks exceeding the corresponding... The allocation amount and the allocation amount outside the photovoltaic power generation period; when there is a continuous gap in the amount of power to be received during the period, the position of the available charging amount in the earliest depletion task event interval within the gap strategy period is recorded as the updated charging resource boundary.

[0079] Each time period can be allocated state boundary records including strategy identifier, energy storage unit, strategy time period, task event interval, boundary type, constraint boundary value, actual calculated value, maximum charge capacity, maximum discharge capacity, removed optional task locations, and boundary effective time range. When multiple constraint violations exist at the same initial constraint violation location, each boundary record is generated separately, and all boundary records jointly define the optional task locations and the allocable charge capacity within the task event interval. If no constraint violation occurs during the first playback, the corresponding charge / discharge strategy to be verified directly proceeds to S503. If a constraint violation occurs during the first playback, the allocable state boundary of the time period is updated, the allocable charge capacity within the task event interval and the allocable charge capacity of each strategy time period are recalculated, and the continuous capacity gap of the time period, the continuous capacity gap of the target photovoltaic task, the first cutoff location, and the prior occupied chain are re-determined according to the order of S3. The migration matching location is regenerated and verified item by item based on all updated boundary records. After the migration verification is completed, one task reconfiguration and synchronous matching of the target photovoltaic charging sub-task are implemented according to the order of S4 to form the corrected charge / discharge strategy to be verified. Each charge / discharge strategy to be verified executes at most one time-slot-allocable state boundary update and resource conflict re-judgment.

[0080] S503, Review and correct the strategy and determine the target charge / discharge strategy: A charging / discharging strategy that does not exhibit constraint violations during the initial replay is directly recorded as a retained strategy. After one update of the allocatable state boundary and re-judgment of resource conflicts, the strategy is replayed in full according to the task event interval division, energy storage state recursion, and constraint verification sequence of S501. If the second replay satisfies all execution constraints, it is recorded as a retained strategy. If the second replay still exhibits violations related to energy storage energy, power, simultaneous charging / discharging, allowed execution time periods, adapted energy storage units, task quantity conservation, or synchronous matching of the target photovoltaic charging sub-task, the corresponding strategy's ranking eligibility is terminated. For each retained strategy, the actual target photovoltaic charging volume verified through full replay within each strategy's time period is accumulated to obtain the target photovoltaic charging task volume coverage result; the number of prior charging tasks that have completed the reconfiguration is counted; for each reconfiguration task, the absolute difference between the migrated strategy time period index and the original strategy time period index is calculated, and the total number of task migration strategy time periods is accumulated. When the set of retained strategies contains at least one retained strategy, they are first arranged in descending order of the target photovoltaic charging task coverage result. If the coverage results are the same, they are arranged in ascending order of the number of prior charging tasks that have been reconfigured. If the number of reconfigured tasks is still the same, they are arranged in ascending order of the number of time periods of the task movement strategy. When all three indicators are the same, they are arranged according to the record order of the candidate charging and discharging strategies formed by S3. The retained strategy ranked first is determined as the target charging and discharging strategy, and the complete task location, the target photovoltaic charging sub-task matching location, the energy storage energy state trajectory, the target photovoltaic charging task coverage result, and the task reconfiguration record are output. When the set of retained strategies is empty, it is recorded that there is no executable target charging and discharging strategy, and the first constraint violation location, constraint type, constraint boundary value, and actual calculated value of each charging and discharging strategy to be verified are output, while the existing charging and discharging task plans that have taken effect before the optimization process begins are retained.

[0081] After S5 processing, the charging and discharging strategies to be verified that satisfy all constraints during the first playback are directly entered into the sorting. The charging and discharging strategies to be verified that violate constraints during the first playback are entered into the sorting after at most one time period allocable state boundary update, resource conflict re-judgment, and complete review. When the reserved strategy set is not empty, the target charging and discharging strategy is determined in sequence according to the target photovoltaic charging task coverage result, the number of reconfiguration tasks, and the number of task movement strategy time periods. When the reserved strategy set is empty, no executable target charging and discharging strategy and constraint violation record are output.

[0082] The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, or improvements 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 optimizing photovoltaic charging and discharging strategies based on energy storage state profiles, characterized in that, include: S1. Organize the photovoltaic and energy storage operation data and existing charging and discharging tasks according to the strategy time period, divide the task event interval, recursively calculate the energy storage status, determine the allocable charging amount for the task event interval based on the charging power margin and the upper limit margin of the energy storage, accumulate the allocable charging amount for the task event interval within the same strategy time period as the allocable charging amount for the time period, and form an energy storage status profile based on the allocable charging amount for the time period of adjacent strategy time periods. S2, the positive difference between the photovoltaic power generation during the strategy period and the non-energy storage electricity consumption and the allocated photovoltaic power is determined as the target photovoltaic charging electronic task quantity; S3, match the target photovoltaic charging task quantity with the allocable charging quantity of the task event interval in the same strategy period, determine the continuous acceptance gap quantity of the period, and determine the earliest unallocated task event interval and the restriction position corresponding to the first positive value of the continuous acceptance gap quantity of the period as the first cutoff position; reverse trace the prior charging tasks that occupy the first cutoff position to form a prior occupancy chain, configure the prior charging tasks to the optional task positions and replay them completely, and only retain the migration matching positions where the coverage result of the target photovoltaic charging task quantity increases and the actual completed matching quantity of each strategy period does not decrease. S4, based on the migration matching location, reconfigure the prior charging task, re-execute the matching of the target photovoltaic charging sub-task quantity, and form a charging and discharging strategy to be verified; S5, fully replay the charging and discharging strategy to be verified and check the execution constraints. The charging and discharging strategy to be verified that passes the execution constraint check and has the largest target photovoltaic charging task coverage result is determined as the target charging and discharging strategy.

2. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 1, characterized in that, Multiply the upper limit of charging power by the duration of the task event interval, subtract the cumulative charging task amount, and take the larger value between the result and zero to obtain the receiveable power corresponding to the charging power margin. Subtracting the energy states of each energy storage from the end of the task event interval to the end of the optimization range from the upper limit of the energy storage, the minimum difference is selected, and the larger value between the minimum difference and zero is taken and converted according to the charging efficiency to obtain the receiveable electricity corresponding to the upper limit of the energy storage. The smaller of the two acceptable power values ​​is taken as the allocable charging amount for the task event interval, and the subsequent energy storage status is updated according to the charging efficiency.

3. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 2, characterized in that, The strategy period during which the earliest positive value of the continuous gap volume is identified during the positioning period; For the energy storage units participating in the matching, when the charging power margin reaches zero first, the corresponding task event interval is determined as the power limit position. When the energy storage upper limit margin reaches zero first, the energy storage energy state position that first obtains the minimum energy storage upper limit margin is determined as the energy limit state position. When both reach zero at the same time, the two limit positions are recorded. The strategy period, energy storage unit, earliest unallocated task event interval, restriction location, and restriction type are recorded as the first cutoff location.

4. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 3, characterized in that, The first cutoff point includes the energy-limited state position. Existing charging tasks are removed and replayed one by one from the nearest to the energy-limited state position. If at least one of the following occurs after removal: the energy storage state decreases or the available charging amount in the task event interval increases, the task will be included in the prior occupancy chain. If neither of the two occurs, the task will not be included in the prior occupancy chain and will be restored to its original position. The entire task volume of the previously occupied in-chain tasks will be configured to the optional task position and replayed in its entirety; If the target photovoltaic charging task coverage increases and the actual completed matching amount in each strategy period does not decrease, the optional task position is retained; otherwise, the original task position is restored.

5. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 1, characterized in that, When the charging task adopts constant task power, the policy time period boundary, task event interval boundary and executable start time in the task plan table are merged into a set of candidate start times; Select the task start time from this set, keep the task quantity and duration unchanged, and determine the task end time; If the start and end times of a task are within the allowed execution period, the energy storage unit being executed is an adapted energy storage unit, and the task power and cumulative charge / discharge power of each task event interval do not exceed the power limit, the corresponding position will be determined as an optional task position. If any condition is not met, the corresponding position will be excluded.

6. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 1, characterized in that, When the pre-charging task has a task power curve, the policy time period boundary, task event interval boundary and executable start time in the task plan table are merged into a candidate start time set, and a candidate start time is selected from the candidate start time set; the time offset of each power value relative to the original task start time is retained, the task power curve is shifted to the candidate start time, and the power change time and task end time are determined according to the time offset. If the candidate start time to task end time is within the allowed execution period, the execution energy storage unit is an adaptive energy storage unit, and the task power and cumulative charge / discharge power of each task event interval redefined according to the power change time do not exceed the power limit, the corresponding position will be determined as an optional task position. If any condition is not met, the corresponding position will be excluded.

7. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 1, characterized in that, When a sample value is missing, the sample value is made up by the cumulative electricity consumption of the metering interval to which the sampling time belongs; When the completion is completed, the continuous range is defined as the continuous effective optimization segment, and the target photovoltaic charging electronic task and charging and discharging strategy are formed within this segment. When the missing data is not completed, the corresponding strategy period is recorded as the data missing period. The continuous effective optimization segment is divided by the data missing period. Existing charging and discharging tasks that cross the data missing period are split into tasks to be supplemented according to the boundary. Before the missing data is supplemented and the initial energy storage state is determined, no charging and discharging strategy that crosses the data missing period is formed.

8. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 1, characterized in that, After calculating the allocable charging amount for the task event intervals of each strategy period, compare the allocable charging amount for adjacent strategy periods. A depletion state change relationship is formed when the value changes from positive to zero, and a recovery state change relationship is formed when the value changes from zero to positive. Each state change relationship record includes the strategy period, energy storage unit, allocable charging amount before the change, allocable charging amount after the change, change direction, restriction type, occupied task identifier, and task occurrence sequence. All state change relationships are arranged according to the strategy period, energy storage unit, and task occurrence sequence to form an energy storage state profile.

9. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 1, characterized in that, A cutoff position record is generated based on the first cutoff position. The cutoff position record includes the gap strategy period, energy storage unit, the earliest unallocated task event interval, power limit position, energy limit status position, and limit type. If only the power limiting position exists, the energy limiting position is recorded as empty; if only the energy limiting position exists, the power limiting position is recorded as empty; if both exist simultaneously, they are recorded separately. When multiple energy storage units have exhausted the available charging capacity within the task event interval, the limit positions of each energy storage unit are saved according to the matching order.

10. The photovoltaic charging and discharging strategy optimization method based on energy storage state profile according to claim 1, characterized in that, Perform constraint checks to form a set of retention policies; When the set of retention strategies contains at least one retention strategy, they are arranged in order of the target photovoltaic charging task coverage results from largest to smallest, the number of prior charging tasks to be reconfigured from smallest to largest, and the number of task movement strategy time periods from smallest to largest. The retention strategy ranked first is determined as the target charging and discharging strategy. When the set of retained strategies is empty, record that there is no executable target charging and discharging strategy, output the first constraint violation location, constraint type, constraint boundary value and actual calculated value of the charging and discharging strategy to be verified, and retain the existing charging and discharging task plan that was in effect before the optimization process started.