Power distribution box power quality optimization method and device

By acquiring and analyzing the three-phase electrical data of the distribution box, the power quality disturbance levels are classified and graded management instructions are generated, which solves the problem of balancing management accuracy and economy in the existing technology, and realizes efficient and accurate power quality management of the power distribution system.

CN122118757APending Publication Date: 2026-05-29SHIJIAZHUANG HUATIAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHIJIAZHUANG HUATIAN TECHNOLOGY CO LTD
Filing Date
2026-03-05
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing power quality optimization technologies for distribution boxes struggle to balance governance precision and economy, cannot meet the refined governance needs under various mixed loads, and cannot match the adaptive and precise operation requirements of smart grids for end devices.

Method used

By acquiring three-phase electrical sampling data from the end distribution box of the smart grid, calculating the effective value data of three-phase electrical data, determining the power factor, load change rate, total harmonic distortion rate and three-phase imbalance, classifying the power quality disturbance level type, and generating hierarchical governance instructions based on the disturbance level and load change rate, thereby realizing hierarchical governance and scenario-based adaptive governance.

Benefits of technology

It enables graded and precise management of power quality disturbances in distribution boxes, reduces management redundancy and operational losses, improves the operating efficiency of the power distribution system and the stability of electrical equipment, and extends the service life of equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122118757A_ABST
    Figure CN122118757A_ABST
Patent Text Reader

Abstract

The application provides a power distribution box power quality optimization method and device, and belongs to the technical field of smart grids. The method comprises the following steps: determining three-phase electrical effective value data based on three-phase electrical sampling data at the outlet of a smart grid terminal power distribution box; determining a power factor, a load change rate, a total harmonic distortion rate and a three-phase imbalance degree based on the three-phase electrical effective value data; determining an electric power quality disturbance grade type based on the total harmonic distortion rate, the three-phase imbalance degree and the power factor; determining a power distribution box operation scene type based on the load change rate, wherein the operation scene type is a steady-state scene or a transient mutation scene; determining the governance weight of a plurality of governance components based on the electric power quality disturbance grade type, determining a hierarchical governance instruction based on the governance weight of the plurality of governance components; and generating a scene-adaptive governance instruction based on the hierarchical governance instruction and the operation scene type. The application can realize hierarchical and accurate governance of power distribution box power quality disturbances and adapt to the development needs of smart grids.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of smart grid technology, and more specifically, relates to a method and device for optimizing power quality in a distribution box. Background Technology

[0002] As the core equipment for power distribution and control at the end of the power distribution system, and a key node for end-of-line sensing and local governance in smart grids, distribution boxes are widely used in industrial production, commercial buildings, and residential power consumption scenarios. Against the backdrop of smart grid construction and the development of diverse loads, the widespread integration of nonlinear and impulsive loads has led to diverse and varying degrees of power quality disturbances in distribution boxes. This not only reduces the operating efficiency of the power distribution system, increases line losses and equipment heating, but also affects the stability and lifespan of downstream electrical equipment, and restricts the level of refined management and control of power quality at the end of the smart grid.

[0003] Existing power quality optimization technologies for distribution boxes often employ fixed governance strategies, which tend to result in overcompensation for minor disturbances and insufficient compensation for major disturbances. It is difficult to balance governance accuracy and economy, leading to high redundancy and significant operating losses in practical applications of traditional power quality optimization methods. These methods are ill-suited to the refined governance needs of various mixed loads and cannot meet the adaptive and precise operation requirements of smart grids for end devices. Summary of the Invention

[0004] This application provides a method and apparatus for optimizing the power quality of a distribution box, so as to achieve graded and precise management of power quality disturbances in the distribution box, improve the management accuracy and economy, and adapt to the refined management needs under multiple types of mixed loads.

[0005] According to one aspect of the embodiments of this application, a method for optimizing the power quality of a distribution box is provided, comprising: Acquire three-phase electrical sampling data at the outlet of the smart grid terminal distribution box, determine the three-phase electrical RMS data based on the three-phase electrical sampling data, and determine the power factor, load change rate, total harmonic distortion rate, and three-phase imbalance based on the three-phase electrical RMS data; The power quality disturbance level is determined based on the total harmonic distortion, three-phase imbalance, and power factor; the power quality disturbance level is either Level 1 or Level 2; Level 2 disturbance has a higher disturbance level than Level 1 disturbance. The operating scenario type of the distribution box is determined based on the load change rate, which is either a steady-state scenario or a transient change scenario. The governance weights of multiple governance components are determined based on the power quality disturbance level type, and the hierarchical governance instructions are determined based on the governance weights of the multiple governance components; the multiple governance components include harmonic governance components, reactive power governance components, and three-phase imbalance governance components. Based on hierarchical governance instructions and operational scenario types, scenario-specific adaptive governance instructions are generated; these instructions are used to implement hierarchical governance of smart grid terminal distribution boxes.

[0006] According to one aspect of the embodiments of this application, a power quality optimization device for a distribution box is provided, comprising: The data analysis module is used to acquire three-phase electrical sampling data at the outlet of the smart grid terminal distribution box, determine the three-phase electrical RMS data based on the three-phase electrical sampling data, and determine the power factor, load change rate, total harmonic distortion rate, and three-phase imbalance based on the three-phase electrical RMS data. The disturbance level classification module is used to determine the power quality disturbance level type based on the total harmonic distortion, three-phase imbalance, and power factor. The power quality disturbance level type is either Level 1 disturbance or Level 2 disturbance. The disturbance level of Level 2 disturbance is higher than that of Level 1 disturbance. The scenario segmentation module is used to determine the operating scenario type of the distribution box based on the load change rate. The operating scenario type is either a steady-state scenario or a transient change scenario. The dynamic adjustment module for governance weights is used to determine the governance weights of multiple governance components based on the power quality disturbance level type, and to determine the hierarchical governance instructions based on the governance weights of multiple governance components; the multiple governance components include harmonic governance components, reactive power governance components, and three-phase imbalance governance components; The scenario adaptive adjustment module is used to generate scenario-specific adaptive governance instructions based on hierarchical governance instructions and operating scenario types; the scenario-specific adaptive governance instructions are used to realize hierarchical governance of the smart grid terminal distribution boxes.

[0007] According to one aspect of the embodiments of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described power quality optimization method for distribution boxes.

[0008] According to one aspect of the embodiments of this application, the computer program product includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned power quality optimization method for a distribution box.

