A flexible power adaptive allocation method for an electric energy metering box and an electric energy metering box
Patent Information
- Application Number
- CN202611528793.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-03
AI Technical Summary
When faced with multiple circuit power demands, existing power distribution equipment cannot balance the safety constraints of the main incoming line with the differentiated priorities of each circuit, resulting in rigid power allocation and a lack of dynamic adaptive adjustment capabilities.
Through the data synchronization acquisition module, load characteristic analysis module, adjustable resource pool construction module, allocation priority calculation module, and multi-level adaptive allocation module of the power metering box, real-time power acquisition, load separation, flexible adjustable power pool construction, and multi-level adaptive allocation of each power circuit are realized, and the target allocation power is generated and distributed.
It achieves the goal of prioritizing the needs of circuits with urgent charging tasks while ensuring that the basic power consumption of each circuit is not affected, and maximizing charging efficiency under the constraint that the total incoming line is not overloaded, thus ensuring that the allocation strategy is synchronized with real-time charging demand.
Smart Images

Figure CN123034397A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent power distribution control technology, specifically to a flexible power adaptive allocation method for an energy metering box and the energy metering box thereof. Background Technology
[0002] In the field of power distribution equipment, power metering boxes are used to centrally meter and manage the power distribution of multiple power circuits in buildings or production sites. A typical architecture includes a main incoming circuit and several branch power circuits. The types of loads connected to each circuit are different, such as lighting, air conditioning, and power equipment. The power consumption patterns and importance of various types of loads are different.
[0003] In existing technologies, power metering boxes typically manage the power of each circuit using a fixed limit allocation method. This means that an independent power protection threshold is pre-set for each circuit; when the real-time power of that circuit exceeds the threshold, a trip or alarm is triggered. This method does not consider changes in the load composition of each circuit at different times, nor does it consider the real-time remaining capacity of the main incoming line circuits. When there is still surplus power in the main incoming line, circuits limited by the fixed threshold cannot receive additional power; when the main incoming line is close to full load, important circuits cannot be prioritized, and instead, each circuit is protected independently, lacking overall coordination.
[0004] Therefore, existing power distribution equipment suffers from a rigid power allocation method, which cannot dynamically and adaptively adjust power distribution according to the real-time demand differences of each circuit and the safety constraints of the main incoming line. Summary of the Invention
[0005] This invention provides a flexible power adaptive allocation method for an energy metering box and the energy metering box thereof, which solves the problem in the prior art that when a power distribution device faces multiple circuit power demand, it cannot take into account both the safety constraints of the main incoming line and the differentiated priorities of each circuit, resulting in rigid power allocation and a lack of dynamic adaptive adjustment capability.
[0006] In a first aspect, the present invention provides a flexible power adaptive allocation method for an electricity metering box, comprising: S10: Through the power metering unit of each power circuit, the real-time power of each power circuit is collected synchronously according to the preset collection cycle, and the real-time total power of the main incoming circuit is obtained. S20: Based on the historical power consumption data of each power circuit, distinguish between the non-adjustable base load and the adjustable load of each power circuit in the current period, and take the sum of the non-adjustable base load of each power circuit as the total non-adjustable base load. S30: Subtract the total non-adjustable base load from the preset total incoming line safety capacity to obtain the flexible adjustable power pool for the current time period; S40: Calculate the flexible allocation priority of each power circuit based on the current power demand of each power circuit; S50: Under the constraint of the flexible adjustable power pool, the flexible adjustable power pool is adaptively adjusted in multiple levels according to the flexible adjustment priority to generate the target allocation power for each power circuit, and the target allocation power is sent to each power circuit. S60: Repeat steps S10 to S50 in the next acquisition cycle.
[0007] In a second aspect, the present invention provides an energy metering box, comprising: The data synchronization acquisition module is used to synchronously acquire the real-time power of each power circuit according to a preset acquisition cycle through the power metering unit of each power circuit, and obtain the real-time total power of the main incoming circuit. The load characteristic analysis module is used to distinguish the non-adjustable base load and adjustable load of each power circuit in the current period based on the historical power consumption data of each power circuit, and to take the sum of the non-adjustable base load of each power circuit as the total non-adjustable base load. The adjustable resource pool construction module is used to subtract the total non-adjustable basic load from the preset total incoming line safety capacity to obtain the flexible adjustable power pool for the current time period. The allocation priority calculation module is used to calculate the flexible allocation priority of each power circuit based on the current power demand of each power circuit. A multi-level adaptive allocation module is used to perform multi-level adaptive allocation of the flexible adjustable power pool according to the flexible allocation priority under the constraint of the flexible adjustable power pool, generate the target allocation power for each power circuit, and send the target allocation power to each power circuit. The dynamic cyclic control module is used to re-execute the data synchronization acquisition module to the multi-level adaptive allocation module in the next acquisition cycle.
[0008] One or more technical solutions provided in this invention have at least the following technical effects or advantages: The technical solution of this invention firstly involves the power metering box synchronously collecting the real-time power of each power circuit through the power metering unit configured in each power circuit at the beginning of each preset collection cycle, and summing the real-time total power of the main incoming circuit to provide basic data with a unified time profile for subsequent allocation.
[0009] Furthermore, the electricity metering box utilizes the power sequence of each power circuit within the same historical period of the same type, and extracts the lower envelope of power as the non-adjustable base load of each circuit through quantile statistics. The remaining portion is classified as adjustable load, and the summation yields the total non-adjustable base load. This allows the electricity metering box to accurately distinguish between rigid and flexible power consumption in each power circuit, providing a clear safety margin and adjustment range for power allocation.
[0010] Furthermore, the electricity metering box uses the difference between the preset total incoming line safety capacity and the total non-adjustable base load as a flexible and adjustable power pool, which can quantify the boundary of power resources that can be flexibly allocated under the dual constraints of ensuring the basic power consumption of each power circuit and the safety of the total incoming line.
[0011] Furthermore, based on the amount of electricity required to fully charge the adjustable power terminals connected to each power circuit, the remaining available charging time, and the maximum acceptable charging power, a demand urgency coefficient is calculated. The coefficients are then sorted from largest to smallest to determine the flexible allocation priority of each power circuit. This enables the power metering box to accurately identify the power circuit with the most urgent charging task, ensuring that power resources are prioritized to meet the charging needs with tight time constraints.
[0012] Furthermore, the initial power allocation for each power circuit is set as an unadjustable base load. The demand urgency coefficient, maximum acceptable charging power, and remaining power to be allocated are input into a pre-trained watershed-type multi-level gated allocation network. The network allocates power level by level and outputs the target power allocation for each power circuit, which is then sent to each power circuit for execution. Fine-grained power allocation is achieved through a pre-trained neural network model. Under the premise that the total incoming line is not overloaded, the demand of urgent power circuits is given priority while taking into account the acceptable capacity constraints of each circuit.
[0013] Finally, when the next data collection cycle arrives, the power metering box re-executes steps S10 to S50, detects changes in the number of power circuits and adaptively adjusts the distribution network structure to form a closed-loop control. Ultimately, it can continuously sense changes in the charging status of each power circuit and the connection / disconnection of the circuit, and dynamically updates the power allocation scheme in each cycle to ensure that the allocation strategy is always synchronized with the real-time charging demand.
[0014] In summary, the technical solution of the present invention realizes dynamic adaptive allocation of power for multiple power circuits, enabling the power metering box to prioritize the needs of power circuits with urgent charging tasks while ensuring that the basic power consumption of each power circuit is not affected, maximize charging efficiency under the constraint that the total incoming line is not overloaded, and maintain the real-time performance and adaptability of the allocation strategy through periodic cycles.
[0015] This solves the problem in existing technologies where power distribution devices cannot balance the safety constraints of the main incoming line with the differentiated priorities of each circuit when facing multiple circuit power demands, resulting in rigid power distribution and a lack of dynamic adaptive adjustment capabilities. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a flexible power adaptive allocation method for an energy metering box provided by the present invention.
[0017] Figure 2This is a schematic diagram of the target power allocation process in a flexible power adaptive allocation method for an energy metering box provided by the present invention.
[0018] Figure 3 This is a schematic diagram of the structure of an electricity metering box provided by the present invention.
[0019] In the attached diagram, the labels representing each component are as follows: The module includes: a data synchronization acquisition module 11, a load characteristic analysis module 12, an adjustable resource pool construction module 13, an allocation priority calculation module 14, a multi-level adaptive allocation module 15, and a dynamic cyclic control module 16. Detailed Implementation
[0020] This invention provides a flexible power adaptive allocation method for an energy metering box and the energy metering box itself, which solves the problem in the prior art that when power distribution devices face multiple circuit power demands, they cannot take into account both the safety constraints of the main incoming line and the differentiated priorities of each circuit, resulting in rigid power allocation and a lack of dynamic adaptive adjustment capabilities.
[0021] It should be noted that the terms "comprising" and "having" are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to these processes, methods, products, or devices.
[0022] Example 1, as Figure 1 As shown, the present invention provides a flexible power adaptive allocation method for an electricity metering box, the method comprising: S10: Through the power metering unit of each power circuit, the real-time power of each power circuit is collected synchronously according to the preset collection cycle, and the real-time total power of the main incoming circuit is obtained.
[0023] At the beginning of each preset acquisition cycle, this step collects the real-time power data of all power circuits at the same time through the power metering unit configured in each power circuit, and sums the real-time power of each circuit to obtain the real-time total power of the main incoming circuit.
[0024] Step S10 in the method provided by the present invention includes: The real-time voltage and real-time current of each power circuit are synchronously collected at the beginning of each preset collection cycle through the power metering unit configured in each power circuit. The real-time power of each power circuit is obtained by multiplying the real-time voltage and real-time current of each power circuit. The real-time total power of the main incoming line circuit is obtained by summing the real-time power of each power circuit.
[0025] It should be noted that an adjustable power power terminal refers to an electrical device whose operating power can be adjusted through external control commands, including but not limited to charging piles, controllable energy storage devices, and adjustable power loads. To clearly and completely illustrate the execution logic of this solution, this application embodiment uses a charging pile as a preferred example of an adjustable power power terminal for detailed explanation.
[0026] Specifically, at the beginning of each preset acquisition cycle, the power metering box samples the voltage and current of all power circuits simultaneously through the power metering units configured in each power circuit, and obtains the real-time voltage and real-time current values of each power circuit.
[0027] The synchronization acquisition command is initiated by the main control unit within the energy metering box and broadcast to each energy metering unit via the RS-485 bus. The command frame format includes a start byte, a broadcast address of 0x00, a command code of 0x01 indicating synchronization acquisition trigger, a verification byte, and an end byte. Upon receiving the broadcast command, each energy metering unit completes voltage and current sampling within a fixed time window following the end byte of the command frame. This time window does not exceed 1 millisecond, thus ensuring the time synchronization of data across all circuits.
[0028] The duration of the data acquisition cycle is set based on the safety capacity margin of the main incoming line circuit and the load change rate. The smaller the safety capacity margin or the more frequent the load fluctuations, the shorter the data acquisition cycle should be to ensure timely response when the main incoming line is close to full load.
[0029] For example, taking a charging scenario in a public parking area of an older residential community, the main incoming circuit of the power metering box uses a copper core cable with a cross-sectional area of 25 square millimeters. The rated current of the switch is 125A, and the upper-level transformer has a maximum capacity of 40kVA after distribution. After taking the minimum value of the cable's safe current carrying capacity, the switch's rated current, and the transformer's distributed capacity, the safe capacity of the main incoming circuit is 22kVA. The power metering box connects to three power circuits, which are connected to charging piles 1, 2, and 3 respectively. The charging power of each charging pile changes over a time constant of approximately minutes when the vehicle battery is near full charge; therefore, the power metering box presets the data collection period to 15 seconds. At the beginning of a certain data collection period, the power metering box simultaneously samples the electrical parameters of the three circuits via a synchronous data collection command: the sampling results for power circuit 1 are 220.0V and 16.00A; for power circuit 2, the voltage is 220.0V and the current is 10.00A; and for power circuit 3, the voltage is 220.0V and the current is 8.00A.
[0030] Furthermore, the real-time voltage and current values of each power circuit are multiplied to obtain the real-time power value of each power circuit during the acquisition period. In the AC charging pile scenario, the power factor of the charging pile is usually close to 1, so the real-time power of each circuit is approximately calculated by multiplying the real-time voltage and real-time current.
[0031] For example, the real-time power of charging pile 1 is 220.0V × 16.00A = 3520VA; the real-time power of charging pile 2 is 220.0V × 10.00A = 2200VA; and the real-time power of charging pile 3 is 220.0V × 8.00A = 1760VA. The difference in current at each charging pile at this moment reflects the different charging needs of different vehicles. The vehicle connected to charging pile 1 has a lower battery level and is being charged with a larger current; the vehicles connected to charging piles 2 and 3 have higher battery levels, and the charging current has gradually decreased.
[0032] Finally, the calculated real-time power of each power circuit is summed to obtain the total real-time power of the main incoming circuit in the current acquisition period. For example, the real-time power of the three circuits is summed: 3520VA + 2200VA + 1760VA = 7480VA, which means the total real-time power of the main incoming circuit in the current acquisition period is 7480VA.
[0033] It should be noted that the above values are for illustrative purposes only and do not constitute a limitation on the present invention.
[0034] In summary, this step enables the power metering box to accurately grasp the real-time power status of each circuit and the main incoming line at a unified time cross-section, providing timely and accurate basic data support for the subsequent dynamic allocation of power resources.
[0035] S20: Based on the historical power consumption data of each power circuit, distinguish between the non-adjustable base load and the adjustable load of each power circuit in the current period, and take the sum of the non-adjustable base load of each power circuit as the total non-adjustable base load.
[0036] This step involves retrieving power data for each power circuit during the same historical period and timeframe, extracting the lower envelope of power for each circuit using quantile statistics as the non-adjustable base load, classifying the remaining portion as the adjustable load, and summing the non-adjustable base loads of each circuit to obtain the total non-adjustable base load.
[0037] Step S20 in the method provided by the present invention includes: Obtain the historical power sequence of each power circuit within the same historical period of the same type. The same historical period of the same type refers to the period within a preset number of days in the past that has the same date type and the same time period as the current period. The date type includes at least weekdays, weekends and holidays. For each power circuit, the corresponding historical power sequence is sorted in ascending order of value, and the power value corresponding to the preset quantile is taken as the lower power envelope of the power circuit. The lower power envelope is taken as the non-adjustable base load of the power circuit. The preset quantile ranges from 5% to 15%. The electrical loads in each electrical circuit, excluding the aforementioned non-adjustable basic loads, are considered as the adjustable loads of each electrical circuit. The total non-adjustable base load is obtained by summing the non-adjustable base loads of each power circuit.
[0038] Specifically, for each power circuit, the power records for that circuit during the same historical period are retrieved from the historical database to form a historical power sequence. The same historical period refers to a time period within a preset number of days that has the same date type and time duration as the current data collection time. The date type is at least categorized into three types: weekdays, weekends, and holidays.
[0039] The preset number of days determines the sample size of historical data. A larger value results in a longer historical reference period and a more stable baseline load estimate, but a slower response to seasonal changes. Typically, 30 to 90 days are used. Shorter values, such as 30 days, are chosen for scenarios with significant seasonal load changes, while 60 or 90 days can be used for scenarios with stable loads. With a preset number of 30 days, for weekday types, the past 30 days usually contain approximately 20 to 22 weekdays, and the number of historical power sequence sampling points for that time period within each weekday is sufficient for quantile estimation. If a finer division of date types results in insufficient days for a single type, the preset number of days can be expanded to ensure sufficient sample size. In the example, there are approximately 22 weekdays within 30 days, which meets the statistical requirements, so 30 days is used.
[0040] For example, continuing the previous scenario, the current data collection time is Tuesday at 10:00 AM, and the date type is weekday. With a preset number of days of 30, for power circuit 1, the electricity metering box retrieves all historical power records from 10:00 AM to 10:15 AM on all weekdays within the past 30 days, forming a historical power sequence. Each collection cycle within this time period corresponds to one power sampling point. If the collection cycle is 15 seconds, then there are 60 sampling points within a 15-minute period, and the historical power sequence consists of these 60 power values. If the historical data storage granularity is one power value per minute, then the historical power sequence consists of 15 power values. Power circuits 2 and 3 acquire their respective historical power sequences according to the same rules.
[0041] Secondly, for each power circuit, the acquired historical power sequence is sorted in ascending order, and the power value corresponding to the preset quantile is taken as the lower envelope of the power for that circuit. The preset quantile determines the conservatism of the base load; the smaller the value, the lower the estimated base load, the less rigid protection is reserved, and the larger the flexible allocation space, but the higher the risk of the base load being underestimated; the larger the value, the more sufficient the protection, but the smaller the allocation space. Usually, 10% is taken as the default value. In charging scenarios, the base load of each circuit fluctuates less, so 5% can be used to increase allocation flexibility. In scenarios with high requirements for base power protection, 15% can be used. In the example, 10% is used.
[0042] The physical meaning of the aforementioned lower power envelope is as follows: within the same historical period of the same type, there is a probability (1 - preset quantile) that the power consumption of this circuit is higher than this value, which represents the lowest power consumption level that this circuit almost inevitably exists within this type of period. This lower power envelope is taken as the non-adjustable base load of this power circuit in the current period.
[0043] For example, taking charging pile circuit 1 as an example, the historical power sequence of weekdays from 10:00 to 10:15 over the past 30 days is sorted from smallest to largest, and the power value corresponding to the 10th percentile is taken. Assuming that the power value corresponding to the 10th percentile after sorting is 500VA, then 500VA is considered as the non-adjustable base load of charging pile circuit 1. This means that during the same period in history, the power of charging pile circuit 1 is higher than 500VA for 90% of the time. This can be regarded as the basic power consumption that is almost inevitable during this period, such as the standby power consumption of the charging pile and the power consumption of the communication module.
[0044] Secondly, the electrical loads in each circuit, excluding the fixed, non-adjustable base loads, are considered as the adjustable loads of each circuit. Adjustable loads are the power portions of the circuit that can be adjusted or reduced within a certain range.
[0045] For example, if the real-time power of the No. 1 charging pile circuit in the current data collection period is 3520VA and the non-adjustable base load is 500VA, then the adjustable load is 3520VA-500VA=3020VA, which is the flexible power portion of the No. 1 charging pile circuit that can be allocated in the current time period.
[0046] Finally, the calculated non-adjustable base loads of each power circuit are summed to obtain the total non-adjustable base load, which represents the minimum total power that all power circuits under the power metering box must guarantee during the current time period.
[0047] For example, if the non-adjustable base loads of the three charging pile circuits are: 500VA for charging pile No. 1, 400VA for charging pile No. 2, and 350VA for charging pile No. 3, then the total non-adjustable base load is 500VA + 400VA + 350VA = 1250VA, which is the minimum total power that the power metering box must reserve for the current period.
[0048] It should be noted that the above values are for illustrative purposes only and do not constitute a limitation on the present invention.
[0049] In summary, this step enables the power metering box to accurately distinguish between the rigid power consumption that must be guaranteed and the flexible power consumption that can be allocated in each power circuit, providing a precise quantitative basis for subsequent power allocation while ensuring that the basic power consumption is not affected.
[0050] S30: Subtract the total non-adjustable base load from the preset total incoming line safety capacity to obtain the flexible adjustable power pool for the current time period.
[0051] This step subtracts the sum of the non-adjustable base loads of each circuit from the preset total incoming line safety capacity to obtain the flexible adjustable power pool for the current time period, which serves as the total resource constraint for subsequent power allocation.
[0052] Step S30 in the method provided by the present invention includes: The maximum safe power allowed to be carried by the total incoming line circuit is taken as the preset total incoming line safe capacity; The difference between the total incoming line safety capacity and the total non-adjustable base load is used as the flexible adjustable power pool for the current time period.
[0053] Specifically, the maximum safe power that the main incoming line circuit can carry is first used as the preset safe capacity of the main incoming line. The safe capacity of the main incoming line is determined comprehensively based on the physical parameters of the main incoming line circuit. The specific rule is as follows: take the minimum value of the power value corresponding to the safe current carrying capacity of the main incoming line cable, the power value corresponding to the rated current of the main incoming line switch, and the power value corresponding to the upper limit of the capacity allocated to the circuit by the upstream transformer as the safe capacity of the main incoming line.
[0054] The power value corresponding to the cable's safe current carrying capacity is calculated as: Cable safe current carrying capacity × Rated voltage. The cable's safe current carrying capacity is obtained by referring to a table based on the cable's cross-sectional area and material. Taking copper core cables as an example, the safe current carrying capacity corresponding to common cross-sectional areas is as follows: 2.5 square millimeters corresponds to 25A, 4 square millimeters corresponds to 35A, 6 square millimeters corresponds to 45A, 10 square millimeters corresponds to 65A, 16 square millimeters corresponds to 85A, 25 square millimeters corresponds to 100A, and 35 square millimeters corresponds to 125A. The power value corresponding to the switch's rated current is calculated as: Switch rated current × Rated voltage. The upper limit of the transformer's allocated capacity is the value obtained by multiplying the rated capacity of the upstream transformer by the allocation coefficient of the circuit. The transformer's rated capacity itself is a unit of apparent power and can be directly used for safe capacity comparison.
[0055] The transformer allocation coefficient is determined based on the capacity ratio of the energy metering box in all power supply circuits under the transformer, specifically by dividing the total incoming line design capacity of the energy metering box by the sum of the design capacities of all circuits under the transformer.
[0056] For example, the total incoming line design capacity of the electricity metering box is 40kVA. Five similar distribution boxes are connected to the transformer, each with a design capacity of 40kVA, for a total design capacity of 200kVA, matching the transformer's rated capacity of 200kVA. Therefore, the allocation coefficient is 40kVA / 200kVA = 0.2. If the transformer is subsequently expanded or the number of circuits changes, the allocation coefficient needs to be recalculated and the preset value of the total incoming line safety capacity updated.
[0057] For example, continuing the previous scenario, the main incoming circuit of the electricity metering box uses a copper core cable with a cross-sectional area of 25 square millimeters. Referring to the table, the safe current carrying capacity is 100A, corresponding to a power value of 100A × 220V = 22000VA; the rated current of the main incoming switch is 125A, corresponding to a power value of 125A × 220V = 27500VA; the rated capacity of the upstream transformer is 200kVA, and the allocation coefficient of this electricity metering box is 0.2. Therefore, the upper limit of the transformer's allocated capacity is 200kVA × 0.2 = 40kVA, or 40000VA. The electricity metering box takes the minimum value of these three, and the preset safe capacity of the main incoming line is 22000VA.
[0058] Furthermore, the difference between the total incoming line safety capacity and the total non-adjustable base load is used as the flexible adjustable power pool for the current time period. The flexible adjustable power pool represents the remaining power resources available for flexible allocation among the circuits within the current time period after deducting the base load that each circuit must guarantee. During the allocation process, it must be ensured that the real-time total power of the total incoming line circuits does not exceed the total incoming line safety capacity.
[0059] When the total non-adjustable base load is less than or equal to the total incoming line safety capacity, the flexible adjustable power pool is greater than or equal to zero, and the subsequent power allocation process is executed normally. When the total non-adjustable base load is greater than the total incoming line safety capacity, the flexible adjustable power pool is negative, indicating that the sum of the base load demands of each power circuit has exceeded the carrying capacity of the total incoming line circuit. At this time, the power metering box sets the flexible adjustable power pool to zero, no longer executes the subsequent multi-level adaptive allocation, and reduces the allocated power of the lowest priority power circuit in order of flexible allocation priority from low to high, until the total allocated power does not exceed the total incoming line safety capacity, and at the same time issues an alarm signal.
[0060] For example, continuing with the previous calculations, the total incoming line safety capacity is 22000VA, and the total non-adjustable base load of the three charging pile circuits is 1250VA. Therefore, the flexible adjustable power pool for the current period is 22000VA - 1250VA = 20750VA, which is the total flexible power space available for the three charging piles to allocate during the current data collection period.
[0061] It should be noted that the above values are for illustrative purposes only and do not constitute a limitation on the present invention.
[0062] In summary, this step enables the power metering box to accurately quantify the remaining power available for flexible allocation in the current period, while ensuring that the basic power consumption of each power circuit is not affected. This provides a clear resource boundary for subsequent power allocation and ensures that the allocation process is always subject to the hard constraint that the main incoming line is not overloaded.
[0063] S40: Calculate the flexible allocation priority of each power circuit based on the current power demand of each power circuit.
[0064] This step obtains the required amount of electricity to fully charge, the remaining available charging time, and the maximum acceptable charging power of the adjustable power terminals connected to each power circuit. It then calculates the ratio of the average charging power to the maximum acceptable charging power as a demand urgency coefficient and sorts the circuits from largest to smallest according to this coefficient to determine the priority of flexible allocation for each circuit.
[0065] Step S40 in the method provided by this invention includes: Obtain the amount of power required to fully charge and the remaining available charging time for each power circuit connected to the adjustable power terminal in the current time period. Divide the amount of power required to fully charge by the remaining available charging time to obtain the average charging power required for each power circuit connected to the adjustable power terminal in the current time period. The maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the current time period is obtained. The average charging power required by the adjustable power terminals connected to each power circuit in the current time period is divided by the maximum acceptable charging power to obtain the demand urgency coefficient of each power circuit. The value range of the demand urgency coefficient is 0 to 1. The priority of flexible allocation for each power circuit is determined according to the order of the urgency coefficient of each power circuit from large to small. The power circuit with the larger the urgency coefficient has the higher the priority of flexible allocation.
[0066] Specifically, for each power circuit, the required charge and remaining available charging time for the adjustable-power terminal connected to that circuit are obtained during the current time period. The required charge, measured in kWh, is the amount of electricity needed to charge the adjustable-power terminal from its current charge level to the target charge level. It is calculated based on the terminal's current charge level, target charge level, available battery capacity, and charging efficiency. The remaining available charging time is the difference between the expected departure time and the current time, measured in hours. It is calculated and reported by the adjustable-power terminal after the user pre-sets the expected departure time via the terminal. Dividing the required charge by the remaining available charging time yields the average charging power required by the adjustable-power terminal during the current time period, measured in kVA. This represents the power required to precisely achieve the charging target within that time period if charged at a constant power.
[0067] The specific calculation method for the required amount of electricity to fully charge is as follows: Required amount of electricity to fully charge = (Target amount of electricity - Current amount of electricity) × Available battery capacity / Charging efficiency; where the target amount of electricity is set by the user through the terminal or determined by the adjustable power terminal according to the default full charge strategy. The current amount of electricity, available battery capacity, and charging efficiency are reported by the adjustable power terminal to the control unit of the power metering box through the communication interface. When the adjustable power terminal does not report the charging efficiency, the preset efficiency value is used by default. The preset efficiency value is set according to the typical charging efficiency of this type of terminal.
[0068] For example, continuing the previous scenario, the electricity metering box is connected to three power circuits. Currently, the charging station connected to power circuit 1 has a current power level of 10kWh, a target power level of 30kWh, a usable battery capacity of 1, and a charging efficiency of 1. Therefore, the required power to fully charge is (30kWh - 10kWh) × 1 / 1 = 20kWh. The user's expected departure time is 4 hours, and the remaining available charging time is 4 hours. Therefore, the average charging power required for power circuit 1 is 20kWh / 4h = 5kVA. The charging station connected to power circuit 2 requires 30kWh to fully charge, has a remaining available charging time of 6 hours, and the average charging power is 30kWh / 6h = 5kVA. The charging station connected to power circuit 3 requires 25kWh to fully charge, has a remaining available charging time of 2 hours, and the average charging power is 25kWh / 2h = 12.5kVA.
[0069] Furthermore, the maximum acceptable charging power of the adjustable-power electrical terminals connected to each power circuit is obtained during the current time period. The maximum acceptable charging power is determined by the smaller of the rated power of the adjustable-power electrical terminal and the maximum charging power allowed by its own operating state. The adjustable-power electrical terminals report this power to the energy metering box. When an adjustable-power electrical terminal does not report its maximum allowable power, its rated power is used as the default maximum acceptable power.
[0070] The calculated average power is divided by the maximum acceptable power to obtain the demand urgency coefficient for each power circuit. When the average power is less than or equal to the maximum acceptable power, the demand urgency coefficient is a value between 0 and 1, with a higher value indicating a more urgent demand for the power circuit in the current time period. When the average power is greater than the maximum acceptable power, it means that the power circuit cannot complete the expected task within the available time even if it operates at the maximum acceptable power. In this case, the demand urgency coefficient is set to 1, and the circuit is marked as incomplete. For power circuits marked as incomplete, they are still treated with the highest priority in subsequent power allocation, but the energy metering box simultaneously sends a prompt message to the adjustable power terminal or user terminal connected to the power circuit. The message includes an explanation that the expected task cannot be completed within the available time under the current power constraint, and a suggestion to renegotiate the target energy amount or extend the available time.
[0071] For example, charging pile #1 has a maximum acceptable charging power of 20kVA, and its demand urgency coefficient is 5kVA / 20kVA = 0.25; charging pile #2 has a maximum acceptable charging power of 15kVA, and its demand urgency coefficient is 5kVA / 15kVA ≈ 0.33; charging pile #3 has a maximum acceptable charging power of 25kVA, and its demand urgency coefficient is 12.5kVA / 25kVA = 0.50. Charging pile #3 has the highest demand urgency coefficient, reflecting its shortest remaining charging time and most urgent task. If the maximum acceptable power of circuit #3 is 10kVA, while the required average power is 12.5kVA, the ratio 1.25 exceeds 1, and the demand urgency coefficient is truncated to 1. This circuit is marked as unachievable, and the electricity metering box sends an unachievable warning message to circuit #3, suggesting renegotiation of the target power or extension of the available time.
[0072] Finally, the priority of flexible allocation for each power circuit is determined according to the order of demand urgency coefficients from largest to smallest. The higher the demand urgency coefficient, the higher the priority of flexible allocation. When two circuits have the same demand urgency coefficient, the remaining available charging time can be compared, and the circuit with the shorter remaining available charging time has a higher priority.
[0073] For example, the urgency coefficients of the three charging station circuits are ranked as follows: Charging station 3 0.50 > Charging station 2 0.33 > Charging station 1 0.25. Therefore, the priority of flexible allocation from high to low is: Charging station circuit 3, Charging station circuit 2, and Charging station circuit 1. In subsequent power allocation, charging station 3 will receive priority power resources to ensure that it can complete charging within the remaining time.
[0074] It should be noted that the above values are for illustrative purposes only and do not constitute a limitation on the present invention.
[0075] In summary, this step enables the power metering box to accurately identify the power circuits with the most urgent charging needs, prioritizing the charging needs of vehicles with urgent needs when power resources are limited, and avoiding situations where some vehicles cannot complete charging before their expected departure due to improper power allocation.
[0076] S50: Under the constraint of the flexible adjustable power pool, the flexible adjustable power pool is adaptively adjusted in multiple levels according to the flexible adjustment priority to generate the target allocation power for each power circuit, and the target allocation power is sent to each power circuit.
[0077] like Figure 2 As shown, this step first sets the initial allocated power of each circuit as an unadjustable base load and the flexible adjustable power pool as the remaining power to be allocated. Then, the demand urgency coefficient, maximum acceptable charging power and remaining power to be allocated of each circuit are input into the pre-trained watershed multi-level gating allocation network. Multiple cascaded allocation gates in the network calculate the gating weights and allocate power step by step. Finally, the target allocated power of each circuit is output and sent out for execution.
[0078] Step S50 in the method provided by the present invention includes: The initial power allocation of each power circuit is set as the non-adjustable base load of each power circuit, and the flexible adjustable power pool is used as the remaining power to be adjusted. The urgency coefficient of each power circuit, the maximum acceptable charging power of each power circuit, and the remaining power to be allocated are input into a pre-trained watershed multi-level gating distribution network. The watershed multi-level gating distribution network then performs power allocation step by step through multiple cascaded distribution gates, and outputs the target allocation power for each power circuit.
[0079] Specifically, the initial power allocation for each power circuit is first set as the non-adjustable base load of each circuit, while the entire capacity of the flexible adjustable power pool is used as the remaining power to be allocated. The initial power allocation ensures the basic power demand of each circuit, and the remaining power to be allocated is the total power resource available for flexible allocation in the future.
[0080] For example, continuing the previous scenario, the electricity metering box is connected to three power circuits. The non-adjustable base loads of each circuit are 500VA for circuit 1, 400VA for circuit 2, and 350VA for circuit 3. The electricity metering box sets these three values as the initial power allocation for each circuit. The flexible adjustable power pool is 20750VA, and the initial value of the remaining power to be allocated is 20750VA.
[0081] Furthermore, the urgency coefficient of each power circuit, the maximum acceptable charging power of each power circuit, and the current remaining power to be allocated are used as input parameters and fed into the pre-trained watershed-type multi-level gating distribution network.
[0082] In this step, the watershed-type multi-level gated distribution network includes M cascaded distribution gates. In each distribution gate, the following operations are performed: Obtain the current cumulative allocated power and the current remaining power to be allocated of each power circuit output by the previous level allocation gate. The current cumulative allocated power of each power circuit obtained by the first allocation gate is the non-adjustable base load of each power circuit, and the current remaining power to be allocated obtained by the first allocation gate is the flexible adjustable power pool. Calculate the remaining acceptable capacity of each power circuit based on the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the current time period and the current cumulative allocated power of each power circuit. Based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, the gate control weight of each power circuit in the current allocation gate is calculated. The gate control weight is positively correlated with the demand urgency coefficient of each power circuit, and the gate control weight of any power circuit is zero when the remaining acceptable capacity of any power circuit is zero. Using the current remaining power to be allocated at the current allocation gate as the input power of the current allocation gate, the input power is allocated among the power consumption circuits according to the gate control weight of each power consumption circuit, so as to obtain the power allocation increment of each power consumption circuit at the current allocation gate. Add the power increment of each power circuit in the current allocation gate to the current cumulative power of each power circuit to update the current cumulative power of each power circuit. Subtract the sum of the power increments of all power circuits from the input power to update the current remaining power to be allocated. Output the updated current cumulative power and the updated current remaining power to be allocated to the next level allocation gate. When all M allocation gates have been traversed or the current remaining power to be allocated is zero, the current cumulative allocation power of each power circuit is taken as the target allocation power of each power circuit.
[0083] Specifically, the watershed-type multi-level gating distribution network contains M cascaded distribution gates, where the value of M is determined based on the total number of power circuits N. When M equals N, it ensures that each circuit is the primary distribution target in at least one distribution gate, and the distribution gates are triggered sequentially according to their flexible allocation priority from high to low. M can also be set to a value less than N to reduce computational overhead; in this case, multiple circuits with lower priority will be processed together in the same distribution gate.
[0084] In each allocation gate, the current cumulative allocated power and the current remaining power to be allocated for each power circuit output from the previous allocation gate are first obtained. For the first allocation gate, the current cumulative allocated power for each power circuit is initialized to the non-adjustable base load of each power circuit, and the current remaining power to be allocated is initialized to the full capacity of the flexible adjustable power pool.
[0085] For example, taking a charging scenario in a public parking area of an older residential community as an example, the number of power circuits N=3, and M is 3, meaning the allocation network contains 3 cascaded allocation gates. The flexible allocation priority, from high to low, is charging pile circuits 3, 2, and 1, and the allocation gates are triggered sequentially in this order. The input parameters for the first allocation gate are: the current cumulative allocated power of charging pile 1 is 500VA, charging pile 2 is 400VA, and charging pile 3 is 350VA; the current remaining power to be allocated is 20750VA.
[0086] Next, based on the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the current time period and the current cumulative allocated power of each power circuit, the remaining acceptable capacity of each power circuit is calculated. Remaining acceptable capacity = maximum acceptable charging power - current cumulative allocated power, representing the upper limit of power that the circuit can continue to receive in the current allocation gate. If the remaining acceptable capacity is less than or equal to zero, the circuit will no longer participate in allocation in this level of allocation gate.
[0087] For example, taking the first-level power distribution gate as an example, the maximum acceptable charging power of the three charging piles are: No. 1 20kVA, No. 2 15kVA, and No. 3 25kVA. The remaining acceptable capacity of each circuit is calculated as follows: Circuit 1: 20000VA - 500VA = 19500VA; Circuit 2: 15000VA - 400VA = 14600VA; Circuit 3: 25000VA - 350VA = 24650VA. All three circuits have remaining acceptable capacity and can participate in the power distribution of this level.
[0088] Furthermore, based on the demand urgency coefficient and remaining acceptable capacity of each power circuit, the gating weight of each power circuit in the current allocation gate is calculated. The gating weight is positively correlated with the demand urgency coefficient, and when the remaining acceptable capacity of any power circuit is less than or equal to zero, the gating weight of that circuit is zero.
[0089] In this step, based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, the gating weight of each power circuit in the current allocation gate is calculated, including: The demand urgency coefficient of each power circuit is multiplied by the remaining acceptable capacity of each power circuit to obtain the initial gate signal of each power circuit. When the remaining acceptable capacity of any power circuit is zero, the initial gate signal of that power circuit is zero. The initial gating signals of all power circuits are normalized so that the sum of the initial gating signals of all power circuits is 1, thus obtaining the gating weight of each power circuit.
[0090] Specifically, the demand urgency coefficient of each power circuit is multiplied by the remaining acceptable capacity of each power circuit to obtain the initial gating signal of each power circuit. When the remaining acceptable capacity of any power circuit is zero, the initial gating signal of that circuit is directly set to zero, and that circuit no longer participates in power distribution in this level of distribution gate.
[0091] For example, in the first-level allocation gate, the demand urgency coefficients and remaining acceptable capacity of the three loops are as follows: Loop 1: Demand urgency coefficient 0.25, remaining acceptable capacity 19500VA; Loop 2: Demand urgency coefficient 0.33, remaining acceptable capacity 14600VA; Loop 3: Demand urgency coefficient 0.50, remaining acceptable capacity 24650VA. The initial gating signal calculation is: Loop 1: 0.25 × 19500 = 4875; Loop 2: 0.33 × 14600 = 4818; Loop 3: 0.50 × 24650 = 12325. All three loops have remaining acceptable capacity and receive an initial gating signal greater than zero. Loop 3, due to its highest demand urgency and largest acceptable capacity, has a significantly higher initial gating signal than the other loops.
[0092] Furthermore, the initial gating signals of all power circuits are normalized so that the sum of the initial gating signals of all circuits is 1, thus obtaining the gating weight of each power circuit. The normalization method is: gating weight of each circuit = initial gating signal of that circuit / sum of initial gating signals of all circuits. The gating weight represents the proportion of power allocation that each circuit should receive in this level of allocation. The larger the gating weight, the higher the share of power that circuit receives in this level of allocation.
[0093] For example, the sum of the initial gating signals for the three circuits is 4875 + 4818 + 12325 = 22018. After normalization, the gating weights for each circuit are as follows: Circuit 1 gating weight = 4875 ÷ 22018 ≈ 0.221; Circuit 2 gating weight = 4818 ÷ 22018 ≈ 0.219; Circuit 3 gating weight = 12325 ÷ 22018 ≈ 0.560, and the sum of the three gating weights is 1. The gating weight of charging pile 3 is 0.560, meaning it receives approximately 56.0% of the power share in this allocation; circuits 1 and 2 receive approximately 22.1% and 21.9% of the power share, respectively. These results reflect the principle of prioritizing power allocation for circuits with high demand urgency and large remaining acceptable capacity.
[0094] Furthermore, using the current remaining power to be allocated at the current allocation gate as the input power, the input power is distributed among the power consumption circuits according to the gating weights of each circuit, resulting in the power allocation increment for each circuit at the current allocation gate. The allocation method is: power allocation increment for each circuit = input power × gating weight of that circuit. The power allocation increment for each circuit is added to the current cumulative allocated power to update the current cumulative allocated power; the sum of the power allocation increments for all circuits is subtracted from the input power to update the current remaining power to be allocated. The updated parameters are then output to the next level allocation gate.
[0095] For example, the input power of the first-level distribution gate is 20750VA. According to the gate weight, the power allocation increment for loop 3 is approximately 11615VA (20750VA × (12325 ÷ 22018)); for loop 2, it is approximately 4541VA (20750VA × (4818 ÷ 22018)); and for loop 1, it is approximately 4594VA (20750VA × (4875 ÷ 22018)). The current cumulative power allocation for each loop is updated as follows: Lot 3: 350VA + 11615VA = 11965VA; Lot 2: 400VA + 4541VA = 4941VA; Lot 1: 500VA + 4594VA = 5094VA. The current remaining power to be allocated is updated to 20750VA - (11615VA + 4541VA + 4594VA) = 0VA. Since the remaining power to be allocated is now zero, the traversal termination condition is met, and the next level allocation gate will not be entered.
[0096] Finally, when all M allocation gates have been traversed or the remaining power to be allocated is zero, the current cumulative allocated power of each power circuit is output as the target allocated power for that circuit, and the target allocated power is sent to each power circuit. Upon receiving the target allocated power, each adjustable power terminal adjusts its actual charging power to the value closest to the target allocated power within its own adjustment capability. If the actual charging power is lower than the target allocated power due to limitations in the vehicle battery charging curve or the adjustment accuracy of the adjustable power terminal, the actual power consumption of that circuit will be lower than the allocated value. The unused power portion will be reintegrated into the flexible adjustable power pool for allocation in the next data collection cycle, preventing power resource waste.
[0097] For example, after the first-level allocation gate is completed, the remaining power to be allocated is zero, and the allocation process terminates. The target allocation power for each circuit is: 11965VA for charging pile No. 3, 4941VA for charging pile No. 2, and 5094VA for charging pile No. 1. The sum of these three is 11965VA + 4941VA + 5094VA = 22000VA, which is exactly equal to the total safe capacity of the incoming line. Each charging pile adjusts its actual charging power according to the target allocation power. Charging pile No. 3, due to its highest urgency, receives the maximum share of power, ensuring that it can complete its charging task within the remaining time. If charging pile No. 3's actual charging power only reaches 11000VA because the vehicle battery is close to full charge, which is lower than the target allocation power of 11965VA, the unused 965VA will be released back into the flexible adjustable power pool for redistribution in the next data collection cycle.
[0098] In this step, the pre-training process of the watershed-type multi-level gating assignment network includes: Historical allocation data is collected. Each historical allocation data includes the demand urgency coefficient of each power circuit in the historical collection period, the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the historical collection period, the remaining power to be allocated in the historical collection period, and the corresponding optimal allocation scheme. The optimal allocation scheme is obtained by offline multi-objective optimization. The optimization objectives are to minimize the total charging completion time of all power circuits and the total power reduction of all power circuits. An initial watershed-type multi-level gated distribution network is constructed, which includes M cascaded distribution gates. Each distribution gate calculates the gate weight of each power circuit in the current distribution gate based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, and distributes the input power among the power circuits according to the gate weight. The optimal allocation scheme is decomposed into M-level step-by-step allocation schemes according to the allocation logic of M allocation gates. Each level of step-by-step allocation scheme includes the power allocation increment of each power circuit corresponding to that level of allocation gate. Using the demand urgency coefficient of each power circuit in the historical data collection period, the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the historical data collection period, and the remaining power to be allocated in the historical data collection period as model inputs, and the M-level step-by-step allocation scheme as the supervision label, the initial watershed multi-level gated allocation network is trained in a supervised manner until it is verified to converge, thus obtaining the pre-trained watershed multi-level gated allocation network.
[0099] Specifically, the allocation data from multiple historical data collection periods is first collected. Each data entry contains three input parameters and the corresponding optimal allocation scheme. The three input parameters are: the demand urgency coefficient of each power circuit in the historical data collection period, the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the historical data collection period, and the remaining power to be allocated in the historical data collection period.
[0100] The optimal allocation scheme is obtained through offline multi-objective optimization. The optimization objectives are to minimize the total charging completion time of all power circuits and to minimize the total power reduction of all power circuits. Minimizing the total charging completion time requires prioritizing the allocation of power resources to circuits with urgent charging times, so that the sum of the total charging times of all adjustable power terminals is as short as possible. Minimizing the total power reduction requires prioritizing the reduction of power in non-urgent circuits when the power pool cannot meet the needs of all circuits, so that the sum of the total power reduction is as small as possible.
[0101] The specific implementation method for offline multi-objective optimization is as follows: the multi-objective optimization problem is transformed into an optimization problem with minimizing the total power reduction as the single optimization objective through a constraint method, and the total charging completion time requirement is transformed into a constraint condition. Specifically, the optimization objective is to minimize the sum of the adjustable power reduction of all loops; the total power constraint is that the sum of the adjustable power allocation of all loops does not exceed the remaining power to be allocated; the loop power constraint is that the adjustable power allocation of each loop is not less than zero and does not exceed the remaining acceptable capacity of that loop; and the charging time constraint is that the charging completion time achievable by each loop after allocation does not exceed its remaining available charging time. Here, the charging completion time of each loop = required power / (unadjustable base load + adjustable power allocation). The total allocated power of all loops is equal to the sum of the unadjustable base load and the adjustable power allocation.
[0102] Under the premise of satisfying the above constraints, a linear programming solver or a nonlinear programming solver is used to solve the problem. When the charging completion time and the allocated power are inversely related in the charging time constraint, the constraint is a nonlinear constraint and can be solved using nonlinear programming methods such as sequential quadratic programming or interior-point methods. If the charging time constraint is transformed into a linear constraint, for example, by dividing the required amount of electricity by the upper limit of the charging completion time to obtain the minimum allocated power requirement, which serves as the lower limit of the loop power constraint, then the problem can be transformed into a linear programming problem and solved using a linear programming solver. The solution yields the optimal adjustable power allocation scheme that minimizes the total amount of electricity reduced and ensures that each loop meets the charging time requirement.
[0103] If there is no feasible solution under the given constraints, it means that the current power pool cannot meet the charging time requirements of all loops. In this case, the optimization objective is to minimize the total charging completion time excess, allowing the charging completion time of some loops to exceed the available time, thus obtaining an allocation scheme that minimizes the total excess time.
[0104] For example, taking the charging scenario in the public parking area of an old residential community as an example, a certain historical data collection period is selected as the training sample collection point. The data for this period is as follows: the demand urgency coefficients of the three charging pile circuits are: No. 3 0.50, No. 2 0.33, and No. 1 0.25. The maximum acceptable charging power is: No. 3 25kVA, No. 2 15kVA, and No. 1 20kVA. The remaining power to be allocated is 20750VA, and the non-adjustable base load of each circuit is: No. 3 350VA, No. 2 400VA, and No. 1 500VA. Taking the adjustable power allocation of the three circuits as the decision variable, and minimizing the total adjustable power reduction as the optimization objective, the constraints are: the sum of the adjustable power allocation of the three circuits does not exceed 20750VA; the adjustable power allocation of each circuit is not less than zero and does not exceed the remaining acceptable capacity of that circuit; the charging completion time of each circuit does not exceed its remaining available charging time. After converting the charging time constraint into a minimum power allocation requirement, a linear programming solver is used to solve it, and the optimal adjustable power allocation scheme is obtained. The optimal adjustable power allocation of each loop is the corresponding value, which is used as the supervision label for this historical data.
[0105] Secondly, an initial watershed-type multi-level gated power distribution network is constructed, consisting of M cascaded distribution gates. Each distribution gate calculates the gating weight of each power circuit based on its demand urgency coefficient and remaining acceptable capacity, and then distributes the input power among the power circuits according to these gating weights. The value of M is equal to the total number of power circuits N.
[0106] For example, with N=3 power circuits and M=3, an initial network containing 3 cascaded distribution gates is constructed. The network structure is as follows: the first-level distribution gate receives the initial parameters and outputs the first-level distribution result and the updated remaining power to be allocated; the second-level distribution gate receives the first-level output and continues distribution; the third level is similar. The learnable parameters in the network are the calculated parameters of the gating weights in each distribution gate, with initial values set randomly.
[0107] Next, the optimal allocation scheme corresponding to each historical allocation data point is decomposed into M-level step-by-step allocation schemes according to the allocation logic of M allocation gates. Each level of step-by-step allocation scheme includes the power allocation increment of each power circuit corresponding to that level of allocation gate.
[0108] The decomposition method is as follows: Following the actual gating weight calculation logic executed by each level of the allocation gate, the power allocation process of each level of the allocation gate is simulated, and the power allocation increment of each loop in that level of allocation gate is calculated step by step. Taking the total allocated power of each loop in the optimal allocation scheme as the objective, a simulated M-level allocation process is constructed. Based on the final allocated power of each loop in the optimal scheme, the power allocation increment of each loop in each level of allocation gate is inversely calculated, ensuring that the sum of the power allocation increments of each loop in each level of allocation gate equals the total allocated power of that loop in the optimal scheme. Each step-by-step allocation scheme includes the power allocation increment of all loops in that level, consistent with the operational logic in a gating network where each allocation gate can simultaneously allocate power to multiple loops.
[0109] For example, in the optimal allocation scheme, the total adjustable power of circuit 3 is 11615VA, the total adjustable power of circuit 2 is 4541VA, and the total adjustable power of circuit 1 is 4594VA. Simulating a three-level allocation process (M=3), with the remaining power to be allocated (20750VA) as the initial input, the allocation is simulated according to the gating weight calculation logic of each level of allocation gate, resulting in a three-level step-by-step allocation scheme: First-level step-by-step allocation scheme: Power increment for circuit 3 is 11615VA, for circuit 2 it is 4541VA, and for circuit 1 it is 4594VA. After the first-level allocation, the remaining power to be allocated = 20750VA - (11615VA + 4541VA + 4594VA) = 0VA; Second-level step-by-step allocation scheme: Since the remaining power to be allocated after the first level is 0, the power increments for all three circuits are 0VA; Third-level step-by-step allocation scheme: The power increments for all three circuits are 0VA. The decomposition results are consistent with the actual operating logic of the distribution gates at each level of the gating network, serving as the monitoring labels for each of the three levels of distribution gates.
[0110] Finally, using the demand urgency coefficient of each power circuit in the historical data collection period, the maximum acceptable charging power of the adjustable-power terminals connected to each power circuit in the historical data collection period, and the remaining power to be allocated as model inputs, and the M-level step-by-step allocation scheme as the supervision label, the initial watershed-type multi-level gated allocation network was trained in a supervised manner. During training, the network calculated the gating weights of each allocation gate step by step according to the input parameters and output the allocation results. The output results were compared with the supervision labels, and the mean squared error loss function was used to calculate the loss. After calculating the loss, the network parameters were updated through backpropagation, and the training was repeated until convergence was verified.
[0111] The mean squared error loss (MSE) penalizes larger deviations more severely, which helps the network learn more accurate power allocation. When prioritizing the allocation accuracy of high-priority loops, different loss weights can be assigned to loops of different priorities within the MSE, with higher-priority loops receiving greater weights. The example uses standard MSE, with all loops receiving the same loss weight.
[0112] The convergence criterion is as follows: in K consecutive training epochs, the decrease in the loss value on the validation set is less than a preset threshold. K ranges from 5 to 10, and the preset threshold ranges from 0.1% to 1% of the current validation loss. In this example, K is 5, and the preset threshold is 0.5%. That is, when the decrease in the validation loss is less than 0.5% for 5 consecutive training epochs, convergence is determined, training is stopped, and the pre-trained watershed multi-level gating assignment network is obtained.
[0113] For example, the demand urgency coefficients for historical data collection cycles (0.50 for No. 3, 0.33 for No. 2, and 0.25 for No. 1), the maximum acceptable charging power (25kVA for No. 3, 15kVA for No. 2, and 20kVA for No. 1), and the remaining power to be allocated (20750VA) are used as inputs to a training sample. The aforementioned three-level step-by-step allocation scheme is used as the supervision label, and the inputs are used to train the initial network. The network outputs the power allocation increment for each allocation gate, and the mean squared error loss is calculated with the supervision label. This training process is repeated using multiple sets of historical data. After each training round, the loss is evaluated on the validation set. When the loss decreases by less than 0.5% for five consecutive training rounds, convergence is determined, and training is stopped, resulting in a pre-trained watershed-type multi-level gated allocation network. This network can then be directly used for real-time power allocation.
[0114] Finally, by inputting the demand urgency coefficient of each power circuit, the maximum acceptable charging power of each power circuit, and the remaining power to be allocated into the pre-trained watershed multi-level gating allocation network, the network calculates the gating weights and allocates the power level by level through multiple cascaded allocation gates, and finally outputs the target allocation power of each circuit.
[0115] For example, taking a charging scenario in a public parking area of an old residential community, the demand urgency coefficients of the three charging pile circuits are 0.50 for No. 3, 0.33 for No. 2, and 0.25 for No. 1. The maximum acceptable charging power is 25kVA for No. 3, 15kVA for No. 2, and 20kVA for No. 1, with a remaining power to be allocated of 20750VA. The non-adjustable base loads of each circuit are 350VA for No. 3, 400VA for No. 2, and 500VA for No. 1, which serve as the initial values for the current cumulative allocated power of each circuit. The demand urgency coefficients, maximum acceptable charging power, and remaining power to be allocated are input into a pre-trained watershed-type multi-level gated allocation network, M=3. The first allocation gate in the network obtains the initial value of the current cumulative allocated power of each circuit and then performs hierarchical allocation. After hierarchical allocation, the network outputs the target allocated power of each circuit: 11965VA for charging pile No. 3, 4941VA for charging pile No. 2, and 5094VA for charging pile No. 1, with a sum of 22000VA, which is equal to the total safe capacity of the incoming line. Charging station No. 3 received the maximum power share due to its highest urgency, enabling it to complete the charging task first within the remaining time.
[0116] It should be noted that the above values are for illustrative purposes only and do not constitute a limitation on the present invention.
[0117] In summary, this step enables the power metering box to achieve refined and adaptive power allocation under the constraint of total incoming line safety capacity through a pre-trained watershed-type multi-level gating distribution network, prioritizing the needs of circuits with urgent charging tasks.
[0118] S60: Repeat steps S10 to S50 in the next acquisition cycle.
[0119] In this step, after the power allocation for the current acquisition cycle is completed, steps S10 to S50 are re-executed when the next acquisition cycle arrives. When re-executing S10, the number of currently connected power circuits is first detected. If a new circuit is detected, its historical power data is initialized to the historical average value of similar charging piles during that period. The initial non-adjustable base load is taken as the default base load value of similar charging piles, and subsequent acquisition cycles gradually accumulate the circuit's own historical data. If a circuit is detected as disconnected, it is removed from the power allocation list, and its originally occupied power quota is automatically released back to the flexible adjustable power pool. Through periodic execution, changes in the charging status of each charging pile, the number of circuits, and the total incoming load are continuously sensed, dynamically adjusting the power allocation scheme to form a closed-loop adaptive control.
[0120] For example, in a charging scenario in a public parking area of an older residential community, the power metering box has completed the power allocation and execution for each power circuit in the current data collection cycle, i.e., the Nth cycle. 15 seconds later, at the start of the N+1th data collection cycle, the power metering box re-executes the entire allocation process. In the N+1th cycle, in addition to the original three power circuits, a new power circuit (number 4) is added to the system. The power metering box detects the change from 3 to 4 power circuits and initializes the historical power data of power circuit 4 to the historical average value of similar charging piles during that time period. The initial non-adjustable base load is set to the default base load value of 300VA for similar charging piles. The default base load value is preset based on empirical values of standby power consumption and communication module power consumption of similar charging piles in the same scenario; in this example, it is set to 300VA. The M value of the allocation network is updated from 3 to 4. Since the pre-trained network has learned the general parameters for gating weight calculation during training, when the M value changes, the network adds a fourth-level allocation gate according to the same gating weight calculation logic. The learnable parameters of the new allocation gate are taken as the weighted average of the parameters of the existing allocation gates adjacent to the priority of the No. 4 power circuit in the pre-trained network. If the priority of the No. 4 power circuit is the lowest, the parameter of the last-level allocation gate is taken as the default initial value; if the priority of the No. 4 power circuit is the highest, the parameter of the first-level allocation gate is taken as the default initial value; if the priority of the No. 4 power circuit is in the middle position, the average of the parameters of the two levels of allocation gates is taken. Fine-tuning can be made according to the actual allocation effect during subsequent online operation. The power metering box incorporates the No. 4 power circuit into the calculation and allocation of subsequent steps to generate a target allocation power scheme containing four power circuits.
[0121] It should be noted that the above values are for illustrative purposes only and do not constitute a limitation on the present invention.
[0122] In summary, this step enables the power metering box to continuously sense changes in charging status and the number of circuits, dynamically updating the power allocation scheme in each cycle to ensure that the allocation strategy is always synchronized with real-time charging demand, avoiding the failure of the allocation scheme due to the progress of charging or vehicle disconnection.
[0123] In summary, this invention achieves dynamic adaptive allocation of power for multiple power circuits, enabling the power metering box to prioritize the needs of power circuits with urgent charging tasks while ensuring that the basic power consumption of each power circuit is not affected. It maximizes charging efficiency under the constraint that the total incoming line is not overloaded, and maintains the real-time performance and adaptability of the allocation strategy through periodic cycles.
[0124] Example 2, as Figure 3 As shown, the present invention provides an electricity metering box, comprising: The data synchronization acquisition module 11 is used to synchronously acquire the real-time power of each power circuit according to a preset acquisition cycle through the power metering unit of each power circuit, and to obtain the real-time total power of the main incoming circuit.
[0125] Specifically, the real-time power of each power circuit is synchronously collected by the power metering unit of each power circuit according to a preset collection cycle, and the real-time total power of the main incoming circuit is obtained, including: The real-time voltage and real-time current of each power circuit are synchronously collected at the beginning of each preset collection cycle through the power metering unit configured in each power circuit. The real-time power of each power circuit is obtained by multiplying the real-time voltage and real-time current of each power circuit. The real-time total power of the main incoming line circuit is obtained by summing the real-time power of each power circuit.
[0126] The load characteristic analysis module 12 is used to distinguish the non-adjustable base load and adjustable load of each power circuit in the current period based on the historical power consumption data of each power circuit, and to take the sum of the non-adjustable base load of each power circuit as the total non-adjustable base load.
[0127] Specifically, based on historical electricity consumption data for each power circuit, the non-adjustable base load and adjustable load of each power circuit in the current time period are distinguished. The sum of the non-adjustable base loads of all power circuits is taken as the total non-adjustable base load, including: Obtain the historical power sequence of each power circuit within the same historical period of the same type. The same historical period of the same type refers to the period within a preset number of days in the past that has the same date type and the same time period as the current period. The date type includes at least weekdays, weekends and holidays. For each power circuit, the corresponding historical power sequence is sorted in ascending order of value, and the power value corresponding to the preset quantile is taken as the lower power envelope of the power circuit. The lower power envelope is taken as the non-adjustable base load of the power circuit. The preset quantile ranges from 5% to 15%. The electrical loads in each electrical circuit, excluding the aforementioned non-adjustable basic loads, are considered as the adjustable loads of each electrical circuit. The total non-adjustable base load is obtained by summing the non-adjustable base loads of each power circuit.
[0128] The adjustable resource pool construction module 13 is used to subtract the total non-adjustable basic load from the preset total incoming line safety capacity to obtain the flexible adjustable power pool for the current time period.
[0129] The flexible adjustable power pool for the current time period is obtained by subtracting the total non-adjustable base load from the preset total incoming line safety capacity, including: The maximum safe power allowed to be carried by the total incoming line circuit is taken as the preset total incoming line safe capacity; The difference between the total incoming line safety capacity and the total non-adjustable base load is used as the flexible adjustable power pool for the current time period.
[0130] The allocation priority calculation module 14 is used to calculate the flexible allocation priority of each power circuit based on the current power demand of each power circuit.
[0131] This includes calculating the flexible allocation priority of each power circuit based on its current power demand, including: Obtain the amount of power required to fully charge and the remaining available charging time for each power circuit connected to the adjustable power terminal in the current time period. Divide the amount of power required to fully charge by the remaining available charging time to obtain the average charging power required for each power circuit connected to the adjustable power terminal in the current time period. The maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the current time period is obtained. The average charging power required by the adjustable power terminals connected to each power circuit in the current time period is divided by the maximum acceptable charging power to obtain the demand urgency coefficient of each power circuit. The value range of the demand urgency coefficient is 0 to 1. The priority of flexible allocation for each power circuit is determined according to the order of the urgency coefficient of each power circuit from large to small. The power circuit with the larger the urgency coefficient has the higher the priority of flexible allocation.
[0132] The multi-level adaptive allocation module 15 is used to perform multi-level adaptive allocation of the flexible adjustable power pool according to the flexible allocation priority under the constraint of the flexible adjustable power pool, generate the target allocation power for each power circuit, and issue the target allocation power to each power circuit.
[0133] Specifically, under the constraint of the flexible adjustable power pool, multi-level adaptive allocation of the flexible adjustable power pool is performed according to the flexible allocation priority to generate the target allocation power for each power circuit, and the target allocation power is issued to each power circuit, including: The initial power allocation of each power circuit is set as the non-adjustable base load of each power circuit, and the flexible adjustable power pool is used as the remaining power to be adjusted. The urgency coefficient of each power circuit, the maximum acceptable charging power of each power circuit, and the remaining power to be allocated are input into a pre-trained watershed multi-level gating distribution network. The watershed multi-level gating distribution network then performs power allocation step by step through multiple cascaded distribution gates, and outputs the target allocation power for each power circuit.
[0134] The watershed-type multi-level gated distribution network comprises M cascaded distribution gates, and in each distribution gate, the following operations are performed: Obtain the current cumulative allocated power and the current remaining power to be allocated of each power circuit output by the previous level allocation gate. The current cumulative allocated power of each power circuit obtained by the first allocation gate is the non-adjustable base load of each power circuit, and the current remaining power to be allocated obtained by the first allocation gate is the flexible adjustable power pool. Calculate the remaining acceptable capacity of each power circuit based on the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the current time period and the current cumulative allocated power of each power circuit. Based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, the gate control weight of each power circuit in the current allocation gate is calculated. The gate control weight is positively correlated with the demand urgency coefficient of each power circuit, and the gate control weight of any power circuit is zero when the remaining acceptable capacity of any power circuit is zero. Using the current remaining power to be allocated at the current allocation gate as the input power of the current allocation gate, the input power is allocated among the power consumption circuits according to the gate control weight of each power consumption circuit, so as to obtain the power allocation increment of each power consumption circuit at the current allocation gate. Add the power increment of each power circuit in the current allocation gate to the current cumulative power of each power circuit to update the current cumulative power of each power circuit. Subtract the sum of the power increments of all power circuits from the input power to update the current remaining power to be allocated. Output the updated current cumulative power and the updated current remaining power to be allocated to the next level allocation gate. When all M allocation gates have been traversed or the current remaining power to be allocated is zero, the current cumulative allocation power of each power circuit is taken as the target allocation power of each power circuit.
[0135] Specifically, based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, the gating weight of each power circuit in the current allocation gate is calculated, including: The demand urgency coefficient of each power circuit is multiplied by the remaining acceptable capacity of each power circuit to obtain the initial gate signal of each power circuit. When the remaining acceptable capacity of any power circuit is zero, the initial gate signal of that power circuit is zero. The initial gating signals of all power circuits are normalized so that the sum of the initial gating signals of all power circuits is 1, thus obtaining the gating weight of each power circuit.
[0136] The pre-training process of a watershed-style multi-level gating assignment network includes: Historical allocation data is collected. Each historical allocation data includes the demand urgency coefficient of each power circuit in the historical collection period, the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the historical collection period, the remaining power to be allocated in the historical collection period, and the corresponding optimal allocation scheme. The optimal allocation scheme is obtained by offline multi-objective optimization. The optimization objectives are to minimize the total charging completion time of all power circuits and the total power reduction of all power circuits. An initial watershed-type multi-level gated distribution network is constructed, which includes M cascaded distribution gates. Each distribution gate calculates the gate weight of each power circuit in the current distribution gate based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, and distributes the input power among the power circuits according to the gate weight. The optimal allocation scheme is decomposed into M-level step-by-step allocation schemes according to the allocation logic of M allocation gates. Each level of step-by-step allocation scheme includes the power allocation increment of each power circuit corresponding to that level of allocation gate. Using the demand urgency coefficient of each power circuit in the historical data collection period, the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the historical data collection period, and the remaining power to be allocated in the historical data collection period as model inputs, and the M-level step-by-step allocation scheme as the supervision label, the initial watershed multi-level gated allocation network is trained in a supervised manner until it is verified to converge, thus obtaining the pre-trained watershed multi-level gated allocation network.
[0137] The dynamic cyclic control module 16 is used to re-execute the data synchronization acquisition module to the multi-level adaptive allocation module in the next acquisition cycle.
[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0139] This specification and accompanying drawings are merely illustrative examples of the invention and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its scope. Therefore, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is intended to include these modifications and modifications.
Claims
1. A flexible power adaptive allocation method for an electricity metering box, characterized in that, The electricity metering box includes a main incoming circuit and multiple power consumption circuits. Each power consumption circuit is connected to an adjustable power terminal and equipped with an electricity metering unit. The method includes: S10: Through the power metering unit of each power circuit, the real-time power of each power circuit is collected synchronously according to the preset collection cycle, and the real-time total power of the main incoming circuit is obtained. S20: Based on the historical power consumption data of each power circuit, distinguish between the non-adjustable base load and the adjustable load of each power circuit in the current period, and take the sum of the non-adjustable base load of each power circuit as the total non-adjustable base load. S30: Subtract the total non-adjustable base load from the preset total incoming line safety capacity to obtain the flexible adjustable power pool for the current time period; S40: Calculate the flexible allocation priority of each power circuit based on the current power demand of each power circuit; S50: Under the constraint of the flexible adjustable power pool, the flexible adjustable power pool is adaptively adjusted in multiple levels according to the flexible adjustment priority to generate the target allocation power for each power circuit, and the target allocation power is sent to each power circuit. S60: Repeat steps S10 to S50 in the next acquisition cycle.
2. The flexible power adaptive allocation method for an energy metering box according to claim 1, characterized in that, The real-time power of each power circuit is synchronously collected by the power metering unit of each power circuit according to a preset collection cycle, and the real-time total power of the main incoming circuit is obtained, including: The real-time voltage and real-time current of each power circuit are synchronously collected at the beginning of each preset collection cycle through the power metering unit configured in each power circuit. The real-time power of each power circuit is obtained by multiplying the real-time voltage and real-time current of each power circuit. The real-time total power of the main incoming line circuit is obtained by summing the real-time power of each power circuit.
3. The flexible power adaptive allocation method for an energy metering box according to claim 1, characterized in that, Based on historical electricity consumption data for each circuit, the non-adjustable base load and adjustable load of each circuit in the current time period are distinguished. The sum of the non-adjustable base loads of all circuits is taken as the total non-adjustable base load, including: Obtain the historical power sequence of each power circuit within the same historical period of the same type. The same historical period of the same type refers to the period within a preset number of days in the past that has the same date type and the same time period as the current period. The date type includes at least weekdays, weekends and holidays. For each power circuit, the corresponding historical power sequence is sorted in ascending order of value, and the power value corresponding to the preset quantile is taken as the lower power envelope of the power circuit. The lower power envelope is taken as the non-adjustable base load of the power circuit. The preset quantile ranges from 5% to 15%. The electrical loads in each electrical circuit, excluding the aforementioned non-adjustable basic loads, are considered as the adjustable loads of each electrical circuit. The total non-adjustable base load is obtained by summing the non-adjustable base loads of each power circuit.
4. The flexible power adaptive allocation method for an energy metering box according to claim 1, characterized in that, Subtracting the total non-adjustable base load from the preset total incoming line safety capacity yields the flexible adjustable power pool for the current time period, including: The maximum safe power that the main incoming line circuit is allowed to carry is taken as the preset total incoming line safe capacity; The difference between the total incoming line safety capacity and the total non-adjustable base load is used as the flexible adjustable power pool for the current time period.
5. The flexible power adaptive allocation method for an energy metering box according to claim 1, characterized in that, Based on the current power demand of each power circuit, calculate the flexible dispatch priority of each power circuit, including: Obtain the amount of power required to fully charge and the remaining available charging time for each power circuit connected to the adjustable power terminal in the current time period. Divide the amount of power required to fully charge by the remaining available charging time to obtain the average charging power required for each power circuit connected to the adjustable power terminal in the current time period. The maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the current time period is obtained. The average charging power required by the adjustable power terminals connected to each power circuit in the current time period is divided by the maximum acceptable charging power to obtain the demand urgency coefficient of each power circuit. The value range of the demand urgency coefficient is 0 to 1. The priority of flexible allocation for each power circuit is determined according to the order of the urgency coefficient of each power circuit from large to small. The power circuit with the larger the urgency coefficient has the higher the priority of flexible allocation.
6. The flexible power adaptive allocation method for an energy metering box according to claim 1, characterized in that, Under the constraints of the flexible adjustable power pool, the flexible adjustable power pool is adaptively allocated in multiple levels according to the flexible allocation priority to generate the target allocation power for each power circuit, and the target allocation power is issued to each power circuit, including: The initial power allocation of each power circuit is set as the non-adjustable base load of each power circuit, and the flexible adjustable power pool is used as the remaining power to be adjusted. The urgency coefficient of each power circuit, the maximum acceptable charging power of each power circuit, and the remaining power to be allocated are input into a pre-trained watershed multi-level gating distribution network. The watershed multi-level gating distribution network then performs power allocation step by step through multiple cascaded distribution gates, and outputs the target allocation power for each power circuit.
7. The flexible power adaptive allocation method for an energy metering box according to claim 6, characterized in that, The watershed-type multi-level gated distribution network comprises M cascaded distribution gates. In each distribution gate, the following operations are performed: Obtain the current cumulative allocated power and the current remaining power to be allocated of each power circuit output by the previous level allocation gate. The current cumulative allocated power of each power circuit obtained by the first allocation gate is the non-adjustable base load of each power circuit, and the current remaining power to be allocated obtained by the first allocation gate is the flexible adjustable power pool. Calculate the remaining acceptable capacity of each power circuit based on the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the current time period and the current cumulative allocated power of each power circuit. Based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, the gate control weight of each power circuit in the current allocation gate is calculated. The gate control weight is positively correlated with the demand urgency coefficient of each power circuit, and the gate control weight of any power circuit is zero when the remaining acceptable capacity of any power circuit is zero. Using the current remaining power to be allocated at the current allocation gate as the input power of the current allocation gate, the input power is allocated among the power consumption circuits according to the gate control weight of each power consumption circuit, so as to obtain the power allocation increment of each power consumption circuit at the current allocation gate. Add the power increment of each power circuit in the current allocation gate to the current cumulative power of each power circuit to update the current cumulative power of each power circuit. Subtract the sum of the power increments of all power circuits from the input power to update the current remaining power to be allocated. Output the updated current cumulative power and the updated current remaining power to be allocated to the next level allocation gate. When all M allocation gates have been traversed or the current remaining power to be allocated is zero, the current cumulative allocation power of each power circuit is taken as the target allocation power of each power circuit.
8. The flexible power adaptive allocation method for an energy metering box according to claim 6, characterized in that, The pre-training process of a watershed-style multi-level gating assignment network includes: Historical allocation data is collected. Each historical allocation data includes the demand urgency coefficient of each power circuit in the historical collection period, the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the historical collection period, the remaining power to be allocated in the historical collection period, and the corresponding optimal allocation scheme. The optimal allocation scheme is obtained by offline multi-objective optimization. The optimization objectives are to minimize the total charging completion time of all power circuits and the total power reduction of all power circuits. An initial watershed-type multi-level gated distribution network is constructed, which includes M cascaded distribution gates. Each distribution gate calculates the gate weight of each power circuit in the current distribution gate based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, and distributes the input power among the power circuits according to the gate weight. The optimal allocation scheme is decomposed into M-level step-by-step allocation schemes according to the allocation logic of M allocation gates. Each level of step-by-step allocation scheme includes the power allocation increment of each power circuit corresponding to that level of allocation gate. Using the demand urgency coefficient of each power circuit in the historical data collection period, the maximum acceptable charging power of the adjustable power terminals connected to each power circuit in the historical data collection period, and the remaining power to be allocated in the historical data collection period as model inputs, and the M-level step-by-step allocation scheme as the supervision label, the initial watershed multi-level gated allocation network is trained in a supervised manner until it is verified to converge, thus obtaining the pre-trained watershed multi-level gated allocation network.
9. The flexible power adaptive allocation method for an energy metering box according to claim 7, characterized in that, Based on the demand urgency coefficient of each power circuit and the remaining acceptable capacity of each power circuit, calculate the gating weight of each power circuit in the current allocation gate, including: The demand urgency coefficient of each power circuit is multiplied by the remaining acceptable capacity of each power circuit to obtain the initial gate signal of each power circuit. When the remaining acceptable capacity of any power circuit is zero, the initial gate signal of that power circuit is zero. The initial gating signals of all power circuits are normalized so that the sum of the initial gating signals of all power circuits is 1, thus obtaining the gating weight of each power circuit.
10. An electricity metering box, characterized in that, A flexible power adaptive allocation method for an energy metering box as described in any one of claims 1 to 9 includes: The data synchronization acquisition module is used to synchronously acquire the real-time power of each power circuit according to a preset acquisition cycle through the power metering unit of each power circuit, and obtain the real-time total power of the main incoming circuit. The load characteristic analysis module is used to distinguish the non-adjustable base load and adjustable load of each power circuit in the current period based on the historical power consumption data of each power circuit, and to take the sum of the non-adjustable base load of each power circuit as the total non-adjustable base load. The adjustable resource pool construction module is used to subtract the total non-adjustable basic load from the preset total incoming line safety capacity to obtain the flexible adjustable power pool for the current time period. The allocation priority calculation module is used to calculate the flexible allocation priority of each power circuit based on the current power demand of each power circuit. A multi-level adaptive allocation module is used to perform multi-level adaptive allocation of the flexible adjustable power pool according to the flexible allocation priority under the constraint of the flexible adjustable power pool, generate the target allocation power for each power circuit, and send the target allocation power to each power circuit. The dynamic cyclic control module is used to re-execute the data synchronization acquisition module to the multi-level adaptive allocation module in the next acquisition cycle.
