A power grid station area-oriented data repair method, device, equipment and medium
Patent Information
- Application Number
- CN202611196717.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]现有数据修复方法主要分为两类:一类基于单点或局部时序信息,如前向填充、线性插值、移动平均平滑等,这类方法仅利用同一设备的历史序列,在数据连续波动或异常形态复杂时修复误差急剧增大;另一类基于横向对比,如同类设备同时刻数值的中位数替换,此法忽略了个体工况差异及设备间的电气耦合关系
将所述综合可信度评分与所述量测数据点对应的校验结果进行非线性融合计算,得到修复紧迫度;
Smart Images

Figure CN123013051A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication protocol parsing and information processing, and in particular to a data repair method, apparatus, equipment and medium for power grid distribution areas. Background Technology
[0002] In the intelligent operation and management of power grid distribution areas, the completeness and accuracy of measurement data are fundamental prerequisites for supporting advanced applications such as line loss analysis, load forecasting, and fault diagnosis. However, the actual operating environment of distribution areas is complex. Intelligent terminals are exposed to harsh conditions such as strong electromagnetic interference and drastic temperature and humidity changes for extended periods. In addition, the instability of wireless public networks or carrier communication links themselves inevitably leads to numerical anomalies and data gaps in the measurement data during acquisition, transmission, and analysis. If this compromised data is used directly, it will severely distort the downstream analysis results. Therefore, before data is entered into the database or put into application, it is essential to effectively repair outliers and missing values to restore the original physical state that the data should represent.
[0003] Existing data restoration methods mainly fall into two categories: one is based on single-point or local time-series information, such as forward filling, linear interpolation, and moving average smoothing. These methods only utilize historical sequences from the same device, and the restoration error increases sharply when data fluctuates continuously or exhibits complex anomalies. The other category is based on horizontal comparison, such as replacing the median values of similar devices at the same time. This method ignores individual operating condition differences and electrical coupling relationships between devices. In summary, existing data restoration methods not only fail to support advanced applications but may also interfere with the basic requirements for electrical quantity consistency in fault location, line loss calculation, and other business operations, thus limiting the positive role that data restoration should play in power grid data governance. Summary of the Invention
[0004] This invention provides a data repair method, apparatus, equipment, and medium for power grid distribution areas. It can improve repair accuracy by verifying electrical topology physical constraints and performing spatiotemporal neighborhood aggregation repair, so that the repair results take into account both physical consistency and spatiotemporal correlation information.
[0005] This invention provides a data repair method for power grid distribution areas, including: Receive measurement data points uploaded by each intelligent device within the power grid area, and construct a first mass vector corresponding to each measurement data point; The electrical topology of the power grid area is obtained. Based on the electrical topology, physical constraint verification is performed on each of the measurement data points to obtain the verification result corresponding to each measurement data point. Based on the corresponding verification result, each of the first mass vectors is corrected to obtain the second mass vector corresponding to each measurement data point. Based on the corresponding verification results and the second mass vector, anomaly identification is performed on each of the measurement data points to obtain all target data points to be repaired. Based on the second mass vector corresponding to each target data point and the topological association between each target data point and the measurement data points in the corresponding spatiotemporal neighborhood, a repair target matrix is constructed. The repair target matrix is input into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operation based on the repair target matrix, outputs the repair estimate value corresponding to each target data point, and performs data repair on each target data point based on the corresponding repair estimate value.
[0006] This invention, through the construction of a first quality vector for each measurement data point, establishes an initial quality label for each data point, providing a foundation for subsequent steps. By performing physical constraint verification on each measurement data point according to the electrical topology and correcting the first quality vector based on the verification results to obtain a second quality vector, the physical laws of the power grid can be introduced into the quality assessment process. This allows the corrected second quality vector to carry physical consistency information, guiding subsequent anomaly identification and repair, thereby avoiding repair results that violate circuit principles. By identifying target data points based on the verification results and the second quality vector, and constructing a repair target matrix based on the second quality vector of each target data point and its topological association with data points in the spatiotemporal neighborhood, the numerical values, quality information, and topological associations of the data points to be repaired and their spatiotemporal neighborhoods can be organized into structured inputs to support subsequent repair calculations. By using a spatiotemporal graph neural network model to perform spatiotemporal neighborhood information aggregation calculations based on the repair target matrix to output repair estimates and perform data repair accordingly, the repair process can utilize both spatial topological neighbor information and temporal correlation information simultaneously, thereby avoiding the problem of large repair errors caused by relying solely on historical information from a single device. Compared to existing technologies that rely solely on historical information from a single device or horizontal averages for repair, which cannot guarantee that the repair results conform to the physical laws of the power grid, this application can improve the repair accuracy by using electrical topology physical constraint verification and spatiotemporal neighborhood aggregation repair, thus taking into account both physical consistency and spatiotemporal correlation information.
[0007] Further, the step of performing physical constraint verification on each of the measurement data points according to the electrical topology to obtain the verification result corresponding to each of the measurement data points includes: From the electrical topology, a local topology unit consisting of the target intelligent device and intelligent devices electrically adjacent to the target intelligent device is obtained, and the physical constraint equation of the local topology unit is established according to Kirchhoff's current law and the voltage drop relationship; wherein, the target intelligent device is the intelligent device that uploads the target measurement data point, and the target measurement data point is any measurement data point received. The values of the measurement data points corresponding to each intelligent device in the local topology unit are substituted into the physical constraint equation for calculation to obtain the first weighted constraint residual vector. The values of the measurement data points corresponding to all intelligent devices in the local topology unit except the target intelligent device are substituted into the physical constraint equation for calculation to obtain the second weighted constraint residual vector. Calculate the difference between the first weighted constraint residual vector and the second weighted constraint residual vector, and project the difference onto the covariance matrix of the second weighted constraint residual vector to obtain the statistical test statistic. The probability is calculated based on the probability distribution that the statistical test quantity follows under the null hypothesis, and the topological consistency confidence of the target intelligent device is obtained. The topological consistency confidence is then used as the verification result of the target measurement data point.
[0008] The embodiments of the present invention construct statistical test quantities and calculate topological consistency confidence based on their probability distribution, which can quantify the consistency between target measurement data and physical constraints into a scalar value, providing a clear physical verification basis for subsequent quality correction.
[0009] Further, constructing the first mass vector corresponding to each of the measurement data points includes: For any measurement data point, a range query is performed in the preset rule base according to the physical quantity type of the measurement data point to obtain the theoretical reasonable range of the measurement data point, and a nonlinear exponential operation is performed on the value of the measurement data point and the theoretical reasonable range to obtain the physical rule reasonableness sub-score. Cyclic redundancy check is performed on the original message carrying the measurement data points to obtain the cyclic redundancy check result. Then, based on the cyclic redundancy check result and the channel quality parameters of the original message, an exponential decay operation is performed to obtain the communication link state sub-score. The historical measurement data point sequence of the smart device that uploaded the measurement data points is input into a preset time series prediction model, so that the time series prediction model performs time series consistency prediction based on the historical measurement data point sequence, outputs the prediction result, and performs a proportional calculation based on the prediction result and the value of the measurement data points to obtain the time series prediction consistency sub-score. Obtain the measurement dataset of other smart devices of the same type and under the same operating conditions as the smart device at the current moment, and perform an exponential decay operation on the values of the measurement data points and the measurement dataset to obtain the horizontal consistency sub-score of the device cluster. The physical rule rationality sub-score, the communication link state sub-score, the time series prediction consistency sub-score, and the device cluster horizontal consistency sub-score are combined to obtain the first quality vector corresponding to the measurement data point.
[0010] The embodiments of the present invention calculate sub-scores for four dimensions—physical rule rationality, communication link status, time series prediction consistency, and device cluster horizontal consistency—and combine them into a first quality vector, which can comprehensively quantify the credibility of measurement data points from four dimensions.
[0011] Further, the step of correcting each of the first mass vectors according to the corresponding verification results to obtain the second mass vector corresponding to each of the measurement data points includes: For any measurement data point, based on the verification result corresponding to the measurement data point, the weighted geometric average of the physical rule rationality sub-score and the equipment cluster horizontal consistency sub-score in the first quality vector corresponding to the measurement data point is performed to obtain the first physical rule rationality score and the first equipment cluster horizontal consistency sub-score. The first physical rule rationality sub-score and the first device cluster horizontal consistency sub-score are combined with the communication link status sub-score and the time series prediction consistency sub-score in the first quality vector according to a preset dimensional order to obtain the second quality vector corresponding to the measurement data point.
[0012] This invention, through a weighted geometric mean correction applied only to the physical rule rationality sub-score and the device cluster horizontal consistency sub-score in the first quality vector, while keeping the communication link state sub-score and the time series prediction consistency sub-score unchanged, can selectively inject the physical constraint verification conclusions into the dimensions directly related to physical correctness in the quality vector. This allows the corrected quality vector to carry physical consistency information without losing the original evaluation information of other dimensions.
[0013] Further, the step of identifying anomalies in each of the measurement data points based on the corresponding verification results and the second quality vector to obtain all target data points to be repaired includes: For any measurement data point, the weighted geometric mean of the sub-scores of each dimension in the second quality vector corresponding to the measurement data point is calculated to obtain the comprehensive credibility score. The urgency of repair is obtained by performing a non-linear fusion calculation between the comprehensive credibility score and the verification results corresponding to the measurement data points. When the repair urgency is greater than a preset repair urgency threshold and the overall credibility score is less than a preset overall credibility threshold, the measurement data point is identified as the target data point.
[0014] This invention provides a comprehensive credibility score by weighted geometric average of the sub-scores of each dimension of the second quality vector, and nonlinearly integrates it with the verification results to calculate the repair urgency. When the repair urgency is greater than the repair urgency threshold and the comprehensive credibility score is less than the comprehensive credibility threshold, it is identified as a target data point. It can filter the data points to be repaired based on the dual conditions of comprehensive credibility score and physical verification results, ensuring that only statistically abnormal data points with physically confirmed problems are sent to the repair process.
[0015] Further, the step of constructing the repair target matrix based on the second mass vector corresponding to each target data point and the topological association between each target data point and the corresponding measurement data points in the spatiotemporal neighborhood includes: For any target data point, the neighborhood range is expanded according to the repair urgency of the target data point to obtain the spatiotemporal neighborhood range corresponding to the target data point. The feature vector corresponding to the target data point is obtained by combining the values of each adjacent measurement data point within the spatiotemporal neighborhood, the second mass vector corresponding to each adjacent measurement data point, and the topological association between each adjacent measurement data point and the target data point. The feature vectors corresponding to all target data points are combined in a preset order to obtain the repair target matrix.
[0016] By expanding the spatiotemporal neighborhood range according to the urgency of repair, the embodiments of the present invention enable data points with higher repair urgency to obtain a larger spatiotemporal neighborhood search range, providing a reference information amount that matches the degree of anomaly for repair.
[0017] Further, the step of inputting the repair target matrix into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operations based on the repair target matrix and outputs the repair estimate value corresponding to each target data point, includes: The repair target matrix is input into the spatiotemporal graph neural network model. The graph construction module constructs a heterogeneous graph based on each measurement data point in the repair target matrix and the electrical connection relationship and timing relationship between each measurement data point. The spatiotemporal graph neural network model includes the graph construction module, the quality-guided aggregation module, and the decoding module. The quality-guided aggregation module performs attention-weighted updates on the first features of each node in the heterogeneous graph and outputs the second features of each node. The decoding module maps each of the second features and outputs the repair estimate corresponding to each of the target data points.
[0018] In this embodiment of the invention, a graph construction module constructs a heterogeneous graph based on electrical connection relationships and temporal sequence relationships, a quality-guided aggregation module performs attention-weighted updates on node features, and a decoding module maps and outputs repair estimates. This allows for the simultaneous aggregation of neighborhood information in both spatial topology and temporal sequence dimensions, and the integration of neighbor contributions based on the quality information differences of each node during the aggregation process through an attention mechanism.
[0019] Another embodiment of the present invention provides a data repair device for power grid distribution areas, comprising: a data receiving module, a constraint verification module, an anomaly identification module, and a data repair module; The data receiving module is used to receive measurement data points uploaded by each smart device in the power grid area, and to construct a first mass vector corresponding to each measurement data point. The constraint verification module is used to obtain the electrical topology of the power grid area, perform physical constraint verification on each of the measurement data points according to the electrical topology, obtain the verification result corresponding to each of the measurement data points, and correct each of the first mass vectors according to the corresponding verification result to obtain the second mass vector corresponding to each of the measurement data points. The anomaly identification module is used to identify anomalies in each of the measurement data points according to the corresponding verification results and the second mass vector, to obtain all target data points to be repaired, and to construct a repair target matrix according to the second mass vector corresponding to each target data point and the topological association relationship between each target data point and the measurement data points in the corresponding spatiotemporal neighborhood. The data repair module is used to input the repair target matrix into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operation based on the repair target matrix, outputs the repair estimate value corresponding to each target data point, and performs data repair on each target data point based on the corresponding repair estimate value.
[0020] Another embodiment of the present invention provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps of a data repair method for power grid substations as described in the present invention.
[0021] Another embodiment of the present invention also provides a computer-readable storage medium item, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform the steps of a data repair method for power grid substations as described in the present invention. Attached Figure Description
[0022] Figure 1A flowchart illustrating an embodiment of the data repair method for power grid distribution areas provided by the present invention; Figure 2 This is a schematic diagram of one embodiment of the data repair device for power grid substations provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] 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 application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0025] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0026] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0027] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0028] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0029] See Figure 1 To address the problem that existing technologies, which rely solely on historical information from single devices or horizontal averages for repair, cannot guarantee that the repair results conform to the physical laws of the power grid, an embodiment of the present invention provides a data repair method for power grid distribution areas, including steps S101 to S104: Step S101: Receive measurement data points uploaded by each smart device in the power grid area, and construct a first quality vector corresponding to each measurement data point.
[0030] It should be noted that receiving measurement data points uploaded by various intelligent devices within the power grid area and constructing the first quality vector corresponding to each measurement data point means: for any measurement data point uploaded by any intelligent device within the power grid area, calculating the confidence sub-scores of the measurement data point in four dimensions: physical rule rationality, communication link status, time series prediction consistency, and device cluster horizontal consistency, and combining these four sub-scores into a four-dimensional vector corresponding to the measurement data point. This vector is the first quality vector, used to characterize the initial credibility of the measurement data point in multiple dimensions.
[0031] Preferably, constructing the first mass vector corresponding to each of the measurement data points includes: For any measurement data point, a range query is performed in the preset rule base according to the physical quantity type of the measurement data point to obtain the theoretical reasonable range of the measurement data point, and a nonlinear exponential operation is performed on the value of the measurement data point and the theoretical reasonable range to obtain the physical rule reasonableness sub-score. Cyclic redundancy check is performed on the original message carrying the measurement data points to obtain the cyclic redundancy check result. Then, based on the cyclic redundancy check result and the channel quality parameters of the original message, an exponential decay operation is performed to obtain the communication link state sub-score. The historical measurement data point sequence of the smart device that uploaded the measurement data points is input into a preset time series prediction model, so that the time series prediction model performs time series consistency prediction based on the historical measurement data point sequence, outputs the prediction result, and performs a proportional calculation based on the prediction result and the value of the measurement data points to obtain the time series prediction consistency sub-score. Obtain the measurement dataset of other smart devices of the same type and under the same operating conditions as the smart device at the current moment, and perform an exponential decay operation on the values of the measurement data points and the measurement dataset to obtain the horizontal consistency sub-score of the device cluster. The physical rule rationality sub-score, the communication link state sub-score, the time series prediction consistency sub-score, and the device cluster horizontal consistency sub-score are combined to obtain the first quality vector corresponding to the measurement data point.
[0032] In one embodiment, the method for calculating the sub-score of physical rule rationality is as follows: based on the type of physical quantity of the measured data point, the lower limit and upper limit of its theoretical rational range are obtained; if the actual value of the measured data point is between the lower limit and the upper limit, then based on the closeness of the actual value of the measured data point to the median of the theoretical rational range, a score between zero and one is calculated using a nonlinear exponential function with the natural constant as the base and the negative sharpness coefficient multiplied by the square of the normalized offset as the exponent; the closer the value is to the median, the higher the score. If the actual value of the measured data point exceeds the theoretical rational range, then based on the degree to which the actual value of the measured data point deviates from the nearest range boundary, a lower score is calculated using a nonlinear exponential function, and the further the deviation, the lower the score. The theoretical rational range is determined based on power industry standards and equipment specifications. For example, for the phase voltage of a low-voltage distribution area, the lower limit can be 200 volts and the upper limit can be 250 volts; for current, the lower limit can be 0 amperes, and the upper limit can be set according to the rated capacity of the circuit breaker. The sharpness coefficient controls the steepness of the scoring curve and can be selected between 1 and 10; a typical value is 2. The calculation of the normalized offset essentially transforms the actual deviation into a dimensionless proportion relative to the width of the entire reasonable range, making the scores comparable for physical quantities of different dimensions. The exponential operation with the natural constant as the base smoothly maps the normalized deviation to... The interval is such that when the deviation is 0, the score is 1, and the score decreases exponentially as the deviation increases.
[0033] The specific calculation process of the nonlinear exponential function is as follows: Determine the actual value of the measured data point, determine the lower and upper limits of the theoretically reasonable range, and calculate the median of the theoretically reasonable range; determine whether the actual value is within the interval formed by the lower and upper limits; if so, use the median as the reference center value, calculate the difference between the actual value and the reference center value, divide the difference by the width of the theoretically reasonable range for normalization, obtain the normalized offset, multiply the square of the normalized offset by the negative sharpness coefficient, and then perform exponential operation with the natural constant as the base, using the result as the physical rule reasonableness sub-score; if not, determine the boundary value closest to the lower and upper limits among the actual value and the lower and upper limits, calculate the difference between the actual value and the nearest boundary value as the deviation distance, divide the deviation distance by the width of the theoretically reasonable range for normalization, obtain the normalized deviation degree, multiply the square of the normalized deviation degree by the negative sharpness coefficient, and then perform exponential operation with the natural constant as the base, using the result as the physical rule reasonableness sub-score; the sharpness coefficient is used to adjust the rate at which the score decreases as the degree of deviation increases.
[0034] In one embodiment, the communication link state sub-score is calculated as follows: Channel quality parameters and cyclic redundancy check (CRC) results of the original message carrying measurement data points are obtained. The channel quality parameters include at least the signal-to-noise ratio (SNR) and the estimated bit error rate (BER). The CRC result serves as a determining factor; if the check fails, the lowest score is assigned. If the check succeeds, two intermediate scores are calculated using two different exponential decay functions based on the SNR and BER. These two intermediate scores are then weighted and summed to obtain a sub-score between zero and one. A higher SNR and a lower BER result in a higher communication link state sub-score. The channel quality parameters can be obtained in real-time from the physical layer or link layer driver interface of the communication module. The normalized SNR value can be obtained by dividing the actual SNR by an empirical SNR threshold (e.g., 20 dB), and its value is limited to no more than 1. The "power" in the power of the normalized BER estimate is usually first power, but can be adjusted to other constants according to the channel model. The weighting coefficients of the first and second intermediate scores are... and This can be configured according to the network type. For example, for public wireless networks, where the bit error rate fluctuates significantly, a higher weight can be assigned to the bit error rate. It is 0.3. The minimum score is 0.7; in practice, the minimum score can be set to a very small value close to 0, such as 0.001, to distinguish it from being completely invalid.
[0035] The specific calculation process of the two different exponential decay functions is as follows: The signal-to-noise ratio (SNR) is normalized to map it to the interval between zero and one. Then, the decay is calculated using a function with the natural constant as the base and the negative normalized SNR value as the exponent, to obtain the first intermediate score. The higher the SNR, the closer the first intermediate score is to one. The bit error rate (BER) prediction is normalized to map it to the interval between zero and positive infinity. Then, the decay is calculated using a function with the natural constant as the base and the negative power of the normalized BER prediction as the exponent, to obtain the second intermediate score. The lower the BER prediction, the closer the second intermediate score is to one. The weighted sum of the first and second intermediate scores is calculated, and the weighted sum is used as the communication link state sub-score.
[0036] In one embodiment, the method for calculating the time series prediction consistency sub-score is as follows: A time series prediction model pre-configured for the smart device uploading measurement data points is invoked; a sequence of recent historical measurement data points from the smart device is input to obtain the predicted value corresponding to the current moment; the standard deviation of the smart device's historical data over the corresponding historical period is obtained to characterize its normal fluctuation range; the absolute difference between the actual value and the predicted value of the measurement data points is calculated; this absolute difference is compared with a reference value calculated based on the normal fluctuation range and a preset tolerance coefficient; and then mapped to a fraction between zero and one using a proportional function with a numerator of one, a denominator of one, and the ratio of the absolute difference to the reference value. The closer the actual value is to the predicted value, the higher the time series prediction consistency sub-score. The testing model can employ a lightweight time-series model, such as an autoregressive integral moving average model, a state-space model, or a small-scale time-series convolutional network, and be trained offline using historical data from smart devices over the past few hours to days. Similar time periods typically refer to the same historical period (e.g., the same time yesterday) or recent adjacent time periods. A preset tolerance coefficient is used to define the allowable multiple of prediction deviation relative to historical normal fluctuations; its value is usually set between 1 and 3, for example, 2, meaning that the actual value is allowed to deviate from the predicted value within 2 times the historical fluctuation range. A very small positive number is used for numerical stability, and a value of 1e-6 can be taken. The scaling function essentially constructs a soft decision based on relative error; when the absolute difference is much smaller than the reference scale, the score is close to 1; when the absolute difference is close to or exceeds the reference scale, the score decreases rapidly.
[0037] The specific calculation process of the proportional function is as follows: obtain the actual value of the measurement data point and the predicted value of the current moment generated by the time series prediction model, and calculate the absolute difference between the two; obtain the standard deviation of the historical data of the smart device in similar time periods, multiply the standard deviation by the preset tolerance coefficient, and add a very small positive number to prevent the denominator from being zero, and calculate the adjusted reference scale; calculate the ratio of the absolute difference to the adjusted reference scale, add one to the ratio and take the reciprocal, and use the reciprocal result as the time series prediction consistency sub-score.
[0038] In one embodiment, the method for calculating the horizontal consistency sub-score of the device cluster is as follows: At the same time, measurement data points of all other smart devices in the distribution area that are of the same type and have similar operating conditions are acquired to form a peer data set; the median and median absolute deviation of the peer data set are calculated; the absolute deviation between the actual value of the measurement data point and the median is calculated, and the absolute deviation is compared with a robust scaling parameter calculated based on the median absolute deviation and a preset coefficient. Then, it is mapped to a score between zero and one through an exponential decay function with the natural constant as the base and the negative normalized relative deviation as the exponent. The closer the actual value is to the peer median, the higher the horizontal consistency sub-score of the device cluster; "same type" refers to... The equipment functions and specifications are consistent, just like single-phase smart meters; similar operating conditions can be judged by comparing whether the active power, reactive power, or load rate of the equipment are at the same preset level; the median absolute deviation is a robust statistic that measures the dispersion of the peer data set and is not sensitive to outliers; the preset adjustment coefficient is used to control the leniency of the group consistency judgment, and its value is usually set between 1 and 5, for example, 1.4826 can be taken. At this time, the robust scaling parameter is similar to the standard deviation estimate when the data follows a normal distribution; the exponential decay function also provides a smooth mapping from 0 to 1. When the actual value is equal to the group center value, the score is 1. As the relative deviation increases, the score decreases exponentially, which can effectively identify outliers that deviate from the group.
[0039] The specific calculation process of the exponential decay function is as follows: obtain the peer data set, calculate the median of the set as the group center value, calculate the median absolute deviation of the median by subtracting the absolute value of the group center value from each value in the set; calculate the absolute deviation of the actual value of the measured data point from the group center value, multiply the median absolute deviation by a preset adjustment coefficient, and add a very small positive number to calculate the robust scale parameter; calculate the ratio of the absolute deviation to the robust scale parameter, multiply the ratio by negative one, and then perform exponential operation with the natural constant as the base, and use the calculation result as the horizontal consistency sub-score of the equipment cluster.
[0040] Step S102: Obtain the electrical topology of the power grid area; perform physical constraint verification on each measurement data point according to the electrical topology to obtain the verification result corresponding to each measurement data point; and correct each first mass vector according to the corresponding verification result to obtain the second mass vector corresponding to each measurement data point.
[0041] It should be noted that obtaining the electrical topology of the power grid area, performing physical constraint verification on each measurement data point based on the electrical topology, obtaining the verification result corresponding to each measurement data point, and correcting each first quality vector based on the corresponding verification result to obtain the second quality vector corresponding to each measurement data point means: for any measurement data point, taking the smart device where the measurement data point is located as the core, selecting the smart device and its electrically directly adjacent smart devices from the electrical topology to form a local topology unit, establishing a physical constraint equation for the local topology unit based on Kirchhoff's current law and voltage drop relationship, and converting the measurement data point values of each smart device within the unit into a physical constraint equation. Substituting the physical constraint equations, the degree of violation of each physical constraint by the measured data point values is obtained. By comparing the difference in constraint residuals with and without the corresponding measured data point values of the smart device, a statistical test quantity is constructed, and the confidence level of the smart device's measured data point values being consistent with the physical constraints is calculated based on its probability distribution, thus obtaining the verification result. Then, using this verification result as a confidence factor, a weighted geometric mean correction is applied to the sub-scores of dimensions directly related to physical correctness in the first quality vector, while keeping the other dimensions unchanged. The corrected dimensions are then combined in their original order to form the second quality vector, so that the second quality vector further incorporates the consistency information of the power grid physical laws on the basis of the first quality vector.
[0042] Preferably, the step of performing physical constraint verification on each of the measurement data points according to the electrical topology to obtain the verification result corresponding to each of the measurement data points includes: From the electrical topology, a local topology unit consisting of the target intelligent device and intelligent devices electrically adjacent to the target intelligent device is obtained, and the physical constraint equation of the local topology unit is established according to Kirchhoff's current law and the voltage drop relationship; wherein, the target intelligent device is the intelligent device that uploads the target measurement data point, and the target measurement data point is any measurement data point received. The values of the measurement data points corresponding to each intelligent device in the local topology unit are substituted into the physical constraint equation for calculation to obtain the first weighted constraint residual vector. The values of the measurement data points corresponding to all intelligent devices in the local topology unit except the target intelligent device are substituted into the physical constraint equation for calculation to obtain the second weighted constraint residual vector. Calculate the difference between the first weighted constraint residual vector and the second weighted constraint residual vector, and project the difference onto the covariance matrix of the second weighted constraint residual vector to obtain the statistical test statistic. The probability is calculated based on the probability distribution that the statistical test quantity follows under the null hypothesis, and the topological consistency confidence of the target intelligent device is obtained. The topological consistency confidence is then used as the verification result of the target measurement data point.
[0043] In one embodiment, the selection principle of local topology units is to include a sufficient number of independent physical constraint equations for effective hypothesis testing, while the range should not be too large to avoid introducing too much irrelevant interference. Typically, it includes a network segment consisting of the target smart device and smart devices in its one or two electrical neighbors.
[0044] Furthermore, based on Kirchhoff's current law and the voltage drop relationship, a set of physical constraint equations is established for the local topology unit. These physical constraint equations are typically expressed as a system of linear equations, with their coefficient matrix determined by branch impedance, topological connectivity, and the selected reference node. The measured data points corresponding to each intelligent device within the local topology unit at the current moment are substituted into the physical constraint equations. A coefficient matrix composed of branch connectivity and impedance parameters is applied to a vector of measured data point values. This vector is then subtracted from a known vector composed of the power injection current or reference node voltage. The resulting difference vector is then multiplied on the left by a diagonal weight matrix determined by the branch importance and impedance magnitude, resulting in a weighted constraint residual vector. Each component of the weighted constraint residual vector quantifies the degree to which the corresponding physical constraint is violated. The diagonal elements of the diagonal weight matrix can be set according to the importance of the corresponding branch in the topology and its per-unit impedance value; for example, constraints on critical backbone lines are given higher weights.
[0045] Furthermore, based on the uncertainty represented by the first quality vector of each measurement data point, the covariance matrix of the weighted constraint residual vector is derived and calculated. The specific derivation logic is as follows: the covariance matrix of the weighted constraint residual vector is obtained by performing matrix operations on the coefficient matrix, the diagonal weight matrix, and a diagonal variance matrix determined by the first quality vector of each measurement data point. Among them, the diagonal elements of the diagonal variance matrix are proportional to the dimension sub-scores reflecting the intrinsic credibility of the data in the first quality vector of the corresponding measurement data point (such as the reciprocal of the product of the physical rule rationality sub-score and the time series prediction consistency sub-score). The lower the initial quality, the greater its uncertainty variance is considered to be.
[0046] Furthermore, for smart devices, a statistical hypothesis test is performed, with the null hypothesis that the measurement data points of smart devices are correct. The test statistic is constructed by comparing the differences in weighted constraint residual vectors with and without measurement data points of smart devices. Specifically, when constructing the test statistic for smart devices, the first weighted constraint residual vector containing smart device measurement data points and the second weighted constraint residual vector and its corresponding covariance matrix obtained after removing all physical constraint equations containing smart device measurement data points are calculated. By calculating the difference between the first and second weighted constraint residual vectors and projecting this difference into the space defined by the inverse of the covariance matrix of the second weighted constraint residual vector, a non-negative scalar test value is constructed. The scalar test value is used to measure the significance of the impact of removing smart device measurement data on the system residuals. Mathematically, the scalar test value is a generalized likelihood ratio test statistic that follows a chi-square distribution with degrees of freedom equal to the number of constraint equations removed.
[0047] Furthermore, based on statistical theory, under the condition that the null hypothesis holds, the constructed scalar test value follows a known probability distribution, the degrees of freedom of which are determined by the number of independent physical constraint equations remaining after removing the smart device constraint; the known probability distribution is a chi-square distribution; by calculating the probability of an occurrence greater than or equal to the currently observed scalar test value under this probability distribution, the rejection probability of the null hypothesis is obtained; by subtracting the rejection probability from the first value, the topological consistency confidence of the smart device is calculated; the higher the topological consistency confidence value, the stronger the consistency between the smart device's measurement data points and the physical laws of the power grid.
[0048] Preferably, the step of correcting each of the first mass vectors according to the corresponding verification results to obtain the second mass vector corresponding to each of the measurement data points includes: For any measurement data point, based on the verification result corresponding to the measurement data point, the weighted geometric average of the physical rule rationality sub-score and the equipment cluster horizontal consistency sub-score in the first quality vector corresponding to the measurement data point is performed to obtain the first physical rule rationality score and the first equipment cluster horizontal consistency sub-score. The first physical rule rationality sub-score and the first device cluster horizontal consistency sub-score are combined with the communication link status sub-score and the time series prediction consistency sub-score in the first quality vector according to a preset dimensional order to obtain the second quality vector corresponding to the measurement data point.
[0049] In one embodiment, the topology consistency confidence score is characterized as a scalar confidence factor between zero and one. For the dimension sub-scores in the first quality vector that directly reflect the physical correctness of the data, a nonlinear correction mechanism based on the scalar confidence factor is introduced. A weighted geometric mean is used for fusion: the physical rule rationality sub-score is weighted geometrically with the scalar confidence factor, and the device cluster horizontal consistency sub-score is also weighted geometrically with the scalar confidence factor. The fusion weight of the physical rule rationality sub-score is higher than that of the device cluster horizontal consistency sub-score. The recommended fusion weight for sub-scores is between 0.6 and 0.9, for example, 0.8, to reflect the strong constraint of physical laws; the recommended fusion weight for device cluster horizontal consistency sub-scores is between 0.1 and 0.4, for example, 0.2, to reflect the auxiliary reference role of group consistency; the values of communication link state sub-scores and time series prediction consistency sub-scores remain unchanged. This correction logic reflects the idea of Bayesian updates, which integrates topology verification, a new independent piece of evidence, into the prior quality assessment in a probabilistic manner, especially making significant corrections to dimensions directly related to physical laws.
[0050] Furthermore, the physical rule rationality sub-score and device cluster horizontal consistency sub-score, which have undergone nonlinear correction, are combined with the communication link state sub-score and time series prediction consistency sub-score, which remain unchanged, according to their original dimensional order, to form the corrected second quality vector.
[0051] Step S103: Based on the corresponding verification results and the second mass vector, anomaly identification is performed on each of the measurement data points to obtain all target data points to be repaired. Based on the second mass vector corresponding to each target data point and the topological association between each target data point and the corresponding measurement data points in the spatiotemporal neighborhood, a repair target matrix is constructed.
[0052] It should be noted that, based on the corresponding verification results and the second quality vector, anomaly identification is performed on each of the measured data points to obtain all target data points to be repaired. The construction of the repair target matrix, based on the second quality vector corresponding to each target data point and the topological association between each target data point and the corresponding measured data points in the spatiotemporal neighborhood, involves: for each measured data point, firstly, a weighted geometric average of the sub-scores of each dimension in its second quality vector is calculated to obtain a comprehensive credibility score; then, the comprehensive credibility score and the verification result are nonlinearly fused to calculate the repair urgency. When the repair urgency is greater than a threshold and the comprehensive credibility score is less than a threshold, or when the data itself is missing, the measured data point is identified as a target data point. Then, for each target data point, the spatial search range on the electrical topology and the time window on the temporal sequence are dynamically expanded according to its repair urgency to obtain the numerical values, second quality vectors, and topological association information between each neighboring point and the target point. The above information for each neighboring point is combined into a feature vector corresponding to the target point. Finally, all feature vectors of all target points are summarized into the repair target matrix.
[0053] Preferably, the step of identifying anomalies in each of the measurement data points based on the corresponding verification results and the second quality vector to obtain all target data points to be repaired includes: For any measurement data point, the weighted geometric mean of the sub-scores of each dimension in the second quality vector corresponding to the measurement data point is calculated to obtain the comprehensive credibility score. The urgency of repair is obtained by performing a non-linear fusion calculation between the comprehensive credibility score and the verification results corresponding to the measurement data points. When the repair urgency is greater than a preset repair urgency threshold and the overall credibility score is less than a preset overall credibility threshold, the measurement data point is identified as the target data point.
[0054] In one embodiment, a weighted geometric mean is calculated on the four sub-scores of the second quality vector to obtain the overall credibility score. The calculation logic of the weighted geometric mean is as follows: the four sub-scores are each raised to the power of their respective preset weights, the four powers are multiplied together, and then the product is squared four times, with the square root being the same as the total number of dimensions. The final scalar is the overall credibility score. The preset weights of each sub-score can be adjusted according to the emphasis on different quality attributes of the data in the actual application scenario. For example, the physical rule rationality sub-score and the communication link status sub-score can be given higher weights (e.g., 0.4 and 0.3 respectively), while the time series prediction consistency sub-score and the device cluster horizontal consistency sub-score can be given relatively lower weights (e.g., 0.2 and 0.1 respectively) to emphasize the fundamental status of physical rationality and communication reliability. The advantage of the weighted geometric mean over the arithmetic mean is that it is more sensitive to low scores. A low score in any dimension will have a significant bottleneck effect on the final overall score, which is more in line with the high standards required for the quality of critical infrastructure data.
[0055] Furthermore, for any measurement data point, its comprehensive credibility score and the topology consistency confidence score of its associated smart device are obtained. Based on the comprehensive credibility score and the topology consistency confidence score, a repair urgency between zero and one is calculated using a nonlinear fusion function. When calculating the repair urgency, a fusion weight coefficient between zero and one is introduced. The repair urgency is calculated by multiplying the comprehensive credibility score (one minus the fusion weight coefficient) to the power of the fusion weight coefficient of the topology consistency confidence score, and then subtracting the product from the value. Essentially, this calculation method treats the comprehensive credibility and the topology consistency confidence score as two independent pieces of evidence, calculates the joint credibility through a weighted geometric mean, and then subtracts the value from the result to obtain the joint unreliability, i.e., the repair urgency. The fusion weight coefficient is used to adjust the influence of topology consistency in repair decisions, and is typically assigned a higher value to highlight the veto power of physical constraints. The specific value of the fusion weight coefficient can be between 0.6 and 0.8, for example, 0.7, indicating that the topology consistency confidence score dominates the decision-making process, which conforms to the fundamental principle that physical laws cannot be violated in power grid data. The nonlinear fusion function makes the calculated repair urgency higher when the overall confidence score and the topology consistency confidence are both lower.
[0056] Furthermore, a repair urgency threshold and a comprehensive reliability safety threshold are set. The repair urgency threshold is recommended to be set between 0.6 and 0.8, for example, 0.7; the comprehensive reliability safety threshold is recommended to be set between 0.5 and 0.7, for example, 0.6. These two thresholds work together to ensure that only data points with low comprehensive reliability (below the comprehensive reliability safety threshold) and whose problems remain significant after physical law verification (repair urgency above the threshold) are sent to the repair process. This avoids a large amount of data with slight fluctuations or acceptable errors being processed by unnecessarily complex models, improving overall efficiency. Measurement data points with a repair urgency greater than the repair urgency threshold and a comprehensive reliability score less than the comprehensive reliability safety threshold are identified as target data points to be repaired. Specifically, if the measurement data point itself is a missing data point caused by communication interruption or parsing failure, its repair urgency is directly set to the maximum value.
[0057] Preferably, the step of constructing the repair target matrix based on the second mass vector corresponding to each target data point and the topological association between each target data point and the corresponding measurement data points in the spatiotemporal neighborhood includes: For any target data point, the neighborhood range is expanded according to the repair urgency of the target data point to obtain the spatiotemporal neighborhood range corresponding to the target data point. The feature vector corresponding to the target data point is obtained by combining the values of each adjacent measurement data point within the spatiotemporal neighborhood, the second mass vector corresponding to each adjacent measurement data point, and the topological association between each adjacent measurement data point and the target data point. The feature vectors corresponding to all target data points are combined in a preset order to obtain the repair target matrix.
[0058] In one embodiment, for each identified target data point, the search range of its spatiotemporal neighborhood is dynamically determined based on its repair urgency. The higher the repair urgency, the larger the spatial range searched on the electrical topology map and the larger the time window searched on the time series. The design intention of this dynamic mechanism is that the higher the repair urgency, the more abnormal or isolated the data point is, and its reliable context information may be located in a more distant spatiotemporal range. Therefore, it is necessary to expand the search range to obtain sufficient effective information for repair. The process of dynamically determining the spatiotemporal neighborhood search range is as follows: First, calculate the positive difference between the repair urgency and the repair urgency threshold; multiply this difference by a preset positive scaling factor, and then add one to obtain a neighborhood range scaling factor; use this scaling factor to linearly scale the preset baseline spatial search radius and baseline time window length proportionally to generate a dynamic spatial search radius and dynamic time window for the current target data point; if the repair urgency does not exceed the threshold, the baseline radius and baseline window are used directly; it is recommended that the positive scaling factor be between 1.0 and 3.0, for example, 2.0, to control the expansion rate of the search range as the urgency increases; the baseline spatial search radius can be set to 1 to 2 hops in the electrical topology (i.e., the direct neighbor or neighbor's neighbor of the target device), and the baseline time window length can be set to 5 to 15 sampling periods.
[0059] Furthermore, within a defined spatiotemporal neighborhood, the numerical values of each measured data point, its corresponding second mass vector, and the topological association between the measured data point and the target data point within that neighborhood are acquired. The topological association information includes: whether the two points belong to the same intelligent device, whether they are electrically directly connected, whether they belong to the same phase, the spatial electrical distance or network hop count, and the timestamp difference. The spatial electrical distance can be calculated using the per-unit value of the branch impedance or the sum of the shortest path impedances; the network hop count refers to the number of edges along the shortest path between two points in the topology graph.
[0060] Furthermore, the aforementioned information about the target data point and each of its neighboring measurement data points is organized into a feature vector. This feature vector includes the following dimensions: the numerical value of the neighboring measurement data points, the second quality vector of the neighboring measurement data points, the relation type encoding, the spatial distance metric, the temporal distance metric, and the urgency of repairing the target data point. The relation type encoding can be represented using a multi-dimensional binary vector, for example... Spatial and temporal distance metrics should be normalized, for example, by dividing the spatial electrical distance by the maximum possible distance in the network, and the timestamp difference by the maximum allowable time difference, so that they fall within the range of... The intervals facilitate subsequent model processing; incorporating the urgency of repairing the target data points as a global feature into each row helps the subsequent model understand the urgency and difficulty of the current repair task.
[0061] Furthermore, all feature vectors corresponding to all target data points are arranged and combined according to a preset dimensional order to form the repair target matrix. The repair target matrix is a two-dimensional matrix, with the number of rows equal to the total number of measurement data points in the neighborhood of all target data points, and the number of columns equal to the total dimension of the feature vectors. This matrix is the core input of the subsequent graph neural network model. Its structured and information-rich design enables the model to simultaneously perceive multiple information such as data values, data quality, power grid topology, and spatiotemporal correlations, laying the foundation for high-precision repair.
[0062] Step S104: Input the repair target matrix into the pre-trained spatiotemporal graph neural network model so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operation according to the repair target matrix, outputs the repair estimate value corresponding to each target data point, and performs data repair on each target data point according to the corresponding repair estimate value.
[0063] It should be noted that inputting the repair target matrix into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operations based on the repair target matrix, outputs the repair estimate value corresponding to each target data point, and performs data repair on each target data point based on the corresponding repair estimate value, means that: the repair target matrix is input into the pre-trained spatiotemporal graph neural network model, the graph construction module inside the model constructs a heterogeneous graph based on the measurement data points recorded in the matrix and their electrical connection relationships and temporal sequence relationships, the nodes in the graph correspond to each measurement data point and contain numerical values and second quality vectors, and the edges correspond to topological and temporal relationships; the model's quality-guided aggregation module iteratively updates the features of each node on the heterogeneous graph, and determines the attention weights based on the second quality vectors of the node and its neighboring nodes during the update, and aggregates the neighbor features according to the weights; the model inputs the final updated features of the target nodes into the decoding module, maps and outputs the repair estimate value, and fills or corrects the abnormal or missing target measurement data points accordingly.
[0064] Preferably, the step of inputting the repair target matrix into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operations based on the repair target matrix and outputs the repair estimate value corresponding to each target data point, includes: The repair target matrix is input into the spatiotemporal graph neural network model. The graph construction module constructs a heterogeneous graph based on each measurement data point in the repair target matrix and the electrical connection relationship and timing relationship between each measurement data point. The spatiotemporal graph neural network model includes the graph construction module, the quality-guided aggregation module, and the decoding module. The quality-guided aggregation module performs attention-weighted updates on the first features of each node in the heterogeneous graph and outputs the second features of each node. The decoding module maps each of the second features and outputs the repair estimate corresponding to each of the target data points.
[0065] In one embodiment, a heterogeneous graph containing two types of edges is constructed based on all data points recorded in the repair target matrix and the connection information represented between these data points. Specifically, the connection information refers to the relation type encoding and spatial distance metric of the repair target matrix. The two types of edges include: topological edges established based on direct electrical connections, and temporal edges established based on the sequential relationship between measurement data points at different times within the same smart device. For topological edges, if there is a direct electrical connection between two measurement data points, an undirected edge is established between them. The edge features include spatial electrical distance and network hop count; the spatial electrical distance can be directly taken from the spatial distance metric in the repair target matrix, and the network hop count can be obtained by querying the topology database. For temporal edges, for measurement data points belonging to the same smart device and having a temporal sequence, directed edges are established in ascending order of time. The edge features include a normalized timestamp difference; the normalization of the timestamp difference typically involves dividing the actual time difference by a preset maximum allowable time difference, limiting the result to between zero and one.
[0066] Furthermore, each node in the heterogeneous graph corresponds to a measurement data point. The initial feature (i.e., the first feature) of each node is composed of two parts: the first part is the original measurement value of the point. If the point is a target data point, its value is filled with zeros and an additional binary dimension of one value is added as a missing value flag. This missing value flag is used to inform the model that the node is a target that needs to be repaired and is an important input signal for the model. The second part is the second quality vector of the point. The structure of the heterogeneous graph fully represents the spatial topological connections and temporal series correlations between the data to be repaired and its context.
[0067] Furthermore, for each node in the heterogeneous graph, quality-guided attention computation and information aggregation are performed during each layer feature update. When calculating the attention coefficient between any node and one of its neighboring nodes, the transformed features of the center node, the transformed features of the neighboring node, the features of the edge connecting the two nodes, and the second quality vector corresponding to the neighboring node, processed by a specialized learnable mapping function, are concatenated. The concatenated vector is then linearly projected through a learnable attention vector and passed through a non-linear activation function to finally calculate a scalar as the original attention coefficient. The learnable mapping function is typically a small fully connected neural network used to map the high-dimensional second quality vector to a lower-dimensional latent space representation that matches the attention computation. This process is the core of quality guidance, enabling the model to learn how to adjust attention based on data credibility. The non-linear activation function is usually LeakyReLU to prevent gradient vanishing; the transformed features are obtained by multiplying the node's first feature by a learnable weight matrix.
[0068] Furthermore, the original attention coefficients of all neighboring nodes of the central node are normalized so that the sum of all weights is one, resulting in the final attention weights. The normalization process typically uses the softmax function. The transformed features of all neighboring nodes of the central node are then weighted and summed according to their respective final attention weights. This weighted sum is then added to the transformed features of the central node itself. Finally, a non-linear activation function is applied to obtain the new features of the central node updated in the current neural network layer. This process can be executed in parallel multiple times, forming a multi-head attention mechanism to capture feature interactions between different subspaces and enhance the model's expressive power.
[0069] Furthermore, after information aggregation through a multi-layered quality-guided attention mechanism, each node in the heterogeneous graph obtains a final feature representation (i.e., a second feature) that incorporates multi-hop spatiotemporal neighborhood information. For each node corresponding to a target data point, its second feature is input into a pre-defined fully connected neural network decoder. The fully connected neural network decoder consists of multiple fully connected layers, with the last layer outputting a single scalar value. The fully connected neural network decoder typically consists of two to four fully connected layers, using activation functions such as ReLU between layers, and using linear activation in the last layer to output a continuous repair estimate; this scalar value is the repair estimate for the target data point.
[0070] In one embodiment, the training process of the spatiotemporal graph neural network model is as follows: On historical normal operating data, a portion of normal measurement data points are randomly selected and their values are masked to simulate target data points, and training samples are constructed based on their spatiotemporal context. During training, noise of different intensities and patterns can also be injected into the data to simulate communication interference and equipment anomalies, thereby improving the model's generalization ability to complex real-world scenarios. The spatiotemporal graph neural network model uses the repair target matrix generated by steps S101 to S103 as input, and the masked real values as training targets. Iterative optimization of all learnable parameters in the spatiotemporal graph neural network model is achieved by minimizing the error function between the repair estimate output by the model and the real value until convergence. The error function is typically the Huber loss function, which is insensitive to outliers, and its threshold parameter can be set to 1.0. The termination condition for model training can be that the loss function value on the validation set no longer decreases significantly within multiple consecutive training cycles, or that the preset maximum number of training cycles is reached. After model training is completed, its parameters are fixed for online real-time or near-real-time data repair tasks.
[0071] This invention, through the construction of a first quality vector for each measurement data point, establishes an initial quality label for each data point, providing a foundation for subsequent steps. By performing physical constraint verification on each measurement data point according to the electrical topology and correcting the first quality vector based on the verification results to obtain a second quality vector, the physical laws of the power grid can be introduced into the quality assessment process. This allows the corrected second quality vector to carry physical consistency information, guiding subsequent anomaly identification and repair, thereby avoiding repair results that violate circuit principles. By identifying target data points based on the verification results and the second quality vector, and constructing a repair target matrix based on the second quality vector of each target data point and its topological association with data points in the spatiotemporal neighborhood, the numerical values, quality information, and topological associations of the data points to be repaired and their spatiotemporal neighborhoods can be organized into structured inputs to support subsequent repair calculations. By using a spatiotemporal graph neural network model to perform spatiotemporal neighborhood information aggregation calculations based on the repair target matrix to output repair estimates and perform data repair accordingly, the repair process can utilize both spatial topological neighbor information and temporal correlation information simultaneously, thereby avoiding the problem of large repair errors caused by relying solely on historical information from a single device.
[0072] Optionally, in this embodiment of the invention, the step of performing physical constraint verification on each of the measurement data points according to the electrical topology to obtain the verification result corresponding to each of the measurement data points includes: From the electrical topology, a local topology unit consisting of the target intelligent device and intelligent devices electrically adjacent to the target intelligent device is obtained, and the physical constraint equation of the local topology unit is established according to Kirchhoff's current law and the voltage drop relationship; wherein, the target intelligent device is the intelligent device that uploads the target measurement data point, and the target measurement data point is any measurement data point received. The values of the measurement data points corresponding to each intelligent device in the local topology unit are substituted into the physical constraint equation for calculation to obtain the first weighted constraint residual vector. The values of the measurement data points corresponding to all intelligent devices in the local topology unit except the target intelligent device are substituted into the physical constraint equation for calculation to obtain the second weighted constraint residual vector. Calculate the difference between the first weighted constraint residual vector and the second weighted constraint residual vector, and project the difference onto the covariance matrix of the second weighted constraint residual vector to obtain the statistical test statistic. The probability is calculated based on the probability distribution that the statistical test quantity follows under the null hypothesis, and the topological consistency confidence of the target intelligent device is obtained. The topological consistency confidence is then used as the verification result of the target measurement data point.
[0073] The embodiments of the present invention construct statistical test quantities and calculate topological consistency confidence based on their probability distribution, which can quantify the consistency between target measurement data and physical constraints into a scalar value, providing a clear physical verification basis for subsequent quality correction.
[0074] Optionally, in this embodiment of the invention, constructing the first mass vector corresponding to each of the measurement data points includes: For any measurement data point, a range query is performed in the preset rule base according to the physical quantity type of the measurement data point to obtain the theoretical reasonable range of the measurement data point, and a nonlinear exponential operation is performed on the value of the measurement data point and the theoretical reasonable range to obtain the physical rule reasonableness sub-score. Cyclic redundancy check is performed on the original message carrying the measurement data points to obtain the cyclic redundancy check result. Then, based on the cyclic redundancy check result and the channel quality parameters of the original message, an exponential decay operation is performed to obtain the communication link state sub-score. The historical measurement data point sequence of the smart device that uploaded the measurement data points is input into a preset time series prediction model, so that the time series prediction model performs time series consistency prediction based on the historical measurement data point sequence, outputs the prediction result, and performs a proportional calculation based on the prediction result and the value of the measurement data points to obtain the time series prediction consistency sub-score. Obtain the measurement dataset of other smart devices of the same type and under the same operating conditions as the smart device at the current moment, and perform an exponential decay operation on the values of the measurement data points and the measurement dataset to obtain the horizontal consistency sub-score of the device cluster. The physical rule rationality sub-score, the communication link state sub-score, the time series prediction consistency sub-score, and the device cluster horizontal consistency sub-score are combined to obtain the first quality vector corresponding to the measurement data point.
[0075] The embodiments of the present invention calculate sub-scores for four dimensions—physical rule rationality, communication link status, time series prediction consistency, and device cluster horizontal consistency—and combine them into a first quality vector, which can comprehensively quantify the credibility of measurement data points from four dimensions.
[0076] Optionally, in this embodiment of the invention, the step of correcting each of the first mass vectors according to the corresponding verification results to obtain the second mass vector corresponding to each of the measurement data points includes: For any measurement data point, based on the verification result corresponding to the measurement data point, the weighted geometric average of the physical rule rationality sub-score and the equipment cluster horizontal consistency sub-score in the first quality vector corresponding to the measurement data point is performed to obtain the first physical rule rationality score and the first equipment cluster horizontal consistency sub-score. The first physical rule rationality sub-score and the first device cluster horizontal consistency sub-score are combined with the communication link status sub-score and the time series prediction consistency sub-score in the first quality vector according to a preset dimensional order to obtain the second quality vector corresponding to the measurement data point.
[0077] This invention, through a weighted geometric mean correction applied only to the physical rule rationality sub-score and the device cluster horizontal consistency sub-score in the first quality vector, while keeping the communication link state sub-score and the time series prediction consistency sub-score unchanged, can selectively inject the physical constraint verification conclusions into the dimensions directly related to physical correctness in the quality vector. This allows the corrected quality vector to carry physical consistency information without losing the original evaluation information of other dimensions.
[0078] Optionally, in this embodiment of the invention, the step of identifying anomalies in each of the measurement data points based on the corresponding verification result and the second quality vector to obtain all target data points to be repaired includes: For any measurement data point, the weighted geometric mean of the sub-scores of each dimension in the second quality vector corresponding to the measurement data point is calculated to obtain the comprehensive credibility score. The urgency of repair is obtained by performing a non-linear fusion calculation between the comprehensive credibility score and the verification results corresponding to the measurement data points. When the repair urgency is greater than a preset repair urgency threshold and the overall credibility score is less than a preset overall credibility threshold, the measurement data point is identified as the target data point.
[0079] This invention provides a comprehensive credibility score by weighted geometric average of the sub-scores of each dimension of the second quality vector, and nonlinearly integrates it with the verification results to calculate the repair urgency. When the repair urgency is greater than the repair urgency threshold and the comprehensive credibility score is less than the comprehensive credibility threshold, it is identified as a target data point. It can filter the data points to be repaired based on the dual conditions of comprehensive credibility score and physical verification results, ensuring that only statistically abnormal data points with physically confirmed problems are sent to the repair process.
[0080] Optionally, in this embodiment of the invention, constructing the repair target matrix based on the second mass vector corresponding to each target data point and the topological association between each target data point and the corresponding measurement data points in the spatiotemporal neighborhood includes: For any target data point, the neighborhood range is expanded according to the repair urgency of the target data point to obtain the spatiotemporal neighborhood range corresponding to the target data point. The feature vector corresponding to the target data point is obtained by combining the values of each adjacent measurement data point within the spatiotemporal neighborhood, the second mass vector corresponding to each adjacent measurement data point, and the topological association between each adjacent measurement data point and the target data point. The feature vectors corresponding to all target data points are combined in a preset order to obtain the repair target matrix.
[0081] By expanding the spatiotemporal neighborhood range according to the urgency of repair, the embodiments of the present invention enable data points with higher repair urgency to obtain a larger spatiotemporal neighborhood search range, providing a reference information amount that matches the degree of anomaly for repair.
[0082] Optionally, in this embodiment of the invention, the step of inputting the repair target matrix into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operations based on the repair target matrix and outputs the repair estimate value corresponding to each of the target data points, includes: The repair target matrix is input into the spatiotemporal graph neural network model. The graph construction module constructs a heterogeneous graph based on each measurement data point in the repair target matrix and the electrical connection relationship and timing relationship between each measurement data point. The spatiotemporal graph neural network model includes the graph construction module, the quality-guided aggregation module, and the decoding module. The quality-guided aggregation module performs attention-weighted updates on the first features of each node in the heterogeneous graph and outputs the second features of each node. The decoding module maps each of the second features and outputs the repair estimate corresponding to each of the target data points.
[0083] In this embodiment of the invention, a graph construction module constructs a heterogeneous graph based on electrical connection relationships and temporal sequence relationships, a quality-guided aggregation module performs attention-weighted updates on node features, and a decoding module maps and outputs repair estimates. This allows for the simultaneous aggregation of neighborhood information in both spatial topology and temporal sequence dimensions, and the integration of neighbor contributions based on the quality information differences of each node during the aggregation process through an attention mechanism.
[0084] like Figure 2 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided; An embodiment of the present invention provides a data repair device for power grid distribution areas, comprising: a data receiving module 201, a constraint verification module 202, an anomaly identification module 203, and a data repair module 204; The data receiving module 201 is used to receive measurement data points uploaded by each smart device in the power grid area, and construct a first mass vector corresponding to each measurement data point. The constraint verification module 202 is used to obtain the electrical topology of the power grid area, perform physical constraint verification on each of the measurement data points according to the electrical topology, obtain the verification result corresponding to each of the measurement data points, and correct each of the first mass vectors according to the corresponding verification result to obtain the second mass vector corresponding to each of the measurement data points. The anomaly identification module 203 is used to identify anomalies in each of the measurement data points according to the corresponding verification results and the second mass vector, to obtain all target data points to be repaired, and to construct a repair target matrix according to the second mass vector corresponding to each target data point and the topological association relationship between each target data point and the measurement data points in the corresponding spatiotemporal neighborhood. The data repair module 204 is used to input the repair target matrix into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operation according to the repair target matrix, outputs the repair estimate value corresponding to each target data point, and performs data repair on each target data point according to the corresponding repair estimate value.
[0085] Optionally, in this embodiment of the invention, the constraint verification module 202 includes: a physical constraint construction submodule, a physical constraint application submodule, a statistical test quantity calculation submodule, and a verification result generation submodule; The physical constraint construction submodule is used to obtain local topology units composed of the target intelligent device and intelligent devices electrically adjacent to the target intelligent device from the electrical topology, and to establish physical constraint equations for the local topology units based on Kirchhoff's current law and voltage drop relationship; wherein, the target intelligent device is the intelligent device that uploads target measurement data points, and the target measurement data points are any received measurement data points; The physical constraint application submodule is used to substitute the values of the measurement data points corresponding to each smart device in the local topology unit into the physical constraint equation for calculation to obtain a first weighted constraint residual vector, and to substitute the values of the measurement data points corresponding to all smart devices in the local topology unit except the target smart device into the physical constraint equation for calculation to obtain a second weighted constraint residual vector. The statistical test result calculation submodule is used to calculate the difference between the first weighted constraint residual vector and the second weighted constraint residual vector, and to project the difference based on the covariance matrix of the second weighted constraint residual vector to obtain the statistical test result. The verification result generation submodule is used to perform probability calculations based on the probability distribution that the statistical test quantity follows under the null hypothesis, to obtain the topology consistency confidence of the target intelligent device, and to use the topology consistency confidence as the verification result of the target measurement data point.
[0086] The embodiments of the present invention construct statistical test quantities and calculate topological consistency confidence based on their probability distribution, which can quantify the consistency between target measurement data and physical constraints into a scalar value, providing a clear physical verification basis for subsequent quality correction.
[0087] Optionally, in this embodiment of the invention, the data receiving module 201 includes: a first fraction calculation submodule, a second fraction calculation submodule, a third fraction calculation submodule, a fourth fraction calculation submodule, and a fraction combination submodule; The first score calculation submodule is used to perform a range query in a preset rule base according to the physical quantity type of any measurement data point to obtain the theoretical reasonable range of the measurement data point, and to perform a nonlinear exponential operation on the value of the measurement data point and the theoretical reasonable range to obtain the physical rule reasonableness sub-score. The second score calculation submodule is used to perform cyclic redundancy check on the original message carrying the measurement data points, obtain the cyclic redundancy check result, and perform exponential decay calculation based on the cyclic redundancy check result and the channel quality parameters of the original message to obtain the communication link state sub-score. The third score calculation submodule is used to input the historical measurement data point sequence of the smart device that uploaded the measurement data points into a preset time series prediction model, so that the time series prediction model can perform time series consistency prediction based on the historical measurement data point sequence, output the prediction result, and perform a proportional calculation based on the prediction result and the value of the measurement data points to obtain the time series prediction consistency sub-score. The fourth score calculation submodule is used to obtain the measurement dataset of other smart devices of the same type and under the same working conditions as the smart device at the current moment, and perform exponential decay operation on the values of the measurement data points and the measurement dataset to obtain the horizontal consistency sub-score of the device cluster. The score combination submodule is used to combine the physical rule rationality sub-score, the communication link status sub-score, the time series prediction consistency sub-score, and the device cluster horizontal consistency sub-score to obtain the first quality vector corresponding to the measurement data point.
[0088] The embodiments of the present invention calculate sub-scores for four dimensions—physical rule rationality, communication link status, time series prediction consistency, and device cluster horizontal consistency—and combine them into a first quality vector, which can comprehensively quantify the credibility of measurement data points from four dimensions.
[0089] Optionally, in this embodiment of the invention, the constraint verification module 202 further includes: a fraction weighting submodule and a fraction recombination submodule; The score weighting submodule is used to, for any measurement data point, perform a weighted geometric average on the physical rule rationality sub-score and the device cluster horizontal consistency sub-score in the first quality vector corresponding to the measurement data point, based on the verification result corresponding to the measurement data point, to obtain the first physical rule rationality score and the first device cluster horizontal consistency sub-score. The score recombination submodule is used to combine the first physical rule rationality sub-score and the first device cluster horizontal consistency sub-score with the communication link status sub-score and the time series prediction consistency sub-score in the first quality vector according to a preset dimensional order to obtain the second quality vector corresponding to the measurement data point.
[0090] This invention, through a weighted geometric mean correction applied only to the physical rule rationality sub-score and the device cluster horizontal consistency sub-score in the first quality vector, while keeping the communication link state sub-score and the time series prediction consistency sub-score unchanged, can selectively inject the physical constraint verification conclusions into the dimensions directly related to physical correctness in the quality vector. This allows the corrected quality vector to carry physical consistency information without losing the original evaluation information of other dimensions.
[0091] Optionally, in this embodiment of the invention, the anomaly identification module 203 includes: a credibility score generation submodule, a repair urgency generation submodule, and an anomaly identification submodule; The credibility score generation submodule is used to perform a weighted geometric average of the sub-scores of each dimension in the second quality vector corresponding to any measurement data point to obtain a comprehensive credibility score. The repair urgency generation submodule is used to perform non-linear fusion calculation between the comprehensive credibility score and the verification results corresponding to the measurement data points to obtain the repair urgency. The anomaly identification submodule is used to identify the measurement data point as the target data point when the repair urgency is greater than a preset repair urgency threshold and the comprehensive credibility score is less than a preset comprehensive credibility threshold.
[0092] This invention provides a comprehensive credibility score by weighted geometric average of the sub-scores of each dimension of the second quality vector, and nonlinearly integrates it with the verification results to calculate the repair urgency. When the repair urgency is greater than the repair urgency threshold and the comprehensive credibility score is less than the comprehensive credibility threshold, it is identified as a target data point. It can filter the data points to be repaired based on the dual conditions of comprehensive credibility score and physical verification results, ensuring that only statistically abnormal data points with physically confirmed problems are sent to the repair process.
[0093] Optionally, in this embodiment of the invention, the anomaly identification module 203 further includes: a neighborhood range expansion submodule, a feature vector generation submodule, and a repair target matrix generation submodule; The neighborhood range expansion submodule is used to expand the neighborhood range for any target data point according to the repair urgency of the target data point, so as to obtain the spatiotemporal neighborhood range corresponding to the target data point. The feature vector generation submodule is used to combine the values of each adjacent measurement data point within the spatiotemporal neighborhood, the second mass vector corresponding to each adjacent measurement data point, and the topological association between each adjacent measurement data point and the target data point to obtain the feature vector corresponding to the target data point. The target matrix generation submodule is used to combine the feature vectors corresponding to all target data points in a preset order to obtain the target matrix.
[0094] By expanding the spatiotemporal neighborhood range according to the urgency of repair, the embodiments of the present invention enable data points with higher repair urgency to obtain a larger spatiotemporal neighborhood search range, providing a reference information amount that matches the degree of anomaly for repair.
[0095] Optionally, in this embodiment of the invention, the data repair module 204 includes: a heterogeneous graph construction submodule, an attention-weighted update submodule, and a repair estimate output submodule; The heterogeneous graph construction submodule is used to input the repair target matrix into the spatiotemporal graph neural network model. The graph construction module constructs a heterogeneous graph based on each measurement data point in the repair target matrix and the electrical connection relationship and timing relationship between each measurement data point. The spatiotemporal graph neural network model includes the graph construction module, the quality-guided aggregation module, and the decoding module. The attention-weighted update submodule is used to perform attention-weighted update on the first feature of each node in the heterogeneous graph through the quality-guided aggregation module, and output the second feature of each node. The repair estimate output submodule is used to map each of the second features through the decoding module and output the repair estimate corresponding to each of the target data points.
[0096] In this embodiment of the invention, a graph construction module constructs a heterogeneous graph based on electrical connection relationships and temporal sequence relationships, a quality-guided aggregation module performs attention-weighted updates on node features, and a decoding module maps and outputs repair estimates. This allows for the simultaneous aggregation of neighborhood information in both spatial topology and temporal sequence dimensions, and the integration of neighbor contributions based on the quality information differences of each node during the aggregation process through an attention mechanism.
[0097] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the data repair method for power grid areas provided by any of the above-described method embodiments of the present invention.
[0098] In this embodiment of the invention, the data receiving module 201 constructs a first quality vector for each measured data point, establishing an initial quality label for each data point and providing a foundation for subsequent steps. The constraint verification module 202 performs physical constraint verification on each measured data point according to the electrical topology and corrects the first quality vector based on the verification results to obtain a second quality vector. This introduces the physical laws of the power grid into the quality assessment process, ensuring that the corrected second quality vector carries physical consistency information to guide subsequent anomaly identification and repair, thereby preventing repair results from violating circuit principles. The anomaly identification module 203 identifies target data points based on the verification results and the second quality vector, and constructs a repair target matrix based on the second quality vector of each target data point and its topological association with data points in the spatiotemporal neighborhood. This organizes the numerical values, quality information, and topological associations of the data point to be repaired and its points in the spatiotemporal neighborhood into a structured input to support subsequent repair calculations. The data repair module 204 performs spatiotemporal neighborhood information aggregation calculations based on the repair target matrix to output a repair estimate and performs data repair accordingly. This allows the repair process to utilize both spatial topological neighbor information and temporal correlation information simultaneously, avoiding the problem of large repair errors caused by relying solely on historical information from a single device.
[0099] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0100] Based on the above-described embodiment of a data repair method for power grid distribution areas, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a data repair method for power grid distribution areas according to any embodiment of the present invention.
[0101] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0102] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0103] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0104] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a data repair method for power grid substations as described in any of the above-described method embodiments of the present invention.
[0105] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0106] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A data repair method for power grid distribution areas, characterized in that, include: Receive measurement data points uploaded by each intelligent device within the power grid area, and construct a first mass vector corresponding to each measurement data point; The electrical topology of the power grid area is obtained. Based on the electrical topology, physical constraint verification is performed on each of the measurement data points to obtain the verification result corresponding to each measurement data point. Based on the corresponding verification result, each of the first mass vectors is corrected to obtain the second mass vector corresponding to each measurement data point. Based on the corresponding verification results and the second mass vector, anomaly identification is performed on each of the measurement data points to obtain all target data points to be repaired. Based on the second mass vector corresponding to each target data point and the topological association between each target data point and the measurement data points in the corresponding spatiotemporal neighborhood, a repair target matrix is constructed. The repair target matrix is input into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operation based on the repair target matrix, outputs the repair estimate value corresponding to each target data point, and performs data repair on each target data point based on the corresponding repair estimate value.
2. The data repair method for power grid distribution areas as described in claim 1, characterized in that, The step of performing physical constraint verification on each of the measurement data points according to the electrical topology to obtain the verification result corresponding to each of the measurement data points includes: From the electrical topology, a local topology unit consisting of the target intelligent device and intelligent devices electrically adjacent to the target intelligent device is obtained, and the physical constraint equation of the local topology unit is established according to Kirchhoff's current law and the voltage drop relationship; wherein, the target intelligent device is the intelligent device that uploads the target measurement data point, and the target measurement data point is any measurement data point received. The values of the measurement data points corresponding to each intelligent device in the local topology unit are substituted into the physical constraint equation for calculation to obtain the first weighted constraint residual vector. The values of the measurement data points corresponding to all intelligent devices in the local topology unit except the target intelligent device are substituted into the physical constraint equation for calculation to obtain the second weighted constraint residual vector. Calculate the difference between the first weighted constraint residual vector and the second weighted constraint residual vector, and project the difference onto the covariance matrix of the second weighted constraint residual vector to obtain the statistical test statistic. The probability is calculated based on the probability distribution that the statistical test quantity follows under the null hypothesis, and the topological consistency confidence of the target intelligent device is obtained. The topological consistency confidence is then used as the verification result of the target measurement data point.
3. The data repair method for power grid distribution areas as described in claim 1, characterized in that, The construction of the first mass vector corresponding to each of the measurement data points includes: For any measurement data point, a range query is performed in the preset rule base according to the physical quantity type of the measurement data point to obtain the theoretical reasonable range of the measurement data point, and a nonlinear exponential operation is performed on the value of the measurement data point and the theoretical reasonable range to obtain the physical rule reasonableness sub-score. Cyclic redundancy check is performed on the original message carrying the measurement data points to obtain the cyclic redundancy check result. Then, based on the cyclic redundancy check result and the channel quality parameters of the original message, an exponential decay operation is performed to obtain the communication link state sub-score. The historical measurement data point sequence of the smart device that uploaded the measurement data points is input into a preset time series prediction model, so that the time series prediction model performs time series consistency prediction based on the historical measurement data point sequence, outputs the prediction result, and performs a proportional calculation based on the prediction result and the value of the measurement data points to obtain the time series prediction consistency sub-score. Obtain the measurement dataset of other smart devices of the same type and under the same operating conditions as the smart device at the current moment, and perform an exponential decay operation on the values of the measurement data points and the measurement dataset to obtain the horizontal consistency sub-score of the device cluster. The physical rule rationality sub-score, the communication link state sub-score, the time series prediction consistency sub-score, and the device cluster horizontal consistency sub-score are combined to obtain the first quality vector corresponding to the measurement data point.
4. The data repair method for power grid distribution areas as described in claim 3, characterized in that, The step of correcting each of the first mass vectors according to the corresponding verification results to obtain the second mass vector corresponding to each of the measurement data points includes: For any measurement data point, based on the verification result corresponding to the measurement data point, the weighted geometric average of the physical rule rationality sub-score and the equipment cluster horizontal consistency sub-score in the first quality vector corresponding to the measurement data point is performed to obtain the first physical rule rationality score and the first equipment cluster horizontal consistency sub-score. The first physical rule rationality sub-score and the first device cluster horizontal consistency sub-score are combined with the communication link status sub-score and the time series prediction consistency sub-score in the first quality vector according to a preset dimensional order to obtain the second quality vector corresponding to the measurement data point.
5. A data repair method for power grid distribution areas as described in claim 1, characterized in that, The step involves identifying anomalies in each measurement data point based on the corresponding verification result and the second quality vector to obtain all target data points to be repaired, including: For any measurement data point, the weighted geometric mean of the sub-scores of each dimension in the second quality vector corresponding to the measurement data point is calculated to obtain the comprehensive credibility score. The urgency of repair is obtained by performing a non-linear fusion calculation between the comprehensive credibility score and the verification results corresponding to the measurement data points. When the repair urgency is greater than a preset repair urgency threshold and the overall credibility score is less than a preset overall credibility threshold, the measurement data point is identified as the target data point.
6. A data repair method for power grid distribution areas as described in claim 5, characterized in that, The step of constructing a repair target matrix based on the second mass vector corresponding to each target data point and the topological association between each target data point and the corresponding measurement data points in the spatiotemporal neighborhood includes: For any target data point, the neighborhood range is expanded according to the repair urgency of the target data point to obtain the spatiotemporal neighborhood range corresponding to the target data point. The feature vector corresponding to the target data point is obtained by combining the values of each adjacent measurement data point within the spatiotemporal neighborhood, the second mass vector corresponding to each adjacent measurement data point, and the topological association between each adjacent measurement data point and the target data point. The feature vectors corresponding to all target data points are combined in a preset order to obtain the repair target matrix.
7. A data repair method for power grid distribution areas as described in claim 1, characterized in that, The step of inputting the repair target matrix into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operations based on the repair target matrix, and outputs the repair estimate value corresponding to each target data point, includes: The repair target matrix is input into the spatiotemporal graph neural network model. The graph construction module constructs a heterogeneous graph based on each measurement data point in the repair target matrix and the electrical connection relationship and timing relationship between each measurement data point. The spatiotemporal graph neural network model includes the graph construction module, the quality-guided aggregation module, and the decoding module. The quality-guided aggregation module performs attention-weighted updates on the first features of each node in the heterogeneous graph and outputs the second features of each node. The decoding module maps each of the second features and outputs the repair estimate corresponding to each of the target data points.
8. A data repair device for power grid distribution areas, characterized in that, include: The module includes a data receiving module, a constraint verification module, an anomaly identification module, and a data repair module. The data receiving module is used to receive measurement data points uploaded by each smart device in the power grid area, and to construct a first mass vector corresponding to each measurement data point. The constraint verification module is used to obtain the electrical topology of the power grid area, perform physical constraint verification on each of the measurement data points according to the electrical topology, obtain the verification result corresponding to each of the measurement data points, and correct each of the first mass vectors according to the corresponding verification result to obtain the second mass vector corresponding to each of the measurement data points. The anomaly identification module is used to identify anomalies in each of the measurement data points according to the corresponding verification results and the second mass vector, to obtain all target data points to be repaired, and to construct a repair target matrix according to the second mass vector corresponding to each target data point and the topological association relationship between each target data point and the measurement data points in the corresponding spatiotemporal neighborhood. The data repair module is used to input the repair target matrix into a pre-trained spatiotemporal graph neural network model, so that the spatiotemporal graph neural network model performs spatiotemporal neighborhood information aggregation operation based on the repair target matrix, outputs the repair estimate value corresponding to each target data point, and performs data repair on each target data point based on the corresponding repair estimate value.
9. A terminal device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein, when the processor executes the computer program, it implements a data repair method for a power grid distribution area as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform a data repair method for a power grid substation as described in any one of claims 1-7.