[0009] The technical solutions provided in this application embodiment may have the following beneficial effects: This application first collects and analyzes the core electrical parameters of the distribution box to comprehensively identify power quality disturbances such as harmonics, reactive power, and three-phase imbalance. It can also classify disturbances into Level 1 and Level 2 based on their severity, and further differentiate between steady-state and transient operation scenarios by considering load changes. This approach departs from the traditional method of indiscriminate and uniform governance. For different disturbance levels, this application matches differentiated governance weights and tiered governance instructions. Mild Level 1 disturbances are matched with low-intensity governance to avoid energy waste and frequent equipment operation caused by overcompensation, while severe Level 2 disturbances are matched with high-intensity governance to ensure effective compensation.

[0010] Meanwhile, this application further optimizes the hierarchical governance instructions based on different operating scenarios, generating scenario-specific adaptive governance instructions that ensure the governance strategy is highly compatible with the actual operating conditions of the distribution box. Overall, this application achieves on-demand control and precise implementation of power quality governance, reducing governance redundancy and operational losses, improving the operating efficiency of the power distribution system, reducing line losses and equipment overheating, ensuring the operational stability of downstream electrical equipment, extending equipment lifespan, and adapting to the actual power demand of nonlinear and impulsive mixed loads. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating the power quality optimization method for distribution boxes provided in this application embodiment; Figure 2 This is a structural block diagram of the power quality optimization device for a distribution box provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a server provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0014] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0015] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0016] It should be understood that although the terms first, second, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0017] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user-related data. These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their relevant data is being collected. This ensures that the application only begins the steps related to collecting user-related data after receiving confirmation from the user regarding the prompt interface or pop-up. Otherwise, if no confirmation is received from the user, the steps to collect user-related data end, meaning no user-related data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of relevant user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0018] Figure 1 This is a flowchart of a power quality optimization method for distribution boxes provided in an embodiment of this application. The method is executed by a computer device and may include: S101: Obtain three-phase electrical sampling data at the outlet of the smart grid terminal distribution box, determine the three-phase electrical effective value data based on the three-phase electrical sampling data, and determine the power factor, load change rate, total harmonic distortion rate and three-phase imbalance based on the three-phase electrical effective value data.

[0019] In this embodiment, the three-phase electrical RMS data includes three-phase voltage RMS data and three-phase current RMS data; acquiring three-phase electrical sampling data at the outlet of the smart grid terminal distribution box, and determining the three-phase electrical RMS data based on the three-phase electrical sampling data includes: acquiring three-phase voltage data and three-phase current data at the outlet of the distribution box; determining the three-phase voltage RMS data based on the three-phase voltage data; determining the three-phase current RMS data based on the three-phase current data; and using the three-phase voltage RMS data and the three-phase current RMS data as the three-phase electrical RMS data.

[0020] In this embodiment, determining the power factor and load change rate based on three-phase electrical effective value data includes: determining three-phase active power data based on three-phase voltage effective value data and three-phase current effective value data; determining three-phase apparent power data based on three-phase voltage effective value data and three-phase current effective value data; and calculating the ratio between the three-phase active power data and the three-phase apparent power data to obtain the power factor.

[0021] In this embodiment, determining the total harmonic distortion rate and three-phase imbalance based on three-phase electrical RMS data includes: Determine the fundamental voltage RMS value based on the three-phase voltage RMS value data; determine the fundamental current RMS value based on the three-phase current RMS value data; Harmonic distortion rate is calculated by comparing the effective values ​​of three-phase voltages with the effective value of the fundamental voltage to obtain the total harmonic distortion rate of voltage; harmonic distortion rate is also calculated by comparing the effective values ​​of three-phase currents with the effective value of the fundamental current to obtain the total harmonic distortion rate of current. The total harmonic distortion rate (THD) of voltage harmonics and the total harmonic distortion rate of current harmonics are used as the total harmonic distortion rate. The three-phase voltage amplitude difference data is obtained based on the three-phase voltage RMS data; the average value of the three-phase voltage RMS data is calculated, and the three-phase voltage unbalance is obtained based on the three-phase voltage amplitude difference data and the average value of the three-phase voltage RMS data. The three-phase current amplitude difference data is obtained based on the three-phase current RMS data; the average value of the three-phase current RMS data is calculated, and the three-phase current imbalance is obtained based on the three-phase current amplitude difference data and the average value of the three-phase current RMS data. The three-phase voltage imbalance and the three-phase current imbalance are used as the three-phase imbalance.

[0022] In this embodiment, the three-phase electrical sampling data refers to the raw collected data of the three-phase voltage and current at the distribution box outlet, used to extract basic information of the electrical RMS value. This data may include instantaneous sampling data of the three-phase voltage and instantaneous sampling data of the three-phase current. The three-phase electrical RMS value data is a set of voltage and current RMS values ​​converted from the three-phase electrical sampling data, used to characterize the effective amplitude of the three-phase voltage and current at the distribution box outlet. For example, it can be obtained based on the RMS value calculation method for AC sampling data. The power factor is a parameter characterizing the proportion of active power in the power distribution system, used to reflect the degree of reactive power disturbance. This may include, for example, the lagging power factor and the leading power factor. The load change rate is a proportional parameter characterizing the change of the distribution box load current with the cycle, used to determine the type of operating scenario. For example, it can be calculated based on the RMS value of the current in adjacent cycles. The total harmonic distortion rate is a parameter characterizing the degree of voltage and current waveform distortion, used to reflect the degree of harmonic disturbance, including the total voltage harmonic distortion rate and the total current harmonic distortion rate. For example, it can be calculated based on the ratio of the fundamental frequency to the total RMS value.

[0023] Three-phase unbalance is a parameter characterizing the difference in amplitude of three-phase voltage and current, reflecting the degree of three-phase imbalance. It includes three-phase voltage unbalance and three-phase current unbalance, and can be obtained, for example, by the ratio of the amplitude difference to the average value. Three-phase voltage RMS data are the effective values ​​of three-phase voltage sampling data, used for calculating voltage-related parameters. For example, it can include the RMS values ​​of phases A, B, and C. Three-phase current RMS data are the effective values ​​of three-phase current sampling data, used for calculating current-related parameters. For example, it can include the RMS values ​​of phases A, B, and C. Three-phase active power data are power parameters characterizing the actual work done by the distribution system, calculated based on the RMS values ​​of three-phase voltage and current. Three-phase apparent power data are parameters characterizing the total power of the distribution system, calculated based on the RMS values ​​of three-phase voltage and current. Fundamental voltage RMS data are the RMS values ​​of the fundamental component of the three-phase voltage, used for calculating voltage harmonic distortion rate. Fundamental current RMS data are the RMS values ​​of the fundamental component of the three-phase current, used for calculating current harmonic distortion rate. Three-phase voltage amplitude difference data represents the difference in amplitude between the effective values ​​of the three-phase voltages, used to calculate the three-phase voltage imbalance. Three-phase current amplitude difference data represents the difference in amplitude between the effective values ​​of the three-phase currents, used to calculate the three-phase current imbalance.

