Distribution network operation and maintenance knowledge question and answer method and system based on power large model
By analyzing historical electrical data and real-time remote signaling status of tie switches, the confidence level of electrical connections is calculated, which solves the problem of accuracy of remote signaling status, improves the accuracy and security of distribution network operation and maintenance Q&A system, prevents misleading suggestions, and ensures the safety of power grid dispatching operations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUMADIAN POWER SUPPLY ELECTRIC POWER OFHENAN
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-09
Smart Images

Figure CN122174941A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system automation technology, specifically to a knowledge-based question-and-answer method and system for distribution network operation and maintenance based on a large power model. Background Technology
[0002] With the deepening application of artificial intelligence technology in power systems, distribution network operation and maintenance knowledge question-and-answer systems based on large language models are gradually becoming important tools to assist dispatchers in generating operation tickets and fault handling suggestions. These systems typically rely on remote signaling data of switch positions provided by the Supervisory Control and Data Acquisition (SCADA) system as the basis for reasoning. By understanding natural language questions and querying the SCADA real-time database, they generate operation and maintenance suggestions that conform to dispatching procedures. However, in practical engineering applications, the accuracy of remote signaling status of critical equipment such as distribution network interconnection switches is limited by the reliability of field communication terminals. Delayed remote signaling changes or false remote signaling often occur due to communication blind spots, equipment aging, or failure to update information promptly after manual operation. If the large model directly accepts erroneous remote signaling status and generates operation suggestions, it can easily lead to serious safety accidents such as asynchronous grid connection and relay protection malfunctions.
[0003] Existing technologies typically rely on simple voltage correlation analysis, using the statistical correlation of voltages across a switch to determine the connection status. However, voltage correlation is highly susceptible to measurement errors and time deviations, making it difficult to effectively distinguish between numerical fitting and actual electrical connections. Furthermore, when the power supply voltages on both sides are similar, a high correlation may occur even when the switch is open, leading to a high misjudgment rate. Summary of the Invention
[0004] To address the technical problem in existing technologies where errors in remote signaling status cannot be accurately identified and timely constrained in the generation of misleading operation and maintenance suggestions by large power models, the present invention aims to provide a distribution network operation and maintenance knowledge question-and-answer method and system based on a large power model. The specific technical solution adopted is as follows: On the one hand, this invention provides a knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model, the method comprising: Obtain historical electrical data and real-time remote signaling status on both sides of the interconnection switch, and filter out significant intervals in the historical electrical data that show load fluctuations; The bidirectional power flow characteristics of the tie switch in each significant interval are analyzed, the line impedance and voltage fitting residual are calculated, and the electrical connection confidence level is obtained by combining the stability of the line impedance and the randomness of the voltage fitting residual. The actual connection status of the tie switch is determined based on the electrical connection confidence level. When the actual connection status is inconsistent with the real-time remote signaling status, a constraint command is generated based on the line impedance and the voltage fitting residual. Based on the constraint instructions, a context containing the electrical connection confidence is constructed, and the context is input into the power big model to generate a distribution network operation and maintenance response.
[0005] Furthermore, the method for acquiring historical electrical data includes: Obtain the first-order differential sequence of the voltage data sequence on one side of the interconnection switch and the first-order differential sequence of the power data sequence on the other side; Within a preset time range, a translation amount is selected, and the first-order difference sequence of the power data sequence is translated along the time axis. For each translation amount, the correlation between the first-order difference sequence of the voltage data sequence and the first-order difference sequence of the translated power data sequence is analyzed to obtain the most relevant translation amount. The timestamps of all electrical data sequences on the other side of the interconnection switch are shifted according to the most relevant shift amount to obtain historical electrical data.
[0006] Furthermore, the method for filtering the significant intervals includes: The difference in active power on both sides of the tie switch in the historical electrical data between adjacent sampling times is analyzed and used as the first power variation sequence and the second power variation sequence, respectively. The elements at the same position in the first power variation sequence and the second power variation sequence are summed to obtain the comprehensive power variation sequence. The comprehensive power variation sequence is traversed using a sliding window of a preset length. The sum of all power variations within each sliding window is calculated as a significance index. The time period corresponding to the sliding window is selected as the significance interval based on the significance index.
[0007] Furthermore, the method for calculating the stability of the line impedance includes: For each significant interval, based on the linear relationship between voltage drop and power, the bidirectional flow characteristics of power within the significant interval are analyzed, and forward and reverse models are established respectively. The dominant model is then solved, and the constant term of the dominant model is used as the system deviation. The voltage drop at each sampling time is then corrected based on the system deviation. Calculate the equivalent current at each sampling time within the significant interval, and calculate the line impedance at each sampling time within the significant interval based on the corrected voltage drop and the equivalent current; Calculate the dispersion index characterizing the line impedance distribution within the significant interval, which serves as the stability of the line impedance within the significant interval.
[0008] Furthermore, the method for calculating the randomness of the voltage fitting residual includes: For each significant interval, the fitted voltage drop at each sampling time is obtained based on the relationship between voltage drop and power, and the residual between the actual voltage drop and the fitted voltage drop at each sampling time is calculated; The absolute value of the first-order autocorrelation coefficient of the residual is calculated as the randomness of the voltage fitting residual in the significant interval.
[0009] Furthermore, the method for calculating the electrical connection confidence level includes: Calculate the stability arithmetic mean of the line impedance and the randomness arithmetic mean of the voltage fitting residuals for all significant intervals. Based on preset impedance weighting coefficients and residual weighting coefficients, weight the impedance stability arithmetic mean and the residual randomness arithmetic mean to obtain the electrical connection confidence level.
[0010] Furthermore, the method for determining the actual connection status includes: The preset quantile of the electrical connection confidence history data is used as the confidence threshold. When the electrical connection confidence is greater than or equal to the confidence threshold, the actual connection status is determined to be in place. When the electrical connection confidence is less than the confidence threshold, the actual connection status is determined to be in place.
[0011] Furthermore, the method for generating the constraint instructions includes: The line impedance is compared with a preset stability benchmark, and the voltage fitting residual is compared with a preset randomness benchmark. The comparison results are converted into electrical evidence text described in natural language using preset rules, and the electrical evidence text is concatenated as constraint instructions.
[0012] Furthermore, the distribution network operation and maintenance response method includes: The constraint instructions and the electrical connection confidence are added to a preset dynamic prompt word template to construct a context, and the context is input into the power big model to generate a distribution network operation and maintenance response.
[0013] On the other hand, the present invention provides a distribution network operation and maintenance knowledge question-and-answer system based on a large power model, the system comprising: The data processing module is used to acquire historical electrical data and real-time remote signaling status on both sides of the tie switch, filter out significant intervals with load fluctuations in the historical electrical data, analyze the bidirectional power flow characteristics of the tie switch in each significant interval, calculate the line impedance and voltage fitting residual, and obtain the electrical connection confidence level by combining the stability of the line impedance and the randomness of the voltage fitting residual.
[0014] The status judgment module is used to determine the actual connection status of the tie switch based on the electrical connection confidence level. When the actual connection status is inconsistent with the real-time remote signaling status, a constraint command is generated based on the line impedance and the voltage fitting residual. The question-and-answer module is used to construct a context containing the electrical connection confidence based on the constraint instructions, and input the context into the power big model to generate a distribution network operation and maintenance response.
[0015] The present invention has the following beneficial effects: This invention achieves independent physical topology verification of SCADA remote signaling status by calculating electrical connection confidence based on historical electrical data. This effectively identifies spurious states and change hysteresis in remote signaling data, solving the safety hazards caused by existing technologies that rely solely on SCADA remote signaling data as the sole source of fact. By analyzing the stability of line impedance and the randomness of voltage fitting residuals, and utilizing a dual verification mechanism of impedance stability and residual randomness, it effectively distinguishes between numerical fitting coincidences and actual electrical connections, significantly improving the accuracy and reliability of topology status identification. Furthermore, by automatically generating constraint instructions when the judged connection status is inconsistent with the remote signaling status, and integrating these constraint instructions into the prompt word construction process, it achieves hard constraints on the large model's inference process based on electrical physical truth values. This prevents the large model from generating misleading operation and maintenance suggestions based on erroneous remote signaling status, significantly improving the accuracy and security of the distribution network operation and maintenance question-and-answer system, and ensuring the safety of power grid dispatching operations. Attached Figure Description
[0016] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 The flowchart illustrates a method for answering questions about distribution network operation and maintenance knowledge based on a large power model, as provided in one embodiment of the present invention. Figure 2 This is a system structure diagram of a distribution network operation and maintenance knowledge question-and-answer system based on a large power model, provided as an embodiment of the present invention. Detailed Implementation
[0018] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a distribution network operation and maintenance knowledge question-and-answer method and system based on a large power model proposed according to the present invention. In the following description, different embodiments or one embodiment do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0020] This invention is mainly applied to distribution network dispatching and operation and maintenance scenarios. Specifically, when dispatchers inquire about the operating status of tie switches or request the generation of switching operation tickets through a distribution network operation and maintenance knowledge Q&A system using natural language, the system automatically collects historical electrical data and real-time remote signaling status on both sides of the tie switches. Based on electrical physical laws, it calculates the electrical connection confidence level to verify the accuracy of the remote signaling status. When a conflict is detected between the remote signaling status and the physical truth, constraint instructions guide the large model to generate operation and maintenance suggestions or abnormal alarms based on the correct physical facts. This prevents safety accidents such as asynchronous grid connection and relay protection malfunctions caused by adopting incorrect remote signaling status, and ensures the safety and reliability of distribution network dispatching operations.
[0021] The following description, in conjunction with the accompanying drawings, details the specific scheme of the distribution network operation and maintenance knowledge question-and-answer method based on a large power model provided by this invention.
[0022] Example 1: Please see Figure 1 The diagram illustrates a flowchart of a knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model, according to an embodiment of the present invention. The method includes the following steps: Step S101: Obtain historical electrical data and real-time remote signaling status on both sides of the interconnection switch, and filter out significant intervals in the historical electrical data where load fluctuations exist.
[0023] A tie switch is a switching device used in a distribution network to connect two feeders or two power supply buses. Historical electrical data is a time series of electrical measurement data at the busbars or feeder outlets on both sides of the tie switch, including at least voltage, active power, and reactive power. Real-time remote signaling status is the switch position signal collected by the SCADA system through a remote communication terminal, including two states: closed (indicating that the switch is in an electrically conducting state) and open (indicating that the switch is in an electrically disconnected state).
[0024] In actual operation of distribution networks, clock asynchrony between distribution network communication terminals can lead to discrepancies in data timestamps at different measurement points. If calculations are performed directly using data without time alignment, pseudo-residual interference will occur, affecting verification accuracy. Furthermore, during steady-state operation, the voltage drop generated by line impedance is often masked by measurement noise from voltage transformers, resulting in a low signal-to-noise ratio and difficulty in extracting true topological characteristics. Therefore, this invention lays a data foundation for subsequent high-precision impedance analysis by performing time alignment and fluctuation range filtering on historical electrical data.
[0025] Specifically, historical electrical data from both sides of the tie switch is first obtained from the SCADA historical database. The obtained historical electrical data is then time-aligned to ensure that voltage and power data at the same time reflect the same power grid disturbance event. Then, by calculating the power change index at each sampling time, the severity of load changes is quantified. Based on the power change index, significant load fluctuation intervals are selected from the synchronized dataset.
[0026] Furthermore, in some implementations of the embodiments of the present invention, the historical electrical data acquisition method includes: Obtain the first-order differential sequence of the voltage data sequence on one side of the interconnection switch and the first-order differential sequence of the power data sequence on the other side; Within a preset time range, a translation amount is selected, and the first-order difference sequence of the power data sequence is translated along the time axis. For each translation amount, the correlation between the first-order difference sequence of the voltage data sequence and the first-order difference sequence of the translated power data sequence is analyzed to obtain the most relevant translation amount. The timestamps of all electrical data sequences on the other side of the interconnection switch are shifted according to the most relevant shift amount to obtain historical electrical data.
[0027] When the tie switch is in the closed position, the electrical data (voltage and power) on both sides of the switch are affected by the same load event, and the fluctuations in the data on both sides should be synchronous in time. When there is a clock skew between the two acquisition devices, the occurrence time of the same load event in the data on both sides will be misaligned, causing the fluctuations that should be synchronous to appear offset on the time axis. By shifting the data on one side along the time axis and calculating the correlation coefficient of the first-order difference sequence of the data on both sides after the shift, the degree of synchronicity of the data on both sides at different shift positions can be quantified. When the shift amount exactly compensates for the actual clock skew, the load change characteristics of the data on both sides reach optimal alignment, and the correlation coefficient reaches its maximum value. The shift amount at this point is an accurate estimate of the system clock skew. This estimate is used to correct the original timestamp, ensuring that subsequent impedance analysis and residual analysis based on the linear relationship between voltage drop and power change are based on time-aligned data.
[0028] As a concrete example, using the current query time as a reference, historical electrical data for the 24 hours preceding the current time is extracted from the SCADA historical database at the measuring points on both sides of the tie switch. It should be noted that the historical electrical data includes at least the nodes on one side of the tie switch. The voltage sequence, active power sequence, and reactive power sequence, as well as the node on the other side of the tie switch. The voltage sequence, active power sequence, and reactive power sequence.
[0029] It should be understood that the measuring point is located at the bus or feeder outlet on both sides of the tie switch. This location ensures that even if the tie switch is in the open state, the measuring point still bears the independent load current of its respective power supply area, ensuring that the current data as the denominator in subsequent steps is not zero.
[0030] Select Node The voltage sequence is used as the time reference sequence. A unified standard time axis is set, and the sampling interval is set to 1 minute. All original electrical data sequences are linearly interpolated to map them onto the standard time axis.
[0031] To find nodes Electrical data relative to nodes The true time offset between electrical data, keeping the nodes The voltage sequence time axis remains unchanged, and the nodes are... The power sequence is shifted on the time axis, and the search window is set to... Within the search window, iterate through all possible translations in steps of 10 seconds.
[0032] In practical applications, the time range of the search window can be adjusted according to requirements. In this embodiment, because the clock deviation between SCADA terminals is usually in the range of seconds to minutes, the time range is set... A search range of minutes can cover the vast majority of clock deviation situations in actual engineering.
[0033] For a translation, first calculate the nodes. The first-order difference sequence of the voltage sequence and the nodes after shifting by the shift amount The first-order difference sequence of the power sequence is obtained, and then the Pearson correlation coefficient of the temporal overlap between the two first-order difference sequences is calculated. The reason for calculating the first-order difference sequence is that the first-order difference can more sensitively reflect the characteristics of load abrupt changes and highlight the synchronicity of changes compared to the original sequence.
[0034] The shift corresponding to the maximum absolute value of the calculated Pearson correlation coefficient is used as the estimate. Under this shift, the load change characteristics of the data on both sides are most consistent, indicating that the data on both sides have reached the optimal alignment in time. The nodes are then... The time shift amount corresponding to the timestamp shift of all electrical data sequences.
[0035] Furthermore, in some implementations of the embodiments of the present invention, the method for filtering the significant interval includes: The difference in active power on both sides of the tie switch in the historical electrical data between adjacent sampling times is analyzed and used as the first power variation sequence and the second power variation sequence, respectively. The elements at the same position in the first power variation sequence and the second power variation sequence are summed to obtain the comprehensive power variation sequence. The comprehensive power variation sequence is traversed using a sliding window of a preset length. The sum of all power variations within each sliding window is calculated as a significance index. The time period corresponding to the sliding window is selected as the significance interval based on the significance index.
[0036] When the distribution network is operating under steady-state load, the current flowing through the lines changes relatively little. The voltage drop caused by the line impedance is often masked by the measurement noise of the voltage transformer (including ratio error and random white noise). At this time, regardless of whether the switch is closed or open, the voltage data behaves very similarly, making it difficult to extract the characteristic differences that effectively distinguish between the electrically connected and disconnected states. Only at the moment of a significant step change in load does the proportion of the voltage drop component on the line impedance in the total measurement error maximize: when the switch is closed, load fluctuations cause the line impedance voltage drop to exhibit a regular linear change; when the switch is open, the voltages on both sides are affected by different power sources and exhibit independent random fluctuation characteristics. Therefore, by screening the intervals with significant load fluctuations, the characteristic differences between the electrically connected and disconnected states can be amplified.
[0037] When the load undergoes a significant step change, the severity of the load fluctuation is quantified by calculating the absolute value of the first-order difference of active power. The total fluctuation energy within the time period is evaluated by using a sliding window accumulation method. The interval with the highest energy score is selected, which can identify the period with the highest signal-to-noise ratio in historical data. This provides the best data carrier for subsequent analysis based on line impedance stability and the randomness of voltage fitting residuals, amplifies the characteristic differences between electrical connection and disconnection states, and improves the accuracy of electrical connection confidence calculation.
[0038] As a concrete example, for each sampling time in the historical electrical data, the absolute value of the difference between the active power of the nodes on both sides of the tie switch at the current sampling time and the previous sampling time is calculated as a difference index, resulting in the first power change sequence and the second power change sequence. The instantaneous rate of change of active power is used to characterize the intensity of the current disturbance flowing through the measuring point; the larger the value, the more severe the load fluctuation of the power grid at that moment.
[0039] A sliding window with a preset length of 15 minutes is used to traverse the power variation values across the entire time axis. For each sliding window, the sum of all power variation values within the window is calculated. In other words, the power variation values at each moment within the window are accumulated as a significant indicator to reflect the total intensity of load fluctuations during that period. The larger the sum, the more severe the load fluctuations during that period, i.e., the more significant they are.
[0040] All sliding windows are sorted in descending order based on their cumulative sum. Non-maximum suppression is then performed, meaning that if the overlap between two high-scoring windows on the time axis exceeds a preset threshold (e.g., 50%), the lower-scoring window is discarded. Non-maximum suppression avoids selecting overlapping time intervals, ensuring that the selected significant intervals are diverse in time and preventing the use of repetitive or highly similar data fragments in subsequent analyses.
[0041] The top five sliding windows are selected as significant intervals for load fluctuations. These intervals represent the moments with the highest signal-to-noise ratio in the distribution network during historical periods, serving as the optimal data carrier for subsequent impedance and residual analyses based on the linear relationship between voltage drop and power variation. By selecting these significant load fluctuation intervals, the characteristic differences between electrical connection and disconnection states can be amplified, improving the accuracy of subsequent electrical connection confidence calculations.
[0042] Step S102: Analyze the bidirectional power flow characteristics of the tie switch in each significant interval, calculate the line impedance and voltage fitting residual, and combine the stability of the line impedance and the randomness of the voltage fitting residual to obtain the electrical connection confidence level.
[0043] Verifying the true electrical connection status of the tie switch using electrical physics principles helps identify potential false states or positional hysteresis issues in SCADA remote signaling. When the switch is closed, the line is a physically connected metallic conductor, and its impedance should remain stable with load fluctuations. The residual after fitting the linear relationship between voltage drop and power change should exhibit random noise characteristics. When the switch is open, the voltages on both sides are affected by different power sources, and the calculated impedance will exhibit divergent characteristics with load fluctuations. The voltage fitting residual will contain significant unexplained trend terms. By analyzing the statistical characteristics of these two dimensions, we can effectively distinguish between numerical fitting coincidences and true electrical connections, providing objective electrical evidence for subsequently generating electrical connection confidence scores and ensuring that the confidence score calculation results are based on physical facts rather than erroneous data.
[0044] The statistical characteristics of line impedance stability and voltage fitting residual randomness are quantified into a unified numerical index to quantify the probability of the tie switch being in an electrically connected state. This comprehensively reflects the strength of electrical connection evidence contained in historical electrical data, eliminates the random errors that may exist in a single index, and provides a stable and reliable numerical basis for subsequent judgment of connection status. This enables the system to judge the switch status based on objective electrical evidence rather than a single voltage threshold at a single moment. When the judgment result is inconsistent with the SCADA remote signaling status, constraint instructions are generated to realize hard constraints on the reasoning process of the large model and prevent the generation of misleading operation and maintenance suggestions based on erroneous remote signaling status.
[0045] Furthermore, in some implementations of this invention, the method for calculating the stability of the line impedance includes: For each significant interval, based on the linear relationship between voltage drop and power, the bidirectional flow characteristics of power within the significant interval are analyzed, and forward and reverse models are established respectively. The dominant model is then solved, and the constant term of the dominant model is used as the system deviation. The voltage drop at each sampling time is then corrected based on the system deviation. Calculate the equivalent current at each sampling time within the significant interval, and calculate the line impedance at each sampling time within the significant interval based on the corrected voltage drop and the equivalent current; Calculate the dispersion index characterizing the line impedance distribution within the significant interval, which serves as the stability of the line impedance within the significant interval.
[0046] As a concrete example, for each significant interval, a regression model is first constructed based on the linear relationship between voltage drop and power. Specifically, since the power flow direction of the tie switch is uncertain, a forward power supply assumption is established (assuming power is supplied by the node). Flow to Node (and the reverse power supply assumption).
[0047] Taking the positive hypothesis as an example, taking the nodes With active and reactive power as independent variables and the voltage difference (voltage drop) between the two sides as the dependent variable, the following linear regression equation is constructed: in, , Let these represent the line resistance and reactance coefficients to be solved, respectively. This represents the systematic deviation in the voltage measurement value to be solved; This represents the voltage amplitude difference between the two sides of the k-th significant interval at the t-th sampling time, which is the total voltage loss along the entire line. , Let represent the active power and reactive power at the t-th sampling time of the k-th significant interval, respectively.
[0048] The above equations are solved using the least squares method, with the goal of minimizing the sum of squared residuals. Physical constraints are applied during the solution process. , and restrictions Not exceeding the rated voltage Simultaneously calculate the residual energy under the inverse assumption, and select the set of assumptions with the minimum residual energy as the dominant physical model for the significant interval, and save the optimal system bias estimate under this dominant model. This is used for subsequent impedance analysis.
[0049] Based on the systematic bias obtained from the linear regression model, the voltage drop at each sampling time within the significant interval is corrected. That is, the systematic bias is subtracted from the voltage amplitude difference on both sides at each sampling time within the significant interval to obtain the true physical voltage drop caused only by line impedance after removing the measurement error.
[0050] For each sampling time within each significant interval, calculate the equivalent current magnitude flowing through the measurement point using the following formula: in, This represents the equivalent current magnitude at the t-th sampling time within the k-th significant interval. , Let represent the active power and reactive power at the t-th sampling time of the k-th saliency interval, respectively. This indicates the rated voltage of the power grid where the line to be monitored is located.
[0051] It should be understood that this formula is based on the fundamental relationships of the power system. (Single-phase system) or (For a three-phase system), the apparent power is converted into an equivalent value of current using the rated voltage. The rated voltage is used instead of the real-time voltage to avoid additional calculation noise introduced by small voltage fluctuations, and the difference between the two is minimal under steady-state operation, which meets the engineering approximation requirements.
[0052] Based on the corrected ratio of voltage drop to equivalent current, the line impedance at each sampling time within the significant interval is calculated. The numerator represents the true physical voltage drop caused only by the line impedance after removing measurement errors, and the denominator represents the current excitation flowing through the line (a minimum value of 1e-6 is added to the denominator to avoid it being zero). The quotient is the impedance magnitude of the line. According to Ohm's law, if the switch is electrically closed, the line is a physically connected metallic conductor, and its impedance should be a fixed constant that does not change with the current. If the switch is open, the voltage difference in the numerator and the current in the denominator originate from two independent systems with no physical causal relationship. The calculated impedance will exhibit a drastic divergence characteristic with fluctuations in the current.
[0053] Stability analysis was performed on the line impedance sequence calculated within the significant interval. To avoid interference from impulse noise in the SCADA data on the statistical results, the interquartile range (IQR) from robust statistics was used to quantify the impedance dispersion. The specific implementation steps are as follows: First, the impedance sequence values within the significant interval were sorted from smallest to largest. Then, the first quartile Q1 (value at the 25th percentile), the median Q2 (value at the 50th percentile), and the third quartile Q3 (value at the 75th percentile) of the sequence were determined. Finally, the dispersion of the impedance sequence was calculated, which is the ratio of the difference between Q3 and Q1 to Q2 (a minimum value of 1e-6 was added to the denominator to avoid the denominator being zero). If the switch is closed, due to the constant physical impedance of the metallic conductor, the values in the impedance sequence should fluctuate closely around the actual impedance value, with Q3 and Q1 being extremely close, causing the numerator to approach 0, and thus the dispersion to approach 0. If the switch is open, the calculated impedance result jumps dramatically with the drastic fluctuations in current, resulting in a huge difference between Q3 and Q1, making the dispersion significantly greater than 0. By calculating the dispersion and using it as a stability index, the stability of the impedance sequence can be quantified.
[0054] Furthermore, in some implementations of this invention, the method for calculating the randomness of the voltage fitting residual includes: For each significant interval, the fitted voltage drop at each sampling time is obtained based on the relationship between voltage drop and power, and the residual between the actual voltage drop and the fitted voltage drop at each sampling time is calculated; The absolute value of the first-order autocorrelation coefficient of the residual is calculated as the randomness of the voltage fitting residual in the significant interval.
[0055] As a concrete example, for each significant interval, the fitted voltage drop at each sampling time is calculated based on the linear relationship between voltage drop and power. Specifically, the dominant model is obtained using the linear regression model constructed in the above steps. The power data at each sampling time is substituted into the dominant model to calculate the fitted voltage drop at that time. The fitted voltage drop represents the theoretical value of the voltage drop predicted based on the power data under an ideal linear relationship.
[0056] In another specific example, in addition to using the linear regression model constructed in the above steps to fit the voltage drop, the lookup table method can be used to directly look up the design parameters of the line (conductor type, length, cross-sectional area) in the electrical manual to obtain the theoretical resistance and reactance for fitting; a nonlinear optimization algorithm (such as genetic algorithm, particle swarm optimization algorithm) can be used to construct a nonlinear objective function and directly search for the optimal combination to minimize the overall error; a trained machine learning model (such as neural network, support vector machine) can be used to fit the voltage drop. This invention does not limit the specific fitting method.
[0057] For each sampling time point within the significant interval, the residual between the actual voltage drop and the fitted voltage drop is calculated, i.e., the difference between the actual voltage drop and the fitted voltage drop, resulting in a residual sequence. The residual reflects the error portion that cannot be explained by the linear relationship between voltage drop and power, including measurement noise and model bias.
[0058] In the third specific example, because the above steps performed linear interpolation on the original data to unify the time axis, the interpolation process generates additional data points between adjacent original data points. These additional data points are mathematically correlated, which can interfere with the judgment of the randomness of the residuals. Therefore, the residual sequence is resampled according to the original sampling interval of the historical electrical data, and the residual values corresponding to the original sampling time are extracted from the residual sequence, eliminating the data points generated by the time alignment interpolation process. By using only the residual values at the original sampling time for subsequent analysis, the additional correlation introduced by the interpolation algorithm can be eliminated, ensuring that the randomness analysis results truly reflect the statistical characteristics of the original data.
[0059] For the resampled residual sequence, the absolute value of its first-order autocorrelation coefficient is calculated as an index of the randomness of the voltage fitting residual in that significant interval. The first-order autocorrelation coefficient is well known to those skilled in the art, and the specific calculation process will not be elaborated here. This index reflects the degree of linear correlation between data points at adjacent time points in the residual sequence. If the switch is in the closed position, the residual mainly contains random measurement noise (white noise), and the residual values at different time points are uncorrelated, so the index tends to be close to 0. If the switch is in the open position, the voltages on both sides are affected by different power sources or nearby loads, containing independent low-frequency fluctuation trends. This trend cannot be eliminated by the linear model, causing the residual sequence to exhibit memory, that is, the residual at the current time point is positively correlated with the residual at the previous time point, and the index deviates significantly from 0 (usually close to 1). By calculating this index, the degree of randomness of the voltage fitting residual can be quantified, providing a basis for subsequent calculation of the electrical connection confidence.
[0060] Furthermore, in some implementations of the embodiments of the present invention, the method for calculating the electrical connection confidence includes: Calculate the stability arithmetic mean of the line impedance and the randomness arithmetic mean of the voltage fitting residuals for all significant intervals. Based on preset impedance weighting coefficients and residual weighting coefficients, weight the impedance stability arithmetic mean and the residual randomness arithmetic mean to obtain the electrical connection confidence level.
[0061] As a concrete example, we first calculate the arithmetic mean of the stability of the line impedance in all significant intervals and the absolute value of the randomness of the voltage fitting residuals to obtain the arithmetic mean. By averaging the impedance stability over multiple independent time periods, we can eliminate the random errors or data quality problems that may exist in a single time period, and obtain a comprehensive index reflecting the overall impedance stability. When the switch is actually in the closed position, the stability of all significant intervals should approach 0, and its arithmetic mean should also approach 0; when the switch is in the open position, the stability of each significant interval should be significantly greater than 0, and its arithmetic mean should also be significantly greater than 0.
[0062] Whether positive or negative, the residual sequence indicates the presence of a trend term. Only when the randomness approaches zero does the residual approach white noise. By averaging the randomness of the residuals over multiple independent periods, the randomness of a single period can be eliminated, resulting in a comprehensive index reflecting the overall randomness of the residuals.
[0063] Based on preset impedance weighting coefficients and residual weighting coefficients, the arithmetic mean of impedance stability and the arithmetic mean of residual randomness are weighted and combined to obtain the electrical connection confidence level. The specific weighting combination function can take various forms, such as a product form. in, Indicates the confidence level of electrical connections. , These represent the arithmetic mean of impedance stability and the arithmetic mean of residual randomness, respectively. , These represent the impedance weighting coefficient and the residual weighting coefficient, respectively. In this embodiment, they are set to 10 and 5, respectively, to amplify the discriminative power of the eigenvalues. Adjusting the sensitivity of these two indicators to the final confidence level, a larger weighting coefficient allows even small changes in the indicator to significantly affect the confidence level, thus improving the sensitivity of the judgment. In practical applications, these can be adjusted according to requirements.
[0064] The range of values for the electrical connection confidence level is: The closer the confidence level is to 1, the higher the probability that the switch is in an electrically connected state based on historical electrical data; the closer the confidence level is to 0, the higher the probability that the switch is in an open state. This confidence level provides quantitative and objective electrical evidence for subsequent determination of connection status and generation of constraint instructions.
[0065] Step S103: Determine the actual connection status of the tie switch based on the electrical connection confidence level. When the actual connection status is inconsistent with the real-time remote signaling status, generate constraint instructions based on the line impedance and the voltage fitting residual.
[0066] The electrical connection confidence level calculated based on historical electrical data is used as a second information source independent of the SCADA system. This source is cross-validated with the real-time remote signaling status of the SCADA system to identify potential false statuses or position change hysteresis issues in the remote signaling data. The electrical connection confidence level comprehensively reflects two electrical physical characteristics: line impedance stability and the randomness of voltage fitting residuals. A high confidence level indicates that the switch is truly in the closed position, while a low confidence level indicates that the switch is truly in the open position. This judgment is based on physical facts rather than potentially erroneous remote signaling data.
[0067] When the actual connection status is inconsistent with the real-time remote signaling status, it indicates that there is an error in the SCADA remote signaling data. Directly accepting this erroneous status will lead to the large model generating misleading operation and maintenance suggestions. Therefore, it is necessary to construct constraint instructions based on objective electrical evidence of line impedance and voltage fitting residuals. In subsequent steps, the large model is forced to ignore the erroneous remote signaling status and generate operation and maintenance suggestions based on correct physical facts. This achieves hard constraints of electrical physical truth on the reasoning process of the large model and prevents misleading outputs based on erroneous data.
[0068] Furthermore, in some implementations of this invention, the method for determining the actual connection state includes: The preset quantile of the electrical connection confidence history data is used as the confidence threshold. When the electrical connection confidence is greater than or equal to the confidence threshold, the actual connection status is determined to be in place. When the electrical connection confidence is less than the confidence threshold, the actual connection status is determined to be in place.
[0069] As a concrete example, historical data on the electrical connection confidence of the tie switch, calculated based on its historically confirmed connection status, is obtained. Specifically, the system retrieves historical time periods (e.g., the past year) from the historical database or dispatch logs showing that the tie switch was explicitly in a closed state through manual on-site confirmation or dispatch records. For these confirmed closed historical time periods, the system calculates the electrical connection confidence for each period using the same method described above, resulting in a set of historical confidence sample data. This historical confidence data reflects the confidence distribution characteristics of the switch in its actual connection state, providing a reference benchmark for subsequently determining the judgment threshold.
[0070] The historical confidence score sample set is sorted from smallest to largest, and the value corresponding to the 5th percentile is selected as the threshold. When the switch is actually in the closed state, the electrical connection confidence score should be close to 1. However, due to factors such as measurement noise and data quality, historical confidence scores may fluctuate. Choosing the 5th percentile as the threshold means that in 95% of historical closed states, the confidence score is higher than this threshold, which represents a conservative and safe judgment standard. If the currently calculated confidence score is higher than this threshold, the system has a high confidence level in judging that the switch is in the closed position; otherwise, the system judges that the switch is in the open position. Compared with using a fixed threshold, the dynamic calibration method based on historical data can adapt to the differences in different lines and operating environments, improving the accuracy and robustness of the judgment.
[0071] Furthermore, in some implementations of the embodiments of the present invention, the method for generating the constraint instructions includes: The line impedance is compared with a preset stability benchmark, and the voltage fitting residual is compared with a preset randomness benchmark. The comparison results are converted into electrical evidence text described in natural language using preset rules, and the electrical evidence text is concatenated as constraint instructions.
[0072] As a specific example, the real-time SCADA remote signaling status of the tie switch is compared with the actual connection status determined through the above steps. If they are inconsistent, the arithmetic mean of the impedance stability indices of all significant intervals is compared with a preset stability benchmark. When the arithmetic mean of the impedance stability indices of all significant intervals is less than the preset stability benchmark, the descriptive text "The equivalent impedance of the line remains highly stable during load fluctuations, which conforms to the characteristics of metallic conduction" is generated; otherwise, the descriptive text "The equivalent impedance of the line exhibits divergent characteristics with load fluctuations, which conforms to the characteristics of an open circuit" is generated.
[0073] The arithmetic mean of the residual randomness indexes of all significant intervals is compared with the preset randomness benchmark. When the arithmetic mean of the residual randomness indexes of all significant intervals is less than the preset randomness benchmark, the descriptive text "The voltage fitting residuals exhibit white noise distribution with no residual trend term" is generated; otherwise, the descriptive text "The voltage fitting residuals contain significant unexplained trend terms, indicating that the voltage fluctuation sources on both sides are independent" is generated.
[0074] The preset stability benchmark is calibrated based on historical data, and the typical value of the impedance stability index of the line under actual connection conditions is selected as the benchmark; the preset randomness benchmark is also calibrated based on historical data, and the typical value of the residual randomness index of the line under actual connection conditions is selected as the benchmark.
[0075] The generated natural language descriptions are concatenated to form a complete electrical evidence text, which serves as a constraint instruction.
[0076] Step S104: Construct a context containing the electrical connection confidence based on the constraint instructions, and input the context into the power big model to generate a distribution network operation and maintenance response.
[0077] Objective evidence (constraint instructions and electrical connection confidence levels) obtained through verification by electrophysical laws is integrated into the reasoning process of the large model to achieve hard constraints on the generative AI model. Since general-purpose large language models cannot directly understand numerical features (such as confidence levels), it is necessary to transmit the electrophysical truth to the large model through constraint instructions in the form of natural language, while providing confidence levels for the large model to refer to in order to determine the credibility.
[0078] When the large model generates operation and maintenance recommendations based on this context, it will forcibly ignore erroneous SCADA remote signaling states and adopt the actual connection status determined based on historical electrical data. This prevents the large model from generating misleading operation recommendations based on incorrect remote signaling data (such as recommending to close switches that are actually closed but whose remote signaling displays are open, leading to asynchronous grid connection accidents or relay protection malfunctions). By constraining the large model's reasoning process with electrical physical truth values, it ensures that the generated operation and maintenance recommendations are based on correct physical facts, improving the accuracy and security of the distribution network operation and maintenance knowledge Q&A system, and ensuring the safe operation of power grid dispatching.
[0079] Furthermore, in some implementations of the embodiments of the present invention, the distribution network operation and maintenance response method includes: The constraint instructions and the electrical connection confidence are added to a preset dynamic prompt word template to construct a context, and the context is input into the power big model to generate a distribution network operation and maintenance response.
[0080] As a concrete example, the system receives a user-initiated request for knowledge query on distribution network operation and maintenance. The query request can be in natural language, such as "What is the current status of the XX interconnecting switch?", "Please generate a switching operation ticket for the XX switch", or "A fault has occurred on the XX line, how should it be handled?". The system parses the query request, identifies the object of the query (such as a specific interconnecting switch) and the intent of the query (such as status query, operation suggestions, fault handling, etc.).
[0081] Insert the original question from the user's query into the template, then insert constraint instructions, including electrical evidence text and the actual connection status, such as "Note: According to historical electrical data analysis, the current actual connection status of this switch is closed, the line impedance is stable and the residual is random. SCADA remote signaling shows it as open, but electrical evidence indicates that the switch is actually in the conducting state. Please make a judgment based on the electrical connection status." Finally, insert the electrical connection confidence score, such as "The electrical connection confidence score is 0.92, indicating that the judgment is highly reliable." This context conveys objective electrical evidence to the large model in natural language, enabling the large model to understand and accept this evidence.
[0082] The constructed context is sent as input prompts to the power big data model, triggering the model to generate distribution network operation and maintenance responses. The power big data model is a large language model pre-trained or fine-tuned based on a large-scale power industry corpus, capable of understanding power industry terminology, dispatching procedures, and operational processes. The big data model infers based on the input context, strictly adhering to constraint instructions when generating responses, accepting actual connection states determined by electrical and physical laws, and ignoring erroneous SCADA remote signaling states. When a user requests the generation of an operation ticket, the big data model generates safe and reliable operation suggestions based on the actual connection states, avoiding misleading operations based on incorrect remote signaling states (such as suggesting reclosing a closed switch). By using hard constraints on the big data model's inference process based on electrical and physical truth values, the generated distribution network operation and maintenance responses are ensured to be based on correct physical facts, improving the accuracy and security of the question-and-answer system.
[0083] Example 2: Please see Figure 2 The diagram illustrates a system architecture of a power grid operation and maintenance knowledge Q&A system based on a large power model, according to an embodiment of the present invention. The system includes a data processing module 201, a status judgment module 202, and a Q&A response module 203.
[0084] The data processing module 201 is used to acquire historical electrical data and real-time remote signaling status on both sides of the tie switch, filter out significant intervals in the historical electrical data where load fluctuations exist, analyze the bidirectional power flow characteristics of the tie switch in each significant interval, calculate the line impedance and voltage fitting residual, and obtain the electrical connection confidence level by combining the stability of the line impedance and the randomness of the voltage fitting residual.
[0085] The status judgment module 202 is used to determine the actual connection status of the tie switch based on the electrical connection confidence level. When the actual connection status is inconsistent with the real-time remote signaling status, a constraint command is generated based on the line impedance and the voltage fitting residual. The question-and-answer response module 203 is used to construct a context containing the electrical connection confidence based on the constraint instructions, and input the context into the power big model to generate a distribution network operation and maintenance response.
[0086] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0087] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model, characterized in that, The method includes: Obtain historical electrical data and real-time remote signaling status from both sides of the interconnection switch, and filter out significant intervals in the historical electrical data that show load fluctuations; The bidirectional power flow characteristics of the tie switch in each significant interval are analyzed, the line impedance and voltage fitting residual are calculated, and the electrical connection confidence level is obtained by combining the stability of the line impedance and the randomness of the voltage fitting residual. The actual connection status of the tie switch is determined based on the electrical connection confidence level. When the actual connection status is inconsistent with the real-time remote signaling status, a constraint command is generated based on the line impedance and the voltage fitting residual. Based on the constraint instructions, a context containing the electrical connection confidence is constructed, and the context is input into the power big model to generate a distribution network operation and maintenance response.
2. The knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model as described in claim 1, characterized in that, The method for acquiring historical electrical data includes: Obtain the first-order differential sequence of the voltage data sequence on one side of the interconnection switch and the first-order differential sequence of the power data sequence on the other side; Within a preset time range, a translation amount is selected, and the first-order difference sequence of the power data sequence is translated along the time axis. For each translation amount, the correlation between the first-order difference sequence of the voltage data sequence and the first-order difference sequence of the translated power data sequence is analyzed to obtain the most relevant translation amount. The timestamps of all electrical data sequences on the other side of the interconnection switch are shifted according to the most relevant shift amount to obtain historical electrical data.
3. The knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model as described in claim 1, characterized in that, The methods for filtering the significant intervals include: The difference in active power on both sides of the tie switch in the historical electrical data between adjacent sampling times is analyzed and used as the first power variation sequence and the second power variation sequence, respectively. The elements at the same position in the first power variation sequence and the second power variation sequence are summed to obtain the comprehensive power variation sequence. The comprehensive power variation sequence is traversed using a sliding window of a preset length. The sum of all power variations within each sliding window is calculated as a significance index. The time period corresponding to the sliding window is selected as the significance interval based on the significance index.
4. The knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model as described in claim 1, characterized in that, The method for calculating the stability of the line impedance includes: For each significant interval, based on the linear relationship between voltage drop and power, the bidirectional flow characteristics of power within the significant interval are analyzed, and forward and reverse models are established respectively. The dominant model is then solved, and the constant term of the dominant model is used as the system deviation. The voltage drop at each sampling time is then corrected based on the system deviation. Calculate the equivalent current at each sampling time within the significant interval, and calculate the line impedance at each sampling time within the significant interval based on the corrected voltage drop and the equivalent current; Calculate the dispersion index characterizing the line impedance distribution within the significant interval, which serves as the stability of the line impedance within the significant interval.
5. The knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model as described in claim 1, characterized in that, The method for calculating the randomness of the voltage fitting residual includes: For each significant interval, the fitted voltage drop at each sampling time is obtained based on the relationship between voltage drop and power, and the residual between the actual voltage drop and the fitted voltage drop at each sampling time is calculated; The absolute value of the first-order autocorrelation coefficient of the residual is calculated as the randomness of the voltage fitting residual in the significant interval.
6. The knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model as described in claim 1, characterized in that, The method for calculating the electrical connection confidence level includes: Calculate the stability arithmetic mean of the line impedance and the randomness arithmetic mean of the voltage fitting residuals for all significant intervals. Based on preset impedance weighting coefficients and residual weighting coefficients, weight the impedance stability arithmetic mean and the residual randomness arithmetic mean to obtain the electrical connection confidence level.
7. The knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model as described in claim 1, characterized in that, The method for determining the actual connection status includes: The preset quantile of the electrical connection confidence history data is used as the confidence threshold. When the electrical connection confidence is greater than or equal to the confidence threshold, the actual connection status is determined to be in place. When the electrical connection confidence is less than the confidence threshold, the actual connection status is determined to be in place.
8. The distribution network operation and maintenance knowledge question-and-answer method based on a large power model as described in claim 1, characterized in that, The method for generating the constraint instructions includes: The line impedance is compared with a preset stability benchmark, and the voltage fitting residual is compared with a preset randomness benchmark. The comparison results are converted into electrical evidence text described in natural language using preset rules, and the electrical evidence text is concatenated as constraint instructions.
9. The knowledge-based question-and-answer method for distribution network operation and maintenance based on a large power model as described in claim 1, characterized in that, The distribution network operation and maintenance response method includes: The constraint instructions and the electrical connection confidence are added to a preset dynamic prompt word template to construct a context, and the context is input into the power big model to generate a distribution network operation and maintenance response.
10. A knowledge-based question-and-answer system for distribution network operation and maintenance based on a large power model, characterized in that, The system includes: The data processing module is used to acquire historical electrical data and real-time remote signaling status on both sides of the tie switch, filter out significant intervals with load fluctuations in the historical electrical data, analyze the bidirectional power flow characteristics of the tie switch in each significant interval, calculate the line impedance and voltage fitting residual, and obtain the electrical connection confidence level by combining the stability of the line impedance and the randomness of the voltage fitting residual. The status judgment module is used to determine the actual connection status of the tie switch based on the electrical connection confidence level. When the actual connection status is inconsistent with the real-time remote signaling status, a constraint command is generated based on the line impedance and the voltage fitting residual. The question-and-answer module is used to construct a context containing the electrical connection confidence based on the constraint instructions, and input the context into the power big model to generate a distribution network operation and maintenance response.