[0024] This embodiment employs a layered and step-by-step approach to electrical parameter calculation, establishing a standardized and traceable parameter derivation chain from raw sampled data to basic effective value data, and then to various power quality characteristic parameters. This ensures the accuracy and relevance of the calculated power quality indicators. This embodiment breaks down the total harmonic distortion rate (THD) into voltage and current indicators, and the three-phase imbalance into voltage and current indicators. Combined with power factor and load change rate, it comprehensively extracts the core disturbance characteristics of the power quality in the distribution box, providing complete and reliable basic data support for subsequent disturbance level and operational scenario judgment. It balances the professionalism of parameter calculation with engineering practicality, conforming to industry standards for power quality testing in distribution systems.

[0025] For example, this embodiment can collect three-phase electrical sampling data at the outlet using an AC sampling module inside the distribution box at a preset sampling frequency. The sampling frequency is adapted to the power frequency requirements of the power distribution system, directly collecting three-phase voltage and three-phase current data. The collection range covers the voltage and current loops of phases A, B, and C in the distribution box, ensuring the comprehensiveness of the sampling data. This embodiment can perform effective value conversion processing on the collected three-phase voltage data. For the voltage sampling data of phases A, B, and C, the conventional calculation method of AC sinusoidal signal effective value is used to perform the conversion. The instantaneous voltage value of each phase is continuously collected and processed stepwise by squaring, integrating, and taking the square root. The integration time matches the power frequency cycle of the power distribution system to obtain the effective value of the single-phase voltage. After calculating the effective values ​​of phases A, B, and C in sequence, the effective values ​​of the three phases are integrated to form three-phase voltage effective value data containing independent effective values ​​of the three phases, ensuring that the data can accurately reflect the actual amplitude state of the three-phase voltage at the outlet of the distribution box. At the same time, the same effective value conversion process is performed on the three-phase current data, and the effective values ​​of the currents of phases A, B, and C are calculated separately. The three-phase current effective value data are then integrated, and the two types of data are combined as the three-phase electrical effective value data.

[0026] This embodiment can calculate the active power of each phase based on the three-phase voltage RMS data and three-phase current RMS data, combined with power calculation methods, and sum them to obtain the three-phase active power data; simultaneously, it can calculate the apparent power of each phase, sum them to obtain the three-phase apparent power data, and calculate the power factor by comparing the three-phase active power data and the three-phase apparent power data. This embodiment can also perform fundamental frequency extraction processing on the three-phase voltage RMS data, separating the fundamental voltage component using Fourier decomposition, and calculating the fundamental voltage RMS data; the same fundamental frequency extraction processing can be performed on the three-phase current RMS data, separating the fundamental current component, and calculating the fundamental current RMS data. This embodiment can also obtain the total harmonic distortion rate of voltage based on the fundamental voltage RMS data and the three-phase voltage RMS data using conventional harmonic distortion rate calculation methods; and calculate the total harmonic distortion rate of current based on the fundamental current RMS data and the three-phase current RMS data, combining both types of distortion rates as the total harmonic distortion rate.

[0027] This embodiment calculates the difference between the maximum and minimum values ​​of the three-phase voltage RMS data to obtain the three-phase voltage amplitude difference data. Simultaneously, it performs an arithmetic mean calculation on the RMS values ​​of phases A, B, and C to obtain the average RMS value of the three-phase voltage. Based on the ratio of the three-phase voltage amplitude difference data to the average RMS value, it calculates the three-phase voltage unbalance. This embodiment can also use the same calculation method as for the three-phase voltage unbalance: calculating the difference between the maximum and minimum values ​​of the three-phase current RMS data to obtain the three-phase current amplitude difference data; performing an arithmetic mean calculation on the RMS values ​​of phases A, B, and C to obtain the average RMS value of the three-phase current; and based on the ratio of the three-phase current amplitude difference data to the average RMS value, it calculates the three-phase current unbalance. The three-phase voltage unbalance and the three-phase current unbalance are used as the three-phase unbalance. This embodiment can continuously collect and store the effective value data of three-phase current in adjacent sampling periods. By calculating the change ratio of the effective value data of three-phase current in the next period and the previous period, the load change rate can be obtained, and all power quality characteristic parameters can be calculated.

[0028] This embodiment employs a standardized parameter calculation process to derive various power quality characteristic parameters step-by-step from raw sampling data, ensuring the accuracy and standardization of data calculations. The derivation links for each parameter are clear and verifiable, meeting the professional requirements for power quality testing in distribution systems. This embodiment comprehensively extracts core power quality indicators such as power factor, load change rate, total harmonic distortion rate, and three-phase imbalance, covering major disturbance types such as reactive power, load fluctuations, harmonics, and three-phase imbalance, providing complete and comprehensive foundational data for subsequent power quality optimization. Furthermore, the calculation methods for each parameter utilize conventional techniques in the field, requiring no additional hardware modules, resulting in low engineering implementation difficulty. It can be directly adapted to existing distribution box sampling and detection systems, exhibiting good compatibility and practicality, effectively ensuring the reliability of subsequent disturbance judgment and mitigation strategy formulation.

[0029] S102: Determine the power quality disturbance level type based on total harmonic distortion, three-phase imbalance, and power factor; the power quality disturbance level type is either Level 1 disturbance or Level 2 disturbance; the disturbance level of Level 2 disturbance is higher than that of Level 1 disturbance.

[0030] In this embodiment, the power quality disturbance level type is determined based on the total harmonic distortion, three-phase imbalance, and power factor, including: Obtain the distortion rate threshold corresponding to the total harmonic distortion rate. The distortion rate threshold includes the first-level distortion threshold and the second-level distortion threshold. Obtain the imbalance threshold, which includes the first-level imbalance threshold and the second-level imbalance threshold; Obtain the power factor threshold, which includes the first-level power factor threshold and the second-level power factor threshold; The harmonic disturbance score is determined based on the relationship between the total harmonic distortion rate and the distortion threshold. The unbalance disturbance score is determined based on the relationship between the three-phase unbalance degree and the unbalance threshold. The reactive power disturbance score is determined based on the relationship between the power factor and the power factor threshold. The power quality disturbance level type is determined based on harmonic disturbance score, unbalanced disturbance score, and reactive power disturbance score.

[0031] In this embodiment, the power quality disturbance level type is a classification based on the degree of harmonic, unbalanced, and reactive power disturbances in the power distribution system, used to characterize the severity of power quality disturbances, such as including level one disturbances, level two disturbances, etc. The distortion rate threshold is a critical value for determining the degree of harmonic disturbances, which can be obtained, for example, according to national power quality standards. The unbalance threshold is a critical value for determining the degree of three-phase unbalanced disturbances, used to define the severity level of unbalanced disturbances. The power factor threshold is a critical value for determining the degree of reactive power disturbances, including level one power factor thresholds and level two power factor thresholds. The harmonic disturbance score is a quantitative score obtained by comparing the total harmonic distortion rate with the distortion rate threshold, used to characterize the quantification degree of harmonic disturbances. The unbalanced disturbance score is a quantitative score obtained by comparing the three-phase unbalance degree with the unbalance degree threshold. The reactive power disturbance score is a quantitative score obtained by comparing the power factor with the power factor threshold.

[0032] This embodiment transforms qualitative disturbance judgment into quantitative disturbance score calculation by setting grading thresholds for different types of power quality disturbances, thus achieving standardized grading of three types of disturbances: harmonics, imbalance, and reactive power. Simultaneously, it integrates the scores of the three types of disturbances to determine the overall disturbance level, making the disturbance level determination more comprehensive and objective, avoiding the one-sidedness of single-indicator judgments, and providing a precise and unified grading basis for subsequent differentiated management, while balancing the professionalism of the judgment logic with engineering operability.

[0033] For example, this embodiment can pre-set and store the distortion rate thresholds corresponding to the total harmonic distortion rate. The first-level distortion threshold is the critical value for mild harmonic disturbances, and the second-level distortion threshold is the critical value for severe harmonic disturbances. The threshold values ​​are set according to relevant power quality standards for the power distribution system. This embodiment can also pre-set and store unbalance thresholds and power factor thresholds in the same way. Both types of thresholds are divided into first-level and second-level critical values, corresponding to mild and severe disturbance judgments, respectively. This embodiment can compare the previously calculated total harmonic distortion rate with the distortion rate thresholds, and assign corresponding harmonic disturbance scores based on the comparison results; the higher the degree of exceedance, the higher the score.

[0034] This embodiment compares the three-phase unbalance degree with an unbalance threshold and determines the unbalance disturbance score according to a preset scoring rule. Simultaneously, it compares the power factor with a power factor threshold to determine the reactive power disturbance score. This embodiment can integrate the harmonic disturbance score, unbalance disturbance score, and reactive power disturbance score using a summation method to obtain a comprehensive disturbance score. This embodiment can preset a comprehensive score threshold and compare the comprehensive disturbance score with this threshold. If the threshold is not reached, the power quality disturbance level is determined to be Level 1; if it is reached, it is determined to be Level 2, thus completing the disturbance level determination.

[0035] This embodiment achieves standardized and quantitative judgment of disturbance levels by setting graded thresholds for three types of core power quality disturbances, making the classification of power quality disturbance levels more objective and accurate. Simultaneously, it integrates multiple indicator scores to determine the comprehensive disturbance level, avoiding the limitations of single-indicator judgment and comprehensively reflecting the overall disturbance status of the power distribution system. The grading judgment logic is clear and the steps are simple, relying on pre-calculated basic parameters without requiring additional data collection, resulting in high judgment efficiency and providing accurate and reliable grading basis for the subsequent formulation of differentiated governance strategies.

[0036] S103: Determine the operating scenario type of the distribution box based on the load change rate. The operating scenario type is either a steady-state scenario or a transient change scenario.

[0037] In this embodiment, determining the operating scenario type of the distribution box based on the load change rate includes: obtaining a preset load change rate threshold; if the load change rate is not greater than the load change rate threshold, the operating scenario type is determined to be a steady-state scenario; if the load change rate is greater than the load change rate threshold, the operating scenario type is determined to be a transient change scenario.

[0038] In this embodiment, the operating scenario type is an operating state identifier categorized based on the load change characteristics of the distribution box, used to characterize the real-time operating conditions of the power distribution system. For example, it may include steady-state scenarios and transient change scenarios. The load change rate threshold is a preset critical value for determining the load operating state, used to distinguish between steady-state and transient change scenarios. This threshold can be obtained, for example, based on the load operating characteristics of the power distribution system and engineering experience. A steady-state scenario is an operating state where the load change rate of the distribution box is within the threshold range, used to characterize a stable load operation. A transient change scenario is an operating state where the load change rate of the distribution box exceeds the threshold range, used to characterize abrupt changes in operating conditions such as load switching.

[0039] For example, this embodiment can pre-set a load change rate threshold based on the design specifications of the power distribution system, load type, and actual engineering operation experience. This threshold is a critical value that distinguishes between steady-state and transient changes. After setting, it is stored in the control unit of the distribution box as a benchmark for scenario determination. This embodiment can extract the calculated real-time load change rate data of the distribution box from the previous parameter calculation results, ensuring that the data is the latest data calculated based on the effective values ​​of the three-phase current in adjacent cycles, thus guaranteeing the real-time nature of the determination.

[0040] This embodiment compares the extracted real-time load change rate data with a preset, stored load change rate threshold to perform precise numerical determination. Based on the comparison result, this embodiment determines the scenario: if the real-time load change rate is not greater than the preset load change rate threshold, the current operating scenario is determined to be a steady-state scenario. If the real-time load change rate is greater than the preset load change rate threshold, the current operating scenario is determined to be a transient change scenario, thus completing the determination of the single operating scenario type. This embodiment can repeatedly execute the above steps of data extraction, numerical comparison, and scenario determination according to the parameter acquisition cycle of the distribution box, achieving continuous and real-time determination of the operating scenario type to adapt to the dynamic operating characteristics of the power distribution system.

[0041] This embodiment achieves rapid determination of operating scenario types by pre-setting a single threshold. The determination logic is simple and direct, improving the response speed of scenario identification and adapting to the real-time operation requirements of power distribution systems. The determination process relies on pre-calculated load change rate data, eliminating the need for additional parameter collection and simplifying the implementation process. Simultaneously, it accurately distinguishes between steady-state and transient change scenarios, providing reliable operating condition data for subsequent scenario-based power quality management and ensuring the adaptability of management strategies.

[0042] S104: Determine the governance weights of multiple governance components based on the power quality disturbance level type, and determine the hierarchical governance instructions based on the governance weights of multiple governance components; the multiple governance components include harmonic governance components, reactive power governance components, and three-phase imbalance governance components.

[0043] In this embodiment, the governance weights of multiple governance components are determined based on the power quality disturbance level type, including: Obtain benchmark governance weight data; If the power quality disturbance level is a Level 1 disturbance, the baseline governance weight data is adjusted based on the first adjustment ratio to obtain the governance weights of multiple governance components. If the power quality disturbance level is a level 2 disturbance, the baseline governance weight data is adjusted based on the second adjustment ratio to obtain the governance weights of multiple governance components. The first adjustment ratio is a positive number less than 1, and the second adjustment ratio is a positive number greater than the first adjustment ratio and less than 1.

[0044] In this embodiment, the governance components are governance dimensions corresponding to various power quality disturbances, used to characterize the governance direction of different disturbances. For example, they may include harmonic governance components, reactive power governance components, and three-phase imbalance governance components. The governance weights are governance intensity coefficients corresponding to each governance component, used to quantify the governance strength of various disturbances. The baseline governance weight data are preset basic intensity coefficients for each governance component, which can be obtained, for example, based on the rated compensation capacity of the distribution system. The first adjustment ratio is a weight adjustment coefficient adapted to first-level disturbances, a positive number less than 1. The second adjustment ratio is a weight adjustment coefficient adapted to second-level disturbances, a positive number greater than the first adjustment ratio and less than 1. The tiered governance instructions are power quality governance control instructions generated based on the governance weights of each governance component, used to guide compensation execution actions.

[0045] For example, this embodiment can pre-set and store benchmark governance weight data by combining the rated parameters of the distribution box's compensation device, the power quality management requirements of the power distribution system, and engineering experience. This data corresponds to the basic governance intensity of each governance component, covering all power quality disturbance dimensions that need to be managed. This embodiment can simultaneously pre-set and store a first adjustment ratio and a second adjustment ratio. As required, the first adjustment ratio is set to a positive number less than 1, and the second adjustment ratio is set to a positive number greater than the first adjustment ratio and less than 1. After completion, the two types of ratio parameters are synchronously stored in the control unit. This embodiment can extract the current power quality disturbance level type data from the previous judgment results, ensuring that the data is the latest first-level or second-level disturbance judgment result, thus guaranteeing the targeting of the weight adjustment.

[0046] This embodiment first retrieves the stored baseline governance weight data. If the extracted power quality disturbance level is a Level 1 disturbance, the baseline governance weight data is adjusted component-by-component based on a first adjustment ratio to obtain governance weights for multiple governance components adapted to the Level 1 disturbance. Alternatively, if the extracted power quality disturbance level is a Level 2 disturbance, the baseline governance weight data is adjusted component-by-component based on a second adjustment ratio to obtain governance weights for multiple governance components adapted to the Level 2 disturbance. The adjustment process covers all preset governance components, ensuring the comprehensiveness of the weight adjustment.

[0047] This embodiment can extract the governance weights of the adjusted harmonic governance components, reactive power governance components, and three-phase imbalance governance components. Each governance weight is a specific intensity coefficient for the corresponding governance dimension, directly representing the governance intensity required for that dimension. This embodiment can convert the governance weights of each governance component into electrical signal control parameters recognizable by the compensation execution unit according to preset parameter conversion rules. These parameter conversion rules are preset based on the rated operating range and adjustment accuracy of the compensation device, ensuring a linear correspondence between the weight values ​​and the control parameters.

[0048] This embodiment integrates the control parameters of all the converted governance components and standardizes and encodes them according to the instruction format requirements of the distribution box compensation execution unit, forming a hierarchical governance instruction that includes comprehensive governance intensity information for harmonics, reactive power, and three-phase imbalance. This instruction can be directly transmitted to the compensation execution unit, and the control parameters of each governance component will guide the corresponding compensation module to perform governance actions according to the set intensity, achieving precise matching between governance intensity and disturbance level.

[0049] This embodiment achieves differentiated setting of governance weights by combining baseline weights with tiered adjustment ratios, ensuring precise matching between governance intensity and disturbance level, avoiding over-compensation or under-compensation. The weight adjustment logic is simple and direct, based solely on the disturbance level, resulting in high execution efficiency. Simultaneously, tiered governance instructions are generated based on weights, with clear instruction targeting, providing precise intensity criteria for subsequent scenario-based governance and improving the accuracy and economy of power quality governance.

[0050] S105: Generate scenario-specific adaptive governance instructions based on hierarchical governance instructions and operation scenario types; scenario-specific adaptive governance instructions are used to realize hierarchical governance of smart grid terminal distribution boxes.

[0051] In this embodiment, the generation of scenario-specific adaptive governance instructions based on hierarchical governance instructions and operating scenario type includes: if the operating scenario type is a steady-state scenario, then the hierarchical governance instructions are used as scenario-specific adaptive governance instructions; If the operating scenario is a transient change scenario, the control parameters corresponding to the harmonic control component, reactive power control component, and three-phase imbalance control component in the hierarchical control instruction are extracted; the control parameters of the harmonic control component are kept unchanged, the control parameters of the reactive power control component are increased by a preset first proportion, and the control parameters of the three-phase imbalance control component are increased by a preset second proportion; the adjusted control parameters of the harmonic control component, reactive power control component, and three-phase imbalance control component are integrated and encoded according to a preset format to form a scenario-specific adaptive control instruction suitable for transient change operating conditions.

[0052] In this embodiment, the scenario-based adaptive governance instruction is an adaptive governance control instruction generated by combining hierarchical governance instructions with operating scenario types. It guides power quality governance actions under different operating conditions, such as steady-state scenario governance instructions and transient change scenario governance instructions. This instruction is a combination of governance strategy and operating conditions, used to characterize the precise governance requirements under different scenarios. The preset first ratio is a fixed coefficient for the amplified reactive power governance component control parameters under transient change scenarios, which can be set according to the transient reactive power disturbance suppression requirements of the power distribution system. The preset second ratio is a fixed coefficient for the amplified three-phase imbalance governance component control parameters under transient change scenarios, which can be set according to the three-phase load fluctuation amplitude of the distribution box. The preset format is an instruction encoding form recognizable by the compensation execution unit, which may include parameter bit order, data transmission protocol, etc. The scenario-based adaptive governance instruction applicable to transient change operating conditions is an enhanced governance instruction generated for transient scenarios, used to adapt to the disturbance suppression requirements of transient operation of the distribution box.

[0053] For example, this embodiment can determine the type of the operating scenario. If the determination result is a steady-state scenario, the retrieved hierarchical governance instruction is directly used as the scenario-specific adaptive governance instruction, without any parameter adjustment, and the instruction generation is completed directly. If the operating scenario type is determined to be a transient change scenario, this embodiment can extract the control parameters corresponding to the harmonic governance component, reactive power governance component, and three-phase imbalance governance component from the hierarchical governance instruction through a data parsing algorithm. The extraction process strictly matches the parameter storage format of the instruction to ensure the accuracy of parameter extraction.

[0054] This embodiment can keep the control parameter values ​​of the extracted harmonic mitigation components unchanged, while retrieving a preset first ratio stored in the control unit. This ratio is then used to perform numerical calculations with the control parameters of the reactive power mitigation components to increase the control parameters of the reactive power mitigation components. This embodiment can also retrieve a preset second ratio stored in the control unit. This ratio is then used to perform numerical calculations with the control parameters of the three-phase imbalance mitigation components to increase the control parameters of the three-phase imbalance mitigation components. Both the preset first and second ratios are preset and stored based on the smart grid end-point power quality management standards and the rated adjustment capacity of the distribution box compensation device, after engineering calculations.

[0055] This embodiment integrates the control parameters of the adjusted harmonic mitigation components, reactive power mitigation components, and three-phase imbalance mitigation components according to a preset parameter arrangement order and data encoding rules, ensuring that the integrated data structure meets the recognition requirements of the compensation execution unit. This embodiment also performs standardized encoding on the integrated control parameters, strictly adhering to the industrial communication standards of power distribution systems. This ultimately forms scenario-specific adaptive mitigation instructions suitable for transient and sudden operating conditions, completing the entire instruction generation process. The generated instructions can be directly transmitted to the compensation execution unit to execute the corresponding mitigation actions.

[0056] This embodiment generates differentiated governance instructions for different operating scenarios. In steady-state scenarios, the hierarchical governance instructions are directly used to ensure the economy of governance. In transient scenarios, reactive power and three-phase imbalance governance parameters are amplified in a targeted manner to enhance the ability to suppress transient disturbances. This achieves precise adaptation of governance strategies to the operating conditions of distribution boxes and improves the adaptability and effectiveness of power quality governance at the end of the smart grid.

[0057] Corresponding to the power quality optimization method for distribution boxes in the above embodiments, Figure 2 This is a structural block diagram of a power quality optimization device for a distribution box according to an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 2 The power quality optimization device 20 for the distribution box includes: a data analysis module 21, a disturbance level classification module 22, a scenario classification module 23, a governance weight dynamic adjustment module 24, and a scenario adaptive adjustment module 25.

[0058] Among them, the data analysis module 21 is used to acquire three-phase electrical sampling data at the outlet of the distribution box at the end of the smart grid, determine the three-phase electrical effective value data based on the three-phase electrical sampling data, and determine the power factor, load change rate, total harmonic distortion rate and three-phase imbalance based on the three-phase electrical effective value data; The disturbance level classification module 22 is used to determine the power quality disturbance level type based on the total harmonic distortion rate, three-phase imbalance, and power factor; the power quality disturbance level type is either Level 1 disturbance or Level 2 disturbance; the disturbance level of Level 2 disturbance is higher than that of Level 1 disturbance. The scenario segmentation module 23 is used to determine the operating scenario type of the distribution box based on the load change rate. The operating scenario type is either a steady-state scenario or a transient change scenario. The governance weight dynamic adjustment module 24 is used to determine the governance weight of multiple governance components based on the power quality disturbance level type, and to determine the hierarchical governance instructions based on the governance weight of multiple governance components. The scenario adaptive adjustment module 25 is used to generate scenario-specific adaptive governance instructions based on hierarchical governance instructions and operating scenario types; the scenario-specific adaptive governance instructions are used to realize hierarchical governance of the smart grid terminal distribution boxes.

[0059] In one embodiment of this application, the three-phase electrical effective value data includes three-phase voltage effective value data and three-phase current effective value data; the data analysis module 21 is specifically used for: acquiring three-phase voltage data and three-phase current data at the outlet of the distribution box; determining three-phase voltage effective value data based on the three-phase voltage data; determining three-phase current effective value data based on the three-phase current data; and using the three-phase voltage effective value data and three-phase current effective value data as three-phase electrical effective value data.

[0060] In one embodiment of this application, the data analysis module 21 is further configured to: determine three-phase active power data based on three-phase voltage RMS data and three-phase current RMS data; determine three-phase apparent power data based on three-phase voltage RMS data and three-phase current RMS data; and calculate the ratio between the three-phase active power data and the three-phase apparent power data to obtain the power factor.

[0061] In one embodiment of this application, the data analysis module 21 is further used for: Determine the fundamental voltage RMS value based on the three-phase voltage RMS value data; determine the fundamental current RMS value based on the three-phase current RMS value data; Harmonic distortion rate is calculated by comparing the effective values ​​of three-phase voltages with the effective value of the fundamental voltage to obtain the total harmonic distortion rate of voltage; harmonic distortion rate is also calculated by comparing the effective values ​​of three-phase currents with the effective value of the fundamental current to obtain the total harmonic distortion rate of current. The total harmonic distortion rate (THD) of voltage harmonics and the total harmonic distortion rate of current harmonics are used as the total harmonic distortion rate. The three-phase voltage amplitude difference data is obtained based on the three-phase voltage RMS data; the average value of the three-phase voltage RMS data is calculated, and the three-phase voltage unbalance is obtained based on the three-phase voltage amplitude difference data and the average value of the three-phase voltage RMS data. The three-phase current amplitude difference data is obtained based on the three-phase current RMS data; the average value of the three-phase current RMS data is calculated, and the three-phase current imbalance is obtained based on the three-phase current amplitude difference data and the average value of the three-phase current RMS data. The three-phase voltage imbalance and the three-phase current imbalance are used as the three-phase imbalance.

[0062] In one embodiment of this application, the disturbance level classification module 22 is specifically used for: Obtain the distortion rate threshold corresponding to the total harmonic distortion rate. The distortion rate threshold includes the first-level distortion threshold and the second-level distortion threshold. Obtain the imbalance threshold, which includes the first-level imbalance threshold and the second-level imbalance threshold; Obtain the power factor threshold, which includes the first-level power factor threshold and the second-level power factor threshold; The harmonic disturbance score is determined based on the relationship between the total harmonic distortion rate and the distortion threshold. The unbalance disturbance score is determined based on the relationship between the three-phase unbalance degree and the unbalance threshold. The reactive power disturbance score is determined based on the relationship between the power factor and the power factor threshold. The power quality disturbance level type is determined based on harmonic disturbance score, unbalanced disturbance score, and reactive power disturbance score.

[0063] In one embodiment of this application, the scenario division module 23 is specifically used to: obtain a preset load change rate threshold; if the load change rate is not greater than the load change rate threshold, then determine the running scenario type as a steady-state scenario; if the load change rate is greater than the load change rate threshold, then determine the running scenario type as a transient change scenario.

[0064] In one embodiment of this application, the governance weight dynamic adjustment module 24 is specifically used for: Obtain benchmark governance weight data; If the power quality disturbance level is a Level 1 disturbance, the baseline governance weight data is adjusted based on the first adjustment ratio to obtain the governance weights of multiple governance components. If the power quality disturbance level is a level 2 disturbance, the baseline governance weight data is adjusted based on the second adjustment ratio to obtain the governance weights of multiple governance components. The first adjustment ratio is a positive number less than 1, and the second adjustment ratio is a positive number greater than the first adjustment ratio and less than 1.

[0065] It should be noted that the specific limitations of the power quality optimization device 20 for distribution boxes described above can be found in the limitations of the power quality optimization method for distribution boxes mentioned above, and will not be repeated here. Each module of the above device can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in the processor of a computer device in hardware form or independent of the processor, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0066] This application also provides a computer device, which includes: a processor and a memory, wherein the memory stores a computer program; the processor is used to execute the computer program in the memory to implement the power quality optimization method for distribution boxes provided in the above-described method embodiments.

[0067] This application also provides a computer device, which includes a processor and a memory, wherein at least one computer program is stored in the memory. The at least one computer program is loaded and executed by one or more processors to enable the computer device to implement any of the above-described power quality optimization methods for distribution boxes. The computer device can be a server or a terminal; the structures of servers and terminals will be described below.

[0068] Figure 3 This is a schematic diagram of a server structure provided in an embodiment of this application. The server can vary significantly due to differences in configuration or performance. It may include one or more Central Processing Units (CPUs) 31 and one or more memories 32. The one or more memories 32 store at least one computer program, which is loaded and executed by the one or more processors 31 to enable the server to implement the power quality optimization methods for distribution boxes provided in the above-described method embodiments. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated upon here.

[0069] Figure 4 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. The terminal may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.

[0070] Typically, a terminal includes a processor 41 and a memory 42.

[0071] Processor 41 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 41 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 41 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 41 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 41 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0072] The memory 42 may include one or more computer-readable storage media, which may be non-transitory. The memory 42 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 42 is used to store at least one instruction, which is executed by the processor 41 to enable the terminal to implement the power quality optimization method for the distribution box provided in the method embodiments of this application.

[0073] In some embodiments, the terminal may also optionally include: a peripheral device interface 43 and at least one peripheral device. The processor 41, memory 42, and peripheral device interface 43 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 43 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit 44, a display screen 45, a camera assembly 46, an audio circuit 47, and a power supply 48.

[0074] Peripheral interface 43 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 41 and memory 42. In some embodiments, processor 41, memory 42 and peripheral interface 43 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 41, memory 42 and peripheral interface 43 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0075] The radio frequency (RF) circuit 44 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 44 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 44 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 44 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 44 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 44 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0076] The display screen 45 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 45 is a touch display, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to the processor 41 for processing. In this case, the display screen 45 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 45, located on the front panel of the terminal; in other embodiments, there may be at least two display screens, respectively located on different surfaces of the terminal or in a folded design; in still other embodiments, the display screen 45 may be a flexible display screen, located on a curved or folded surface of the terminal. Furthermore, the display screen 45 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 45 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0077] The camera assembly 46 is used to acquire images or videos. Optionally, the camera assembly 46 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 46 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0078] The audio circuit 47 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 41 for processing, or to the radio frequency circuit 44 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 41 or the radio frequency circuit 44 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 47 may also include a headphone jack.

[0079] The power source 48 is used to power the various components in the terminal. The power source 48 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When the power source 48 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0080] In some embodiments, the terminal further includes one or more sensors 49. The one or more sensors 49 include, but are not limited to: an accelerometer 410, a gyroscope 411, a pressure sensor 412, an optical sensor 413, and a proximity sensor 414.

[0081] Accelerometer 410 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by the terminal. For example, accelerometer 410 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 41 can control display screen 45 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 410. Accelerometer 410 can also be used for collecting motion data from games or users.

[0082] The gyroscope sensor 411 can detect the terminal's orientation and rotation angle. The gyroscope sensor 411 can work in conjunction with the accelerometer sensor 410 to collect the user's 3D movements on the terminal. Based on the data collected by the gyroscope sensor 411, the processor 41 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0083] The pressure sensor 412 can be disposed on the side bezel of the terminal and / or the lower layer of the display screen 45. When the pressure sensor 412 is disposed on the side bezel of the terminal, it can detect the user's grip signal on the terminal, and the processor 41 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 412. When the pressure sensor 412 is disposed on the lower layer of the display screen 45, the processor 41 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 45. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0084] Optical sensor 413 is used to collect ambient light intensity. In one embodiment, processor 41 can control the display brightness of display screen 45 based on the ambient light intensity collected by optical sensor 413. Specifically, when the ambient light intensity is high, the display brightness of display screen 45 is increased; when the ambient light intensity is low, the display brightness of display screen 45 is decreased. In another embodiment, processor 41 can also dynamically adjust the shooting parameters of camera assembly 46 based on the ambient light intensity collected by optical sensor 1613.

[0085] The proximity sensor 414, also known as a distance sensor, is typically installed on the front panel of the terminal. The proximity sensor 414 is used to detect the distance between the user and the front of the terminal. In one embodiment, when the proximity sensor 414 detects that the distance between the user and the front of the terminal is gradually decreasing, the processor 41 controls the display screen 45 to switch from a screen-on state to a screen-off state; when the proximity sensor 414 detects that the distance between the user and the front of the terminal is gradually increasing, the processor 41 controls the display screen 45 to switch from a screen-off state to a screen-on state.

[0086] Those skilled in the art will understand that Figure 4The structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0087] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one computer program, which is loaded and executed by a processor of a computer device to enable the computer to implement any of the above-described distribution box power quality optimization methods.

[0088] In one possible implementation, the aforementioned computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a solid-state drive (SSD), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc. The random access memory can include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).

[0089] In an exemplary embodiment, a computer program or computer program product is also provided, which includes computer instructions loaded and executed by a processor to enable the computer to implement any of the above-described distribution box power quality optimization methods.

[0090] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0091] In other words, the data collection and processing in this application should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0092] It should be further noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The implementation methods described in the above exemplary embodiments do not represent all implementation methods consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.

[0093] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0094] Furthermore, the step numbers described herein are merely illustrative of one possible execution order between steps. In some other embodiments, the steps may not be executed in the order of their numbers, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0095] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. Optionally, the program is stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0096] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for optimizing power quality in a distribution box, characterized in that, include: Acquire three-phase electrical sampling data at the outlet of the smart grid terminal distribution box, and determine the three-phase electrical effective value data based on the three-phase electrical sampling data; The power factor, load change rate, total harmonic distortion rate, and three-phase imbalance are determined based on the three-phase electrical effective value data. The power quality disturbance level type is determined based on the total harmonic distortion, the three-phase unbalance, and the power factor. The power quality disturbance level is either a Level 1 disturbance or a Level 2 disturbance; the Level 2 disturbance has a higher disturbance level than the Level 1 disturbance. The operating scenario type of the distribution box is determined based on the load change rate, wherein the operating scenario type is a steady-state scenario or a transient change scenario; The governance weights of multiple governance components are determined based on the power quality disturbance level type, and the hierarchical governance instructions are determined based on the governance weights of the multiple governance components; the multiple governance components include harmonic governance components, reactive power governance components, and three-phase imbalance governance components. Based on the hierarchical governance instructions and the operational scenario type, generate scenario-specific adaptive governance instructions; The scenario-based adaptive governance instructions are used to achieve hierarchical governance of the terminal distribution boxes of the smart grid.

2. The power quality optimization method for distribution boxes as described in claim 1, characterized in that, The three-phase electrical sampling data includes three-phase voltage data and three-phase current data within the same time period; The process of acquiring three-phase electrical sampling data at the outlet of the smart grid terminal distribution box and determining the effective value data of the three-phase electrical system based on the three-phase electrical sampling data includes: Acquire the three-phase voltage and three-phase current data at the outlet of the distribution box; The effective value data of the three-phase voltage is determined based on the three-phase voltage data; The effective value data of the three-phase current is determined based on the three-phase current data; The three-phase voltage RMS data and the three-phase current RMS data are used as the three-phase electrical RMS data.

3. The power quality optimization method for distribution boxes as described in claim 1, characterized in that, The three-phase electrical effective value data includes three-phase voltage effective value data and three-phase current effective value data; Determining the power factor and load change rate based on the aforementioned three-phase electrical RMS data includes: The three-phase active power data are determined based on the three-phase voltage RMS data and the three-phase current RMS data. The three-phase apparent power data is determined based on the three-phase voltage RMS data and the three-phase current RMS data; The load change rate is determined based on the aforementioned three-phase current RMS data; The power factor is obtained by calculating the ratio between the three-phase active power data and the three-phase apparent power data.

4. The power quality optimization method for distribution boxes as described in claim 1, characterized in that, The three-phase electrical effective value data includes three-phase voltage effective value data and three-phase current effective value data; The total harmonic distortion rate and three-phase imbalance are determined based on the aforementioned three-phase electrical RMS data, including: The fundamental voltage RMS value is determined based on the three-phase voltage RMS value data; the fundamental current RMS value is determined based on the three-phase current RMS value data. The harmonic distortion rate is calculated by performing harmonic distortion rate calculation on the three-phase voltage RMS data and the fundamental voltage RMS data to obtain the total voltage harmonic distortion rate; the harmonic distortion rate is calculated by performing harmonic distortion rate calculation on the three-phase current RMS data and the fundamental current RMS data to obtain the total current harmonic distortion rate. The total harmonic distortion rate of the voltage harmonics and the total harmonic distortion rate of the current harmonics are used as the total harmonic distortion rate. Based on the three-phase voltage RMS data, the three-phase voltage amplitude difference data is obtained; the average value of the three-phase voltage RMS data is calculated, and the three-phase voltage unbalance is obtained based on the three-phase voltage amplitude difference data and the average value of the three-phase voltage RMS data. Based on the three-phase current RMS data, the three-phase current amplitude difference data is obtained; the average value of the three-phase current RMS data is calculated, and the three-phase current imbalance is obtained based on the three-phase current amplitude difference data and the average value of the three-phase current RMS data. The three-phase voltage imbalance and the three-phase current imbalance are defined as the three-phase imbalance.

5. The power quality optimization method for distribution boxes as described in claim 1, characterized in that, The method of determining the power quality disturbance level type based on the total harmonic distortion, the three-phase imbalance, and the power factor includes: Obtain the distortion rate threshold corresponding to the total harmonic distortion rate, wherein the distortion rate threshold includes a first-level distortion threshold and a second-level distortion threshold; Obtain an imbalance threshold, which includes a first-level imbalance threshold and a second-level imbalance threshold; Obtain a power factor threshold, which includes a first-level power factor threshold and a second-level power factor threshold; The harmonic disturbance score is determined based on the relationship between the total harmonic distortion rate and the distortion rate threshold. The imbalance disturbance score is determined based on the relationship between the three-phase imbalance degree and the imbalance threshold. The reactive power disturbance score is determined based on the relationship between the power factor and the power factor threshold. The power quality disturbance level type is determined based on the harmonic disturbance score, the imbalance disturbance score, and the reactive power disturbance score.

6. The power quality optimization method for distribution boxes as described in claim 1, characterized in that, The determination of the operating scenario type of the distribution box based on the load change rate includes: Obtain a preset load change rate threshold. If the load change rate is not greater than the load change rate threshold, then determine that the running scenario type is a steady-state scenario. If the load change rate is greater than the load change rate threshold, then the operating scenario type is determined to be a transient change scenario.

7. The power quality optimization method for distribution boxes as described in claim 1, characterized in that, The determination of governance weights for multiple governance components based on the power quality disturbance level type includes: Obtain benchmark governance weight data; If the power quality disturbance level is a level 1 disturbance, the baseline governance weight data is adjusted based on the first adjustment ratio to obtain the governance weights of multiple governance components. If the power quality disturbance level is a level 2 disturbance, the baseline governance weight data is adjusted based on the second adjustment ratio to obtain the governance weights of multiple governance components. The first adjustment ratio is a positive number less than 1, and the second adjustment ratio is a positive number greater than the first adjustment ratio and less than 1.

8. A power quality optimization device for a distribution box, characterized in that, include: The data analysis module is used to acquire three-phase electrical sampling data at the outlet of the smart grid terminal distribution box, and to determine the effective value data of the three-phase electrical system based on the three-phase electrical sampling data. The power factor, load change rate, total harmonic distortion rate, and three-phase imbalance are determined based on the three-phase electrical effective value data. The disturbance level classification module is used to determine the power quality disturbance level type based on the total harmonic distortion, the three-phase unbalance, and the power factor. The power quality disturbance level is either a Level 1 disturbance or a Level 2 disturbance; the Level 2 disturbance has a higher disturbance level than the Level 1 disturbance. The scenario segmentation module is used to determine the operating scenario type of the distribution box based on the load change rate, wherein the operating scenario type is a steady-state scenario or a transient change scenario; The governance weight dynamic adjustment module is used to determine the governance weights of multiple governance components based on the power quality disturbance level type, and to determine the hierarchical governance instructions based on the governance weights of the multiple governance components; the multiple governance components include harmonic governance components, reactive power governance components, and three-phase imbalance governance components; The scenario adaptive adjustment module is used to generate scenario-specific adaptive governance instructions based on the hierarchical governance instructions and the operating scenario type; the scenario-specific adaptive governance instructions are used to realize hierarchical governance of the smart grid terminal distribution box.

9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, which is loaded and executed by the processor to implement the power quality optimization method for a distribution box as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the power quality optimization method for distribution boxes as described in any one of claims 1 to 7.