An enterprise energy data asset governance method based on a knowledge graph
By using knowledge graphs and an improved NBFNet model combined with the RUN optimization algorithm in the governance of enterprise energy data assets, the metering evidence segments are segmented and contribution paths are constructed. This solves the problem of inaccurate identification of abnormal contribution paths in the multi-layer propagation process, achieves efficient local updates and accurate corrections, and improves governance efficiency.
Patent Information
- Application Number
- CN202611303026.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-06
AI Technical Summary
Existing enterprise energy data asset governance methods repeatedly introduce initial node states during multi-layer propagation, leading to inaccurate identification of abnormal contribution paths and a lack of iterative verification. When revising source metering data, the scope of recalculation needs to be expanded, increasing the amount of computation.
By combining knowledge graphs, an improved NBFNet model, and the RUN optimization algorithm, enterprise energy metering data is segmented into metering evidence segments, metering contribution paths and accounting domains are constructed, abnormal contribution paths are iteratively corrected through the RUN optimization algorithm, and local updates are performed along the effective contribution paths when revising source metering data.
It improves the accuracy of identifying abnormal contribution paths and the reliability of correction results, narrows the update scope, reduces computational load, and improves the efficiency of enterprise energy data asset governance.
Smart Images

Figure CN123051622A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data asset governance technology, and in particular to a knowledge graph-based method for enterprise energy data asset governance. Background Technology
[0002] Existing enterprise energy data asset governance methods typically rely on energy management platforms, data warehouses, or knowledge graphs to centrally store, classify, manage, and query energy metering data. While these methods can record the source and derivation process of metering data, they lack fine-grained processing of the metering contributions generated during multi-level transformation, allocation, and aggregation, making it difficult to accurately distinguish the actual contribution range in different derivation paths.
[0003] With the development of knowledge graph and graph neural network technologies, graph-based energy data association analysis is increasingly being applied to enterprise energy data governance. However, existing graph reasoning methods often repeatedly introduce initial node states during multi-layer propagation, and excluded contribution ranges are prone to re-enter message aggregation, resulting in inaccurate identification of abnormal contribution paths.
[0004] Furthermore, existing methods often employ a one-time correction after identifying anomalous contributions, lacking iterative verification between the correction results and the graph reasoning process. When source metrology data is revised, the recalculation scope typically needs to be expanded, making it difficult to perform local updates only along the affected valid contribution paths, thus increasing the computational burden of energy data governance.
[0005] Therefore, how to provide a knowledge graph-based approach to enterprise energy data asset governance is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a knowledge graph-based method for enterprise energy data asset governance. This invention employs a combination of knowledge graphs, an improved NBFNet model, and the RUN optimization algorithm to segment enterprise energy metering data into metering evidence segments, construct metering contribution paths and accounting domains, and rewrite the boundary condition handling method between adjacent generalized relation convolutional layers to block the recovery of excluded contribution ranges. Abnormal contribution paths are iteratively corrected using the RUN optimization algorithm, and local updates are performed along effective contribution paths during source metering data revision. This method offers advantages such as accurate anomaly identification, reliable correction results, small update range, and high governance efficiency.
[0007] A knowledge graph-based enterprise energy data asset governance method according to an embodiment of the present invention includes the following steps: S1. Collect enterprise energy metering data and divide it into metering evidence segments according to metering attribution and valid interval; S2. Associate the measurement evidence segments with the energy data derived results, write the measurement contribution relationship into the knowledge graph, and form the measurement contribution path; S3. Collect effective measurement contribution paths according to the energy accounting caliber, delineate the accounting domain and form contribution inference objects; S4. Connect the contribution inference object to the improved NBFNet model, cut off the path of the initial node state to inject the message set from the second layer, form the current layer boundary conditions from the previous layer node state, block the recovery of the contribution range not retained by the previous layer node state, and form the final layer node state. S5. Read the status of the last-layer node, verify the merging results of the measurement contribution within the accounting domain, mark the range of abnormal contributions, and form the abnormal contribution path. The S6 and RUN optimization algorithms read the anomaly contribution paths, write back the intermediate correction results one by one to improve the NBFNet model, and use the recalculated remaining anomaly range to correct the slope of the next stage, thus forming the optimization correction results. S7. Retain the optimized correction results where the anomaly range has been reduced and the effective contribution has not been reduced, rewrite the anomaly contribution path and form the governance results; S8. When revising source measurement data, locally update along the effective contribution path that intersects with the revision interval in the governance results, and write the updated path back to the knowledge graph.
[0008] Optionally, S1 specifically includes: S11. Extract metering attribution information and validity time information from the enterprise's energy metering data, and group metering records with consistent metering attribution into the same record group. S12. Arrange the measurement records in the record group according to the collection time, verify the effective time connection status of adjacent measurement records, and split the record group at the point where the time is broken or the effective status changes. S13. Merge measurement records with consistent measurement affiliation and continuous effective time, retain the segment boundaries formed by the time breakpoints, and obtain the measurement evidence segment.
[0009] Optionally, S2 specifically includes: S21. Verify the attribution and time overlap between the measurement evidence segment and the energy data derived result, and associate the consistent measurement evidence segment with the energy data derived result. S22. Read the calculation process of the energy data derived results, trace the metering source in reverse along the calculation process, and retain the derivation chain that can be continuously traced back to the metering evidence segment; S23. Map the measurement evidence segment and energy data derivation results to knowledge graph nodes, map the transformation process in the derivation chain to directed edges, and record the actual contribution interval and interval contribution amount in the directed edges. S24. Connect directed edges according to the energy data derivation order to form a metering contribution path.
[0010] Optionally, S3 specifically includes: S31. Read the energy data derivation results and effective range defined by the energy accounting caliber, match the endpoint of the metering contribution path with the energy data derivation results, and extract the overlapping part of the actual contribution interval and the effective range. S32. Group the measurement contribution paths with corresponding endpoints and overlapping intervals into the same accounting domain, and retain the paths with non-corresponding endpoints or non-overlapping contribution intervals in the original knowledge graph. S33. Maintain the directed connection of the measurement contribution path within the accounting domain, and limit the effective range of the directed edge with the truncated contribution interval to form a contribution inference object.
[0011] Optionally, the improved NBFNet model includes a query relation embedding layer, multiple sequentially connected generalized relation convolutional layers, and a multilayer perceptron.
[0012] Optionally, the formation of the final layer node state specifically includes: Read the knowledge graph nodes within the contribution reasoning object, and build a node state tensor according to the knowledge graph nodes. The tensor rows correspond to the knowledge graph nodes, and the tensor columns correspond to the node state feature channels. The query relationship embedding layer reads the metering contribution relationship and forms a query relationship representation. The indicator function writes the query relationship representation into the node status row corresponding to the energy data derivation result, sets the remaining node status rows to zero, and forms the first layer initial boundary conditions. The message function of the first generalized relational convolutional layer reads the state of adjacent nodes and the representation of the measurement contribution relationship in the opposite direction of the measurement contribution path to form edge messages. The aggregation function merges the edge messages and the initial boundary conditions of the first layer according to the target node to form the state of the first layer node. Cut off the connection of the initial boundary condition of the first layer to the message set injected from the second layer onwards, write the node state tensor formed by the previous generalized relation convolutional layer as the boundary condition of the current layer, and do not fill in the contribution range that is not retained in the node state tensor of the previous layer from the initial boundary condition of the first layer. The message function of the current generalized relational convolutional layer forms edge messages in the opposite direction of the effective metric contribution path. The aggregation function merges the edge messages according to the target node and the current layer boundary conditions, and forms the current layer node state through linear transformation and activation processing. The node state acceptance and message merging are performed sequentially until the last generalized relational convolutional layer forms the final node state.
[0013] Optionally, S5 specifically includes: S51. The multilayer perceptron reads the state of the last layer node, and according to the knowledge graph node index, it maps the read results to the energy data derivation results and metering contribution paths in the accounting domain, and reads the actual contribution interval and interval contribution amount recorded in the metering contribution path. S52. Starting from the node corresponding to the energy data derived result, traverse the measurement contribution path layer by layer along the opposite direction of the directed edge of the knowledge graph, and merge the interval contribution amounts of the same measurement evidence segment that enter the same actual contribution interval. S53. Compare the merged interval contribution with the calculated amount of the energy data derived result interval by interval, calculate the contribution difference exceeding the calculated amount, and extract the continuous interval corresponding to the contribution difference to form the abnormal contribution range. S54. Mark the abnormal contribution range and contribution difference to the corresponding measurement contribution path to form an abnormal contribution path.
[0014] Optionally, S6 specifically includes: S61. Extract the abnormal contribution range boundary and contribution difference of the abnormal contribution path, and encode them as candidate individuals for the RUN optimization algorithm; S62. Update candidate individuals according to the Rungekuta slope progression order, calculate the current stage slope and form intermediate candidate results; S63. Temporarily write intermediate candidate results into the measurement contribution relationship of the abnormal contribution path, improve the NBFNet model to form the current layer boundary conditions with the updated measurement contribution relationship, re-infer the accounting domain and determine the remaining abnormal range. S64. Compare the remaining anomaly range with the anomaly contribution range before temporary writing, write the range change into the slope calculation of the next stage, and repeat the candidate individual update, temporary writing and accounting domain recursion. S65. Merge the slopes of each stage according to the slope synthesis order of the RUN optimization algorithm, update the candidate individuals, and form the optimized correction result by combining the updated abnormal contribution range boundary and contribution difference.
[0015] Optionally, S7 specifically includes: S71. Compare the abnormal contribution range and effective contribution range before and after the optimization and correction results are executed. If the abnormal contribution range is reduced and the effective contribution range is not reduced, retain the optimization and correction results; otherwise, cancel the temporary writing of intermediate candidate results to the measurement contribution relationship. S72. Map the retained optimization correction results to the abnormal contribution path, divide the actual contribution interval at the boundary of the abnormal contribution range, and adjust the interval contribution amount within the divided interval according to the contribution difference. S73. After re-merging and adjusting the interval contribution, the directed edges that do not exceed the energy data derivation result calculation amount after the division will remain valid, and the directed edges that still exceed the calculation amount after the division will be updated to the invalid state. S74. Summarize the adjusted actual contribution intervals and the effective states of directed edges to form the governance results.
[0016] Optionally, S8 specifically includes: S81. Read the revision interval of the source measurement data, traverse the effective contribution paths in the governance results, find the intersection of the revision interval and the effective interval of the directed edge, and filter out the effective contribution paths containing overlapping intervals. S82. Along the screened effective contribution path, locate the affected directed edges level by level from the node corresponding to the energy data derived result to the node corresponding to the node corresponding to the metering evidence segment, extract the overlapping intervals and keep the interval contribution and effective state of the non-overlapping intervals. S83. Write the revised source measurement value into the overlapping interval, recalculate the interval contribution in the overlapping interval step by step according to the conversion process of the directed edge record, and correct the effective interval of the affected directed edge. S84. Write the recalculated interval contribution and the corrected effective interval back into the corresponding directed edge in the knowledge graph to form an update path. The effective contribution paths that were not screened out remain unchanged.
[0017] The beneficial effects of this invention are: This invention segments enterprise energy metering data into metering evidence segments and establishes metering contribution paths and accounting domains in a knowledge graph. This enables the tracing of actual contribution intervals and interval contribution amounts along the energy data derivation process. By merging valid contribution paths within the same accounting domain, duplicate entries, excessive contributions, and invalid paths can be accurately identified, reducing the problems of unclear handling of multi-level conversion, allocation, and summarization processes in traditional overall accounting methods.
[0018] Furthermore, this invention improves the way boundary conditions are handled between adjacent generalized relation convolutional layers in the NBFNet model. It cuts off the path of repeated injection of the initial boundary conditions of the first layer into the message set from the second layer onwards, and forms the boundary conditions of the current layer by the state of the previous layer nodes. This avoids the exclusion of contribution ranges from re-entering the message aggregation process, thereby improving the accuracy and continuity of abnormal contribution path identification.
[0019] This invention also improves the NBFNet model by successively writing back intermediate candidate results using the RUN optimization algorithm, and corrects the slope of the next stage using the remaining anomaly range obtained from the recalculation, thereby improving the reliability of the anomaly contribution path correction results. When source metering data is revised, only local updates are performed along the effective contribution paths that intersect with the revision interval, which can reduce the recalculation range, reduce the amount of computation, and improve the efficiency of enterprise energy data asset governance. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a knowledge graph-based enterprise energy data asset governance method proposed in this invention; Figure 2This is a schematic diagram of an improved NBFNet model for a knowledge graph-based enterprise energy data asset governance method proposed in this invention. Figure 3 This diagram illustrates the interlayer boundary conditions and contribution range blocking of a knowledge graph-based enterprise energy data asset governance method proposed in this invention. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0022] refer to Figures 1-3 A knowledge graph-based approach to enterprise energy data asset governance includes the following steps: S1. Collect enterprise energy metering data and divide it into metering evidence segments according to metering attribution and valid interval; S2. Associate the measurement evidence segments with the energy data derived results, write the measurement contribution relationship into the knowledge graph, and form the measurement contribution path; S3. Collect effective measurement contribution paths according to the energy accounting caliber, delineate the accounting domain and form contribution inference objects; S4. Connect the contribution inference object to the improved NBFNet model, cut off the path of the initial node state to inject the message set from the second layer, form the current layer boundary conditions from the previous layer node state, block the recovery of the contribution range not retained by the previous layer node state, and form the final layer node state. S5. Read the status of the last-layer node, verify the merging results of the measurement contribution within the accounting domain, mark the range of abnormal contributions, and form the abnormal contribution path. The S6 and RUN optimization algorithms read the anomaly contribution paths, write back the intermediate correction results one by one to improve the NBFNet model, and use the recalculated remaining anomaly range to correct the slope of the next stage, thus forming the optimization correction results. S7. Retain the optimized correction results where the anomaly range has been reduced and the effective contribution has not been reduced, rewrite the anomaly contribution path and form the governance results; S8. When revising source measurement data, locally update along the effective contribution path that intersects with the revision interval in the governance results, and write the updated path back to the knowledge graph.
[0023] In this embodiment, S1 specifically includes: Metering attribution information is read from the metering equipment ledger and the master data of the energy management platform. The equipment code, installation location, energy medium, metering direction, and metering boundary jointly determine the metering object. Valid time information is read from the collection timestamp, version effective time, and version expiration time, and uniformly converted to the same time precision.
[0024] Metering records are first matched with the metering equipment ledger by equipment code, and then the installation location, energy medium, metering direction and metering boundary are checked item by item. If all are consistent, they are grouped into the same record group. Records with missing attribution information are transferred to the record set to be completed, and records with conflicting attribution values are transferred to the attribution conflict set and stop participating in this collection.
[0025] Within a record group, records are arranged in ascending order of collection time. When collection times are the same, the collection sequence number and the version effective time are compared sequentially. Records with smaller collection sequence numbers are placed first, and records with later version effective times are retained as currently valid records. The original record identifiers remain unchanged after sorting and are used to determine the time succession position of adjacent records.
[0026] The collection cycle is converted from the sampling frequency in the metering equipment ledger. When the time difference between adjacent records is equal to one collection cycle, the effective time is considered continuous. When the time difference is greater than one collection cycle, the boundaries are retained at both ends of the missing interval. Before the missing record is retransmitted, the records on both sides of the boundary are not merged.
[0027] The effective time is recorded using left-closed and right-open intervals. Adjacent intervals are continuous when their beginnings and ends are connected. When the start of the next record is later than the end of the previous record, the time is considered to be broken. When intervals overlap, the record with the larger collection sequence number is retained for the same version, and the record with the later effective time and the status of being valid is retained for different versions. Overlapping intervals where the order of versions cannot be determined are transferred to the time conflict set.
[0028] When the version code, effective time, or expiration time changes, the original record group is cut off at the position where the new version takes effect. Records with consistent measurement affiliation, continuous effective time, and the same version effective status are merged in the order of collection time. The starting point of the merge is the starting point of the first record, and the ending point of the merge is the ending point of the last record. Time breaks, status changes, and conflict positions are maintained as segment boundaries to form measurement evidence segments.
[0029] In this embodiment, S2 specifically includes: The attribution and correspondence between the measurement evidence segment and the energy data derived result are determined by checking each item of equipment code, energy medium, measurement boundary and accounting object; when all four items are consistent, an association is established; when any item is missing, it is transferred to the set of objects to be completed; when any item is conflicting, it is transferred to the set of attribution conflicts and the tracing stops.
[0030] Time overlap is determined by using the later start point of the two valid intervals (left closed, right open) as the overlap start point and the earlier end point as the overlap end point. If the overlap start point is earlier than the overlap end point, the overlap interval is retained. If the two are equal or the former is later than the latter, it is determined that there is no time overlap.
[0031] The calculation process for energy data-derived results is read from the calculation task configuration, transformation expression records, operation logs, and version records; each calculation record retains the input object identifier, output object identifier, calculation order, parameter version, and effective range, serving as the connection basis for reverse tracing.
[0032] The reverse tracing starts from the output object corresponding to the energy data derivation result, first reads the direct input object, and then reads the previous level input object in reverse order according to the calculation order until the measurement evidence segment is hit; when the current output object has the same identifier as the previous level input object and there is an overlap in the effective range, the derivation chain remains continuous.
[0033] When encountering broken object identifiers, missing calculation records, or no overlap in valid intervals during the tracing process, the current branch is terminated at the interruption point while the traced chain segment is retained; when there are multiple consecutive input branches for the same derived result, each branch is retained and entered into the knowledge graph mapping.
[0034] The measurement evidence segments and energy data derivation results are mapped to knowledge graph nodes, and the node index is determined by a combination of object identifier and version identifier. The transformation process in the calculation record is mapped to directed edges, with the edge direction pointing from the input node to the output node. The transformation type, effective interval, and interval contribution are written inside the edge.
[0035] The actual contribution interval is the overlapping part of the effective interval of the measurement evidence segment, the effective interval of the conversion process, and the effective interval of the energy data derivation result; when there is only partial overlap, the common interval is truncated; when there is no common interval, no directed edge is established; when contribution intervals conflict with each other, their respective edge records are retained and transferred to the interval conflict set.
[0036] When a node is missing, an empty node is first created using the object identifier and version identifier, and then an existing directed edge is attached and marked as pending completion. Continuous directed edges are connected in the order of energy data derivation to form a measurement contribution path that can be traced back from the energy data derivation results to the measurement evidence segment.
[0037] In this embodiment, S3 specifically includes: The energy accounting scope is determined by reading the enterprise's energy accounting system, energy management platform accounting configuration, and effective report templates. The accounting object, energy medium, metering boundary, statistical period, summary level, and version effectiveness status jointly define the accounting scope.
[0038] Energy data derivation results correspond to the endpoint of the metering contribution path through object identifier, accounting object, statistical period and version identifier. When the four items are consistent, the endpoint correspondence is established; when the endpoint identifier is missing, it is transferred to the set of objects to be completed; when any item conflicts, the collection is stopped and the original path is retained.
[0039] Both the effective range and the actual contribution interval are represented by left-closed and right-open intervals. The later start point is taken as the overlapping start point and the earlier end point is taken as the overlapping end point. When the overlapping start point is earlier than the overlapping end point, an effective overlapping interval is formed; otherwise, it is considered that there is no overlap.
[0040] When only a portion of the actual contribution interval falls within the valid range, the interval between the overlapping start point and the overlapping end point is truncated, and the original directed edge is split into overlapping interval segments and non-overlapping interval segments; the overlapping interval segments enter the current accounting domain, and the non-overlapping interval segments retain their original valid state.
[0041] The accounting domain uses the same energy data derivation result, the same accounting object, the same statistical period, and the same valid version as the aggregation boundary. Metering contribution paths that meet the four consistency requirements and have valid overlapping intervals are included in the same accounting domain.
[0042] For measurement contribution paths where the endpoints do not correspond or the effective intervals do not overlap, the original node index, directed edge identifier, interval contribution amount, and directed edge validity status are retained; paths with the version effective status being invalid are retained in the knowledge graph, and the corresponding directed edge validity status is written as invalid. Invalid paths are not included in the current contribution inference object.
[0043] The measurement contribution path entering the accounting domain maintains the original directed connection order from input node to output node, and only rewrites the effective range of directed edges with the truncated overlapping intervals. The conversion type within the edge and the interval contribution remain consistent with the original calculation record.
[0044] When a path is interrupted, the aggregation stops at the last continuous node while retaining the connected parts. When there is a conflict in the contribution intervals, the conflict intervals are saved and transferred to the interval conflict set. The valid paths with corresponding endpoints and continuous directed connections eventually form the contribution inference object.
[0045] In this embodiment, the improved NBFNet model includes a query relation embedding layer, multiple sequentially connected generalized relation convolutional layers, and a multilayer perceptron. A standard NBFNet establishes initial boundary conditions for the query starting point through an indicator function, propagates the source node state along the directed edges of the knowledge graph through a message function, merges edge messages and initial boundary conditions at each layer through an aggregation function, and converts the multi-layer propagation results into candidate node scores through a multi-layer perceptron.
[0046] Ordinary NBFNet repeatedly introduces the same initial boundary conditions in each generalized relational convolutional layer; failed versions or overlapping contribution ranges that have been excluded by previous layers in the enterprise energy contribution path will re-enter the current layer aggregation process, causing the abnormal contribution range to expand to adjacent intervals.
[0047] The improved NBFNet model consists of a query relation embedding layer, multiple sequentially connected generalized relation convolutional layers, and a multilayer perceptron. The number of generalized relation convolutional layers is consistent with the number of directed edges in the longest continuous measurand contribution path in the training data. In one implementation, the longest continuous measurand contribution path contains 4 directed edges, and the model is configured with 4 generalized relation convolutional layers.
[0048] The contribution reasoning object is encapsulated as an edge index matrix, a relation type vector, and a node index table; the edge index matrix uses a 2×E integer tensor, with the first row containing the source node index and the second row containing the target node index, where E is the number of valid directed edges in the current computation domain.
[0049] The query relationship embedding layer is configured with an R×64 embedding matrix, where R equals the number of contribution relationship types. Query relationship types locate the corresponding rows in the embedding matrix and form a 64-dimensional query relationship representation. Directed edge relationship types locate the corresponding rows in the same embedding matrix and form a 64-dimensional edge relationship representation.
[0050] The training data is taken from the metering records, derived calculation records, version change records and manual review records stored on the energy management platform. When the candidate metering evidence segment actually participates in the derived calculation and the interval contribution is not counted repeatedly, it is written to label 1. When there is duplicate entry, excessive contribution, version failure or derivation chain interruption, it is written to label 0.
[0051] Training samples are divided into units based on complete accounting tasks, with 70% written into the training set, 15% into the validation set, and 15% into the test set; samples from the same measurement contribution path and all intervals obtained by splitting from that path are included in only one dataset.
[0052] Samples labeled 1 are matched with samples labeled 0 within the same accounting domain and the same valid interval. When the number of samples labeled 1 and 0 in the current batch is inconsistent, the class weight is taken as the total number of samples in the current batch divided by the number of samples in the corresponding class, so that the loss contribution of the two classes remains at the same order of magnitude.
[0053] The query relationship embedding matrix and each linear transformation matrix are initialized using a uniform distribution using Xavier, with the upper and lower bounds being the sum of the number of input channels and the number of output channels, respectively, which are the square roots of 6. All bias initial values are set to 0.
[0054] The multilayer perceptron employs a 64-dimensional input layer, a 32-dimensional hidden layer, and a 1-dimensional output layer. The hidden layer sequentially performs matrix multiplication, bias superposition, and ReLU activation, while the output layer sequentially performs matrix multiplication, bias superposition, and Sigmoid compression to form a contribution score between 0 and 1.
[0055] The training loss is obtained by adding the weighted binary cross-entropy and the weight decay term; the label 1 loss and label 0 loss are multiplied by the corresponding class weights, and the weight decay term is the sum of the squares of all training weights multiplied by 1 × 10⁻. 5 The loss for the current batch is the sum of the arithmetic mean of the losses of all samples and the weight decay term.
[0056] The model parameters are updated using the Adam optimizer, with a learning rate of 1×10⁻³, a first-order moment decay of 0.9, a second-order moment decay of 0.999, and a numerical stability term of 1×10⁻³. 8 When the gradient norm exceeds 5, the ratio is obtained by multiplying all gradients by 5 and dividing by the current gradient norm.
[0057] The average loss on the validation set is calculated after each training round; the decrease in the average loss on the validation set is less than 1×10⁻ for 15 consecutive training rounds. 4 Updates stop when the training reaches 200 epochs, training ends, and the model parameters corresponding to the epoch with the lowest average loss on the validation set are restored.
[0058] The improved NBFNet model changes the source of boundary information between adjacent generalized relation convolutional layers. The first layer uses the initial boundary conditions formed by the indicator function, and the second and deeper layers only inherit the node states of the previous layer. The fixed initial boundary no longer repeatedly enters the deep aggregation, and the contribution range that has been removed by the previous layer loses the entry point to re-enter the recursive path.
[0059] In this embodiment, forming the state of the last-layer node specifically includes: The generalized relational convolutional layer sequentially performs message function operations, aggregation function operations, linear transformations, and activation processing. The message function calculates the edge messages passed on the directed edges, the aggregation function merges the edge messages according to the target node, the linear transformation unifies the feature channels, and the activation processing forms the state of the current layer node.
[0060] The contribution inference object is divided by the endpoints of the valid intervals of all directed edges, and the minimum continuous contribution interval is formed between adjacent endpoints. When the same directed edge covers the current minimum continuous contribution interval, it participates in the recursion. When it does not cover the interval, the corresponding edge message is written as a vector of all zeros.
[0061] The node state tensor is established with a single minimum continuous contribution interval as the processing unit, and the dimension is N×64; N corresponds to the number of knowledge graph nodes in the computational domain, the tensor rows correspond to the node index, and the 64 columns correspond to the node state feature channels. Each interval maintains the same node arrangement order.
[0062] The measurement evidence segment and energy data derivation results are mapped to node indexes through a combination of object identifier and version identifier; data with the same object identifier but different version identifiers occupy independent node status rows to avoid invalid versions sharing status content with the current valid version.
[0063] The query relationship embedding layer uses the metric contribution relationship type as the row index of the embedding matrix to read the corresponding 64-dimensional query relationship representation; the embedding matrix uses the parameters obtained during training, and is initialized with Xavier uniform distribution at the beginning of training.
[0064] For each minimum continuous contribution interval, an N×64 node state tensor and a set of valid node row indices of length N are established. The node state tensor stores the 64-dimensional state of each node, and the set of valid node row indices stores the node rows that have obtained the qualification to accept the boundary or the qualification to propagate the edge message in the current layer.
[0065] The indicator function writes the 64-dimensional query relation representation into the corresponding node row of the energy data derived result, and writes the node row into the first-level valid node row index set; the remaining node status rows are written as all-zero vectors, but are not written into the first-level valid node row index set.
[0066] The message function reads only the source node state within the set of valid node row indices; the source node state and the 64-dimensional edge relation are multiplied channel by channel, the product is multiplied by the linear transformation matrix of the 64×64 message function and superimposed with a 64-dimensional bias, and then compressed by the hyperbolic tangent function to form a 64-dimensional edge message.
[0067] The aggregation function merges edge messages based on the target node index; the edge messages received by the same target node are summed channel by channel and divided by the number of hit edges. Target nodes that have not received edge messages are written with an all-zero aggregation value, but do not gain the qualification to propagate due to the all-zero aggregation value.
[0068] The first generalized relational convolutional layer adds the aggregated edge message value to the initial boundary condition of the first layer channel by channel, then multiplies it with the 64×64 linear transformation matrix of the aggregated result and adds the bias, and then activates it through ReLU to form the state of the first layer node; the node row that receives a valid edge message or accepts the initial boundary condition of the first layer is written into the index set of the valid node row of the first layer.
[0069] Interlayer boundary conditions are located between the activation output of the previous generalized relational convolutional layer and the aggregation input of the current generalized relational convolutional layer; the pathway from the initial boundary conditions of the first layer to the aggregation input of the second and deeper layers is truncated at this location.
[0070] The second and deeper layers read the index set of valid node rows from the previous layer line by line; the node status within the index set is written into the current layer boundary conditions, while the node rows outside the index set are not written into the current layer boundary conditions, and the first layer query relationship representation is not supplemented into the corresponding node rows.
[0071] The current layer recalculates the edge messages corresponding to the valid source nodes and adds the aggregated edge message values to the current layer boundary conditions channel by channel. After the linear transformation and ReLU activation are completed, the node rows that receive valid edge messages or accept valid boundary conditions are written into the current layer valid node row index set.
[0072] The current layer node state tensor and the set of valid node row indices are jointly passed to the next generalized relational convolutional layer; when the node state value is all 0 but is within the set of valid node row indices, it continues to retain the propagation qualification. Node rows that are not written into the set of valid node row indices do not bear the current layer boundary conditions, nor do they receive edge messages from nodes that have not obtained the propagation qualification.
[0073] The current layer's propagation eligibility is obtained only by inheriting the state of the previous layer's valid nodes row by row, or by edge messages formed by the previous layer's valid nodes along directed edges; invalid contributions, overlapping contributions, and excess contributions that have already exited the propagation range cannot regain propagation eligibility through the initial boundary conditions of the first layer, and will continue to remain excluded in the remaining generalized relational convolutional layers.
[0074] When a metering contribution path is broken, the upstream node at the break point no longer receives edge messages for the current path; the existing node states remain within the current layer tensor, and the break point is used as the recursive endpoint of the path.
[0075] When the target node of the message does not match the node index table, the contributing inference object returns to the node mapping process and recreates the node based on the object identifier and version identifier; if the corresponding node still cannot be completed, the current branch recursion is terminated, and the identifier of the missing object and the valid range are recorded.
[0076] When the feature dimension of the node state, query relationship representation, or measurement contribution relationship representation is not 64, channel unification is completed by inputting a linear projection matrix of dimension × 64; when the number of tensor rows after projection is inconsistent with the number of node indices, the node state tensor is re-established and the existing state is migrated according to the node index.
[0077] After the last generalized relational convolutional layer completes edge message formation, current layer boundary condition acceptance, linear transformation of aggregation result and ReLU activation, it forms the final layer node state; each minimum continuous contribution interval corresponds to an N×64 final layer node state, which, together with the node index and interval boundary, is read by the multilayer perceptron.
[0078] Compared to the existing NBFNet, the improved NBFNet changes the source of boundary information for deep generalized relational convolutions, transforming the open propagation mode of repeatedly participating in the aggregation of each layer with fixed initial boundaries into a contraction propagation mode of unidirectional acceptance of the previous layer's inference state. The node state can retain the verified effective contribution range, while cutting off the source of invalid, overlapping, and excessive contribution ranges re-entering deep recursion, so that the propagation boundary of the contribution path remains stable as the layers advance, reducing the recovery of abnormal ranges, the expansion of adjacent intervals, and the erroneous reduction of effective contributions.
[0079] In this embodiment, S5 specifically includes: The multilayer perceptron reads the state of the last layer node corresponding to each minimum continuous contribution interval line by line. The 64-dimensional node state is multiplied by the 64×32 input weight matrix and a 32-dimensional bias is added. After ReLU activation, a 32-dimensional hidden vector is formed. Then, it is multiplied by the 32×1 output weight matrix and an output bias is added. After Sigmoid compression, the contribution carrying score is formed.
[0080] The contribution acceptance score is consistent with the position of the state tensor row of the last layer node. The i-th contribution acceptance score corresponds to the i-th knowledge graph node in the node index table. The node row with a contribution acceptance score greater than or equal to 0.5 is written into the set of valid contributing nodes, and the node row with a contribution acceptance score less than 0.5 and the corresponding interval contribution amount is greater than 0 is written into the set of abnormal candidate nodes.
[0081] When a node reads a result that does not match the node index table, the current node does not participate in contribution merging; the object identifier, version identifier, and minimum continuous contribution range are written into the node miss record, and the node is not included in the abnormal contribution path before the node mapping repair is completed.
[0082] The actual contribution interval is determined by the effective interval of each directed edge record of the measurement contribution path and the effective range of the accounting domain. The maximum value among the starting points of each interval is taken as the contribution starting point, and the minimum value among the ending points of each interval is taken as the contribution ending point. If the contribution starting point is earlier than the contribution ending point, the interval is retained; otherwise, the current path does not form an actual contribution interval.
[0083] The directed edge reverse traversal starts from the end point of the path corresponding to the energy data derivation result, reads the incoming edges pointing to the current node in sequence, and backtracks layer by layer along the direction from the output node to the input node; the traversal ends when the node corresponding to the measurement evidence segment is hit, and independent traversal branches are established when there are multiple incoming edges.
[0084] The same measurement evidence segment is identified by the measurement object identifier, version identifier, effective start point, and effective end point. Path sources with the same four identifiers are grouped into the same measurement evidence segment. Path sources with the same object identifier but different version identifiers or effective boundaries are retained separately to avoid merging the contributions of different versions.
[0085] When the same measurement evidence segment enters the same minimum continuous contribution interval through multiple measurement contribution paths, the common overlapping part of the actual contribution intervals of each path is taken first; when there is complete overlap, the interval contribution is directly summarized; when there is partial overlap, the segments are divided at the overlap boundary, and only the contribution within the common interval is summarized.
[0086] The contribution of an interval is calculated step by step according to the transformation process of the directed edge record. The linear transformation uses the contribution of the previous interval multiplied by the transformation ratio and then superimposed with a fixed adjustment amount. The nonlinear transformation directly calls the transformation expression saved in the calculation record. The calculation results of each level of the same path are passed to the end point of the path according to the energy data derivation order.
[0087] The contribution range of the accounting domain is limited to the time interval jointly covered by the statistical period, accounting object, energy medium and effective version in the energy accounting caliber; when the actual contribution range exceeds the limited contribution range, the overlapping part is truncated, and the part exceeding the limit is retained in the original knowledge graph and is not included in the current interval comparison.
[0088] The energy data derived results include a data type identifier and a sequence of calculation results; when the data type identifier is an interval quantity, the calculation result corresponding to the smallest continuous contribution interval is directly read as the current interval calculation quantity.
[0089] When the data type is identified as cumulative, the cumulative values corresponding to the start and end points of the minimum continuous contribution interval are read, and the current interval's accounting value is formed by subtracting the start point's cumulative value from the end point's cumulative value; if the start or end point is missing, the current interval is written with a missing accounting value record and the comparison is stopped.
[0090] The interval contribution and the accounting quantity are uniformly converted to the measurement unit and minimum measurement resolution recorded in the metering equipment ledger, and the same decimal places are retained by rounding. The interval contribution corresponding to the same measurement evidence segment is added together and compared with the current interval accounting quantity.
[0091] When the total contribution is higher than the current interval's calculated contribution, the difference between the two is written as the current interval's contribution difference; when the total contribution is not higher than the current interval's calculated contribution, the current interval's contribution difference is written as 0.
[0092] When adjacent minimum continuous contribution intervals both have positive contribution differences and correspond to the same measurement evidence segment and the same path branch, the adjacent intervals are merged and the starting point of the first interval and the ending point of the last interval are retained; the merged continuous intervals form the abnormal contribution range, and the contribution difference within the interval is summed to form the contribution difference.
[0093] When path traversal is interrupted, the continuous path portion that has already been calculated is retained, and the current branch is terminated at the interruption boundary. When a node is not hit, it is not included in the current interval summary. When the intervals only partially overlap, the boundary segmentation is completed first, and then the overlapping and non-overlapping parts are calculated separately.
[0094] The abnormal contribution range, contribution difference, measurement evidence segment node index, and corresponding measurement contribution path identifier are all written into the abnormal record; the abnormal record maintains the index correspondence with the original directed edge, forming an abnormal contribution path that can be read by the RUN optimization algorithm.
[0095] In this embodiment, S6 specifically includes: The RUN optimization algorithm uses abnormal contribution paths as the search objects, and establishes a set of candidate individuals for each abnormal contribution path. Each candidate individual records the abnormal start index, abnormal end index, and contribution correction amount in sequence. These three items together determine the path correction position and correction magnitude.
[0096] The abnormal start index and abnormal end index are taken from the smallest continuous contribution interval number corresponding to the two ends of the abnormal contribution range; the contribution correction amount is the contribution difference obtained by subtracting the accounting amount from the total contribution amount within the abnormal interval, and the numerical unit is consistent with the energy metering value.
[0097] Candidate individuals are encoded as 3D floating-point vectors. The starting index and ending index are divided by the total number of minimum continuous contribution intervals in the calculation domain, and the contribution correction is divided by the original contribution difference. The normalization result is limited to 0 to 1, and components that exceed the range are truncated to the nearest boundary.
[0098] In one implementation, 24 candidate individuals are established for each abnormal contribution path; the first candidate individual directly adopts the abnormal contribution range boundary and contribution difference, and the remaining individuals move the start and end boundaries within the original abnormal range and adjust the contribution correction amount. The moving result must not cross the effective range of the accounting domain.
[0099] When candidate individuals are temporarily written, the normalized boundary is restored to the minimum continuous contribution interval index, and the directed edge is split at the corresponding interval boundary; the contribution correction amount is deducted from the contribution amount of the interval corresponding to the abnormal path, and the original record is maintained for the uncovered interval and the missed directed edge.
[0100] The intermediate candidate results are established to correspond with the current layer boundary conditions through the message target nodes of the affected directed edges; the node state lines of the affected nodes in the previous generalized relation convolutional layer are kept as the current layer boundary conditions, and the state lines of the unaffected nodes directly use the original recursive results.
[0101] The recalculation of the domain begins from the generalized relation convolutional layer where the affected directed edge first enters the message set; this layer recalculates the aggregate value of the affected edge message and the target node, and updates the node state layer by layer along the affected path, without recalculating earlier levels and external paths.
[0102] Before each candidate individual is temporarily written, the interval boundaries, interval contribution, and valid states of the affected directed edges are cached, as well as the node state tensors and valid node row index sets after the starting position of the affected generalized relation convolutional layer are cached.
[0103] After the current candidate individual completes the temporary writing and accounting domain recursion, the remaining anomaly start point, remaining anomaly end point, and remaining contribution difference are read; the three items are normalized in the same way as the candidate individual to form the remaining anomaly vector.
[0104] The candidate set first excludes individuals whose abnormal range has expanded, whose effective contribution range has shrunk, whose contribution is less than 0, or whose boundary has exceeded the accounting domain; the remaining individuals are compared in turn by the remaining contribution difference, the number of boundary movement intervals, and the contribution correction amount, and the individual with the smaller value is determined as the current optimal candidate individual.
[0105] The slope in the first stage is the current optimal candidate vector minus the current candidate vector; half of the slope in the first stage is added to the current candidate vector to form the first intermediate candidate result.
[0106] After the first intermediate candidate result is temporarily written and the model is recursively applied, the remaining contribution difference is divided by the original contribution difference to obtain the remaining proportion; the remaining anomaly vector minus the first intermediate candidate vector forms the first boundary correction vector.
[0107] The slope of the second stage is the slope of the first stage multiplied by the remaining proportion, plus the first boundary correction vector; half of the slope of the second stage is superimposed on the original candidate individuals to form the second intermediate candidate result.
[0108] After the second intermediate candidate result is temporarily written and the model is recursively processed, the second boundary correction vector is formed in the same way. The slope of the third stage is the slope of the second stage multiplied by the new remaining ratio, and then the second boundary correction vector is added.
[0109] The third-stage slope is fully superimposed onto the original candidate individuals to form the final candidate results; after the final candidate results are temporarily written and model recursively processed, the fourth-stage slope is formed using the same calculation method.
[0110] The slopes of the first stage, second stage, third stage, and fourth stage are multiplied by 1, 2, 2, and 1 respectively, summed, and then divided by 6; the combined slope is added to the original candidate individuals to form updated candidate individuals.
[0111] Update the boundary components of the candidate individuals to the nearest minimum continuous contribution interval index, and restore the contribution correction amount to the corresponding energy metering value; if the starting point is later than the ending point after restoration, cancel the update and restore the cached content.
[0112] If temporary writes cause an expansion of the abnormal range, a reduction in the effective contribution, or the start and end boundaries to exceed the accounting domain, the directed edge splitting and contribution reduction of this time shall be cancelled; the node state tensor shall be restored to the cached value before the start of this stage, and the candidate individual shall not enter the next stage of calculation.
[0113] After a candidate individual completes a four-stage update, the remaining contribution difference is re-compared. In one implementation, the search stops when the decrease in the remaining contribution difference is less than 0.1% of the original contribution difference for five consecutive rounds, and the maximum number of update rounds can be 40.
[0114] After the search is completed, the candidate individual with the smallest remaining contribution difference and no reduction in effective contribution is selected; the corresponding anomaly start point, anomaly end point and contribution correction amount are used to form the optimization correction result, and the correspondence with the anomaly contribution path identifier and directed edge index is maintained.
[0115] In this embodiment, S7 specifically includes: Before the optimization and correction results enter the governance process, all minimum continuous contribution intervals corresponding to the abnormal contribution paths are read first. The intervals where the total contribution is higher than the calculated amount constitute the abnormal contribution range before correction, and the intervals where the total contribution is not higher than the calculated amount and the directed edge is valid constitute the valid contribution range before correction.
[0116] Before correction, the contribution difference is the sum of the difference between the total contribution and the calculated contribution within each abnormal interval; before correction, the effective contribution is the sum of the contributions of all effective directed edge intervals within the effective contribution range. The two values are compared with the corresponding results after the end of this round of correction.
[0117] The contribution range of the accounting domain is limited to the time interval jointly covered by the accounting object, energy medium, statistical period and effective version in the energy accounting caliber; when the optimization correction result exceeds this time interval, the out-of-bounds part will be removed from the candidate correction content and the corresponding directed edge original record will be restored.
[0118] The optimization and correction results are mapped to the original abnormal path through the abnormal contribution path identifier and the directed edge index; when the path identifier is consistent and the directed edge index is matched, the interval correction is entered; when the index is not matched, the result is cancelled and the original state of the abnormal path is retained.
[0119] When the boundary of the abnormal contribution range falls within the effective interval of the directed edge, the original directed edge is divided into the pre-boundary interval, the correction interval, and the post-boundary interval based on the boundary position. Each interval after division follows the original node connection direction and transformation process, and only records the new effective starting point and effective ending point respectively.
[0120] When the abnormal contribution range and the effective interval of the directed edge only partially overlap, the later starting point of the two is taken as the correction starting point, and the earlier ending point of the two is taken as the correction ending point; only the interval contribution amount within the overlapping interval is adjusted, while the non-overlapping interval retains the original contribution amount and effective state.
[0121] The contribution correction amount is only written to the abnormal contribution path corresponding to the optimization correction result, and is not assigned to other valid contribution paths within the same accounting domain; the correction starting point is the directed edge where the abnormal contribution first enters the metering contribution path.
[0122] The first entry position of an abnormal contribution is determined by comparing the interval contribution of adjacent directed edges in reverse; the correction starting point is determined by traversing from the energy data derived result node to the measurement evidence segment node and the first position where the contribution of the current directed edge is higher than the effective input of the previous layer.
[0123] The contribution of the new interval of the directed edge at the starting point is equal to the contribution of the original interval minus the contribution correction amount; if the result is less than 0, it is written as 0, and the remaining correction amount that cannot be deducted is retained as the remaining contribution difference and is not transferred to other paths.
[0124] After correcting the starting point, the directed edges from the input node to the output node are recalculated one by one. For single-input nodes, the previous level correction result is substituted into the transformation expression. For multi-input nodes, other valid input quantities remain unchanged, and the correction input quantity is added to other input quantities before executing the transformation expression.
[0125] The recalculation result of each directed edge is written to the corresponding correction interval; when the conversion expression, parameter version, or necessary input is missing, the current abnormal contribution path is restored to the interval boundary, interval contribution amount, and valid state before this round of correction.
[0126] The revised range of abnormal contributions is re-determined by comparing and summarizing the contribution amount and the accounting amount on an interval-by-interval basis; the revised range of effective contributions is the continuous interval that remains in an effective state and whose interval contribution amount is greater than 0. Both ranges are compared with the corresponding ranges before the revision.
[0127] If the range of abnormal contributions narrows but the range of effective contributions does not decrease, the correction of this round is retained; if the range of abnormal contributions expands, the range of effective contributions narrows, or the amount of effective contributions decreases, the interval splitting, contribution reduction, and state rewriting of this round are cancelled, and the directed edge records and node states before the temporary write are restored.
[0128] If the contribution of a directed edge interval is 0 after correction and the interval no longer contributes effectively, the effective state of the directed edge in that interval is updated to invalid. If the contribution of the interval is still greater than 0 and does not exceed the calculation amount, it remains effective. If it still exceeds the calculation amount, the abnormal mark is retained.
[0129] After the state update is completed, the effective intervals, interval contributions, and effective states of each directed edge are summarized. The summary results and the abnormal contribution path identifiers are written into the governance results and used as the basis for locating effective contribution paths when revising the source measurement data.
[0130] In this embodiment, S8 specifically includes: The source measurement data revision record reads the measurement object identifier, version identifier, revision start point, revision end point, and revision value; the revision interval adopts a left-closed and right-open form, and maintains the same time precision as the directed edge effective interval in the governance results.
[0131] When finding the intersection of the revised interval and the valid interval of the directed edge, the later value of the two interval starting points is taken as the overlapping starting point, and the earlier value of the two interval ending points is taken as the overlapping ending point; if the overlapping starting point is earlier than the overlapping ending point, the affected interval is formed; otherwise, the current directed edge does not participate in the update.
[0132] The effective contribution path starts from the node corresponding to the revised measurement evidence segment and traverses layer by layer along the directed edge direction to the node corresponding to the energy data derivation result. When there are multiple output edges in the same layer, they enter each branch according to the derivation order of the directed edge records. Invalid edges do not participate in the traversal.
[0133] Affected directed edges are located by the node index of the measurement evidence segment, the revision interval, and the valid interval of the directed edge. When the node index is consistent and the two intervals overlap, they are written into the set of affected edges. When the node index is inconsistent or the intervals do not overlap, the original state is maintained.
[0134] When the boundary of the overlapping interval falls within the valid interval of the directed edge, the original directed edge is split into overlapping interval segments and non-overlapping interval segments; each interval segment retains the original input node, output node and transformation process, and only records the new valid start point and valid end point respectively.
[0135] Non-overlapping intervals retain the original interval contribution, version activation status, and validity status; overlapping intervals clear the original interval contribution and write a recalculation pending flag, serving as the starting object for step-by-step recalculation.
[0136] The revised source measurement values are re-summarized based on the sampling records within the overlapping intervals; cumulative measurement data is obtained by subtracting the starting point reading from the end point reading of the interval, and flow rate measurement data is obtained by multiplying each sample value by the time difference between adjacent sampling points and then summing them.
[0137] The transformation process reads the computation task configuration, transformation expression, parameter version, and execution record associated with the directed edges; when the transformation expression and parameter version simultaneously cover overlapping intervals, recalculation begins; if either content is missing, the current branch is stopped and the original interval contribution of that branch is restored.
[0138] The output of the linear transformation is obtained by multiplying the contribution of the input interval by the transformation ratio and adding a fixed adjustment amount; for multi-input aggregation, the input quantities of the same layer are first added together, then the transformation expression is executed, and the calculation result is written into the overlapping interval of the next directed edge.
[0139] The recalculation is performed step by step along the direction from the metering evidence segment node to the energy data derived result node; after the current directed edge is recalculated, its output is used as the input of the next directed edge, until the end of the path is hit or the path is interrupted.
[0140] The effective interval correction is limited to the actual range of input records existing in the overlapping interval segment; when the input records cover the entire overlapping interval, the boundary of the interval is maintained; when the coverage is insufficient, the effective start point and effective end point are shrunk to the actual continuous record boundary.
[0141] When the revision interval exceeds the valid range of the path, only the overlapping part of the two is truncated and recalculated; the excess part is retained in the source measurement revision record and written into the unmapped interval set, without rewriting the existing directed edges in the knowledge graph.
[0142] Each affected contribution path is treated as a complete update transaction. Before the recalculation begins, the range contribution, effective range, version effective status, and directed edge effective status of all affected directed edges within the cached path are recorded.
[0143] If the path is interrupted, the transformation expression is missing, the parameter version is missing, the necessary input is missing, or the recalculation result is lower than 0, all temporary calculations completed in the current path are undone, and the directed edge records in the transaction cache are restored.
[0144] Once the current path has fully reached the energy data derived result node and all directed edges have been recalculated, a new interval contribution, valid interval, version effective status, and directed edge effective status are submitted at once; if the path endpoint has not been fully reached, no partial results are submitted to the knowledge graph.
[0145] After all affected paths are recalculated, the new interval contribution, effective start point, effective end point, and version status are written back to the corresponding directed edges; non-overlapping interval segments and overlapping interval segments are reconnected in chronological order to form updated paths.
[0146] When updating paths and writing them back to the knowledge graph, the original node indexes and directed edge identifiers are preserved, and the corresponding edge records of the revised intervals are updated to the new version. Valid contribution paths that are not screened out are not included in the calculation and their original contribution amounts, valid intervals, and connection order are preserved.
[0147] Example 1: To verify the feasibility of this invention in practice, it was applied to the energy data management platform of a comprehensive manufacturing enterprise, and a workshop power accounting chain was selected for verification. The accounting chain includes one workshop master meter, three production line sub-meters, two allocation results, and one workshop energy consumption summary result. Metering data is collected at 15-minute intervals. The platform found that after the new version of the allocation result took effect, the old version of the allocation result remained valid for eight consecutive sampling periods, and both the old and new version paths were connected to the workshop energy consumption summary result. Manual verification confirmed that the new version of the allocation result contributed a total of 382.7 kWh over the eight sampling periods, the old version of the allocation result contributed a total of 379.6 kWh, and the summary result actually received 762.3 kWh, while the corresponding workshop master meter reading was 382.7 kWh. Therefore, the old version path resulted in a duplicate contribution of 379.6 kWh. The original verification method could only detect abnormal summaries and could not directly locate the actual interval where the duplicate contribution occurred and the corresponding derived path.
[0148] The platform reads the metering attribution, validity period, and calculation process from the workshop master table, production line sub-table, allocation results, and summary results. At the point where the version's effective status changes, the metering records are segmented, forming 12 metering evidence segments. These metering evidence segments and energy data derivation results are then mapped to knowledge graph nodes, and the allocation and summary processes are mapped to directed edges, resulting in 18 nodes and 27 directed edges. Each directed edge records the actual contribution interval and the interval's contribution amount. After collecting the effective contribution paths according to the workshop energy consumption summary caliber, the contribution inference object enters an improved NBFNet model with four generalized relational convolutional layers. The query relation representation is written to the node state row corresponding to the workshop energy consumption summary result. The first generalized relational convolutional layer propagates the node state to the allocation result node and metering evidence segment node along the directed edges in the reverse direction. Starting from the second generalized relational convolutional layer, the model stops repeatedly injecting the first-layer initial boundary conditions and directly uses the first-layer node state to form the second-layer boundary conditions. Therefore, intervals not retained by the first-layer state in the old version path will not re-enter the message set. The multilayer perceptron eventually located eight consecutive sampling periods and marked the old version's amortization path as an anomalous contribution path; the ordinary NBFNet model, due to the reintroduction of the initial node state in each layer, expanded the anomalous range to 10 adjacent sampling periods.
[0149] After reading the abnormal contribution path, the RUN optimization algorithm forms candidate individuals from the start and end points of the abnormal interval and the contribution difference. The first stage, slope advancement, narrows the candidate abnormal range from 10 sampling periods to 8 sampling periods, and temporarily writes the intermediate candidate results into the contribution relationship of the corresponding directed edges. After recursively recursively recursively recursively recursively, the remaining contribution deviation is 4.8 kWh. The second stage adjusts the contribution correction amount based on the remaining deviation, reducing the remaining deviation to 0.7 kWh after recursion. The third and fourth stages keep the abnormal interval boundaries unchanged, only correcting the interval contribution amount, resulting in a final remaining deviation of 0.1 kWh, lower than the minimum resolution of the metering equipment. Based on this, the platform updates the old version path to an invalid state within the abnormal interval and retains the 382.7 kWh effective contribution corresponding to the new version path. After a 3.6 kWh increase in one sampling period of the source metering data, the platform only locates and recalculates the 3 directed edges intersecting with the revised interval, leaving the remaining 24 directed edges unchanged.
[0150] To verify the processing results, 12,600 measurement contribution paths and 180 batches of source measurement revision tasks were selected. The original rule verification method, the ordinary NBFNet model method, and the method of this invention were compared under the same knowledge graph and computing environment. The statistical results are shown in Table 1 below: Table 1 Comparison of the Effectiveness of Enterprise Energy Metering Contribution Path Anomaly Management Table
[0151] As can be seen from the data in Table 1 above, the method of the present invention outperforms the original rule verification method and the ordinary NBFNet model method in terms of anomaly path precision, anomaly path recall, average deviation of interval boundaries, effective contribution retention rate, average recalculated path ratio, and average processing time. The original rule verification method relies on fixed calculation criteria and result difference judgment, achieving an anomaly path precision of 83.9% and a recall of 78.6%, with an average deviation of 3.7 sampling periods for interval boundaries, indicating that it easily misses real anomaly paths and struggles to accurately determine the start and end range of repeated contributions. The ordinary NBFNet model improves precision and recall to 90.8% and 88.1% respectively, but repeated injection of initial node states in multi-layer propagation still causes anomaly range expansion, with an average deviation of 1.8 sampling periods for interval boundaries. The method of the present invention achieves a precision of 96.3%, a recall of 94.9%, reduces the average deviation of interval boundaries to 0.4 sampling periods, and improves the effective contribution retention rate to 99.1%, indicating that the model can reduce the erroneous reduction of normal contributions when identifying anomaly paths. The average recalculation path percentage decreased to 11.8%, and the average processing time decreased to 0.93 seconds, indicating that partial updates can reduce the recalculation scope after data revision.
[0152] This embodiment organizes the workshop master table, production line sub-table, allocation results, and energy consumption summary results into a measurement evidence segment, and writes the transformation process into a knowledge graph. It establishes a measurement contribution path carrying the actual contribution range and the contribution amount of each range, enabling the allocation, summarization, and version change processes within the same accounting domain to be traced back along the path. The improved NBFNet model uses initial boundary conditions in the first generalized relation convolutional layer. From the second generalized relation convolutional layer onwards, the boundary conditions of the current layer are inherited by the previous layer's node state, preventing the contribution range excluded by the previous layer from re-entering the message set, thereby locating the duplicate contribution range formed by the continued effectiveness of the old version's allocation path. The RUN optimization algorithm forms candidate individuals from the abnormal interval boundaries and contribution differences, temporarily writing back intermediate candidate results between adjacent slope stages. The improved NBFNet model then re-infers the remaining abnormal range, and uses the inferential results to correct the slope of the next stage, ultimately completing the abnormal interval segmentation, contribution amount correction, and failed path update. When source metering data changes, the platform only recalculates the effective contribution paths that intersect with the revised interval. Unaffected paths maintain their original interval contribution amount and effective status. Therefore, it can balance the accuracy of anomaly identification, the protection of effective contributions, and the efficiency of energy data governance.
[0153] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A knowledge graph-based method for enterprise energy data asset governance, characterized in that, Includes the following steps: S1. Collect enterprise energy metering data and divide it into metering evidence segments according to metering attribution and valid interval; S2. Associate the measurement evidence segments with the energy data derived results, write the measurement contribution relationship into the knowledge graph, and form the measurement contribution path; S3. Collect effective measurement contribution paths according to the energy accounting caliber, delineate the accounting domain and form contribution inference objects; S4. Connect the contribution inference object to the improved NBFNet model, cut off the path of the initial node state to inject the message set from the second layer, form the current layer boundary conditions from the previous layer node state, block the recovery of the contribution range not retained by the previous layer node state, and form the final layer node state. S5. Read the status of the last-layer node, verify the merging results of the measurement contribution within the accounting domain, mark the range of abnormal contributions, and form the abnormal contribution path. The S6 and RUN optimization algorithms read the anomaly contribution paths, write back the intermediate correction results one by one to improve the NBFNet model, and use the recalculated remaining anomaly range to correct the slope of the next stage, thus forming the optimization correction results. S7. Retain the optimized correction results where the anomaly range has been reduced and the effective contribution has not been reduced, rewrite the anomaly contribution path and form the governance results; S8. When revising source measurement data, locally update along the effective contribution path that intersects with the revision interval in the governance results, and write the updated path back to the knowledge graph.
2. The enterprise energy data asset governance method based on knowledge graphs according to claim 1, characterized in that, S1 specifically includes: S11. Extract metering attribution information and validity time information from the enterprise's energy metering data, and group metering records with consistent metering attribution into the same record group. S12. Arrange the measurement records in the record group according to the collection time, verify the effective time connection status of adjacent measurement records, and split the record group at the point where the time is broken or the effective status changes. S13. Merge measurement records with consistent measurement affiliation and continuous effective time, retain the segment boundaries formed by the time breakpoints, and obtain the measurement evidence segment.
3. The enterprise energy data asset governance method based on knowledge graphs according to claim 1, characterized in that, S2 specifically includes: S21. Verify the attribution and time overlap between the measurement evidence segment and the energy data derived result, and associate the consistent measurement evidence segment with the energy data derived result. S22. Read the calculation process of the energy data derived results, trace the metering source in reverse along the calculation process, and retain the derivation chain that can be continuously traced back to the metering evidence segment; S23. Map the measurement evidence segment and energy data derivation results to knowledge graph nodes, map the transformation process in the derivation chain to directed edges, and record the actual contribution interval and interval contribution amount in the directed edges. S24. Connect directed edges according to the energy data derivation order to form a metering contribution path.
4. The enterprise energy data asset governance method based on knowledge graphs according to claim 1, characterized in that, S3 specifically includes: S31. Read the energy data derivation results and effective range defined by the energy accounting caliber, match the endpoint of the metering contribution path with the energy data derivation results, and extract the overlapping part of the actual contribution interval and the effective range. S32. Group the measurement contribution paths with corresponding endpoints and overlapping intervals into the same accounting domain, and retain the paths with non-corresponding endpoints or non-overlapping contribution intervals in the original knowledge graph. S33. Maintain the directed connection of the measurement contribution path within the accounting domain, and limit the effective range of the directed edge with the truncated contribution interval to form a contribution inference object.
5. The enterprise energy data asset governance method based on knowledge graphs according to claim 1, characterized in that, The improved NBFNet model includes a query relation embedding layer, multiple sequentially connected generalized relation convolutional layers, and a multilayer perceptron.
6. The enterprise energy data asset governance method based on knowledge graphs according to claim 1, characterized in that, The formation of the final layer node state specifically includes: Read the knowledge graph nodes within the contribution reasoning object, and build a node state tensor according to the knowledge graph nodes. The tensor rows correspond to the knowledge graph nodes, and the tensor columns correspond to the node state feature channels. The query relationship embedding layer reads the metering contribution relationship and forms a query relationship representation. The indicator function writes the query relationship representation into the node status row corresponding to the energy data derivation result, sets the remaining node status rows to zero, and forms the first layer initial boundary conditions. The message function of the first generalized relational convolutional layer reads the state of adjacent nodes and the representation of the measurement contribution relationship in the opposite direction of the measurement contribution path to form edge messages. The aggregation function merges the edge messages and the initial boundary conditions of the first layer according to the target node to form the state of the first layer node. Cut off the connection of the initial boundary condition of the first layer to the message set injected from the second layer onwards, write the node state tensor formed by the previous generalized relation convolutional layer as the boundary condition of the current layer, and do not fill in the contribution range that is not retained in the node state tensor of the previous layer from the initial boundary condition of the first layer. The message function of the current generalized relational convolutional layer forms edge messages in the opposite direction of the effective metric contribution path. The aggregation function merges the edge messages according to the target node and the current layer boundary conditions, and forms the current layer node state through linear transformation and activation processing. The node state acceptance and message merging are performed sequentially until the last generalized relational convolutional layer forms the final node state.
7. The enterprise energy data asset governance method based on knowledge graphs according to claim 1, characterized in that, S5 specifically includes: S51. The multilayer perceptron reads the state of the last layer node, and according to the knowledge graph node index, it maps the read results to the energy data derivation results and metering contribution paths in the accounting domain, and reads the actual contribution interval and interval contribution amount recorded in the metering contribution path. S52. Starting from the node corresponding to the energy data derived result, traverse the measurement contribution path layer by layer along the opposite direction of the directed edge of the knowledge graph, and merge the interval contribution amounts of the same measurement evidence segment that enter the same actual contribution interval. S53. Compare the merged interval contribution with the calculated amount of the energy data derived result interval by interval, calculate the contribution difference exceeding the calculated amount, and extract the continuous interval corresponding to the contribution difference to form the abnormal contribution range. S54. Mark the abnormal contribution range and contribution difference to the corresponding measurement contribution path to form an abnormal contribution path.
8. The enterprise energy data asset governance method based on knowledge graphs according to claim 1, characterized in that, S6 specifically includes: S61. Extract the abnormal contribution range boundary and contribution difference of the abnormal contribution path, and encode them as candidate individuals for the RUN optimization algorithm; S62. Update candidate individuals according to the Rungekuta slope progression order, calculate the current stage slope and form intermediate candidate results; S63. Temporarily write intermediate candidate results into the measurement contribution relationship of the abnormal contribution path, improve the NBFNet model to form the current layer boundary conditions with the updated measurement contribution relationship, re-infer the accounting domain and determine the remaining abnormal range. S64. Compare the remaining anomaly range with the anomaly contribution range before temporary writing, write the range change into the slope calculation of the next stage, and repeat the candidate individual update, temporary writing and accounting domain recursion. S65. Merge the slopes of each stage according to the slope synthesis order of the RUN optimization algorithm, update the candidate individuals, and form the optimized correction result by combining the updated abnormal contribution range boundary and contribution difference.
9. A knowledge graph-based enterprise energy data asset governance method according to claim 1, characterized in that, Specifically, S7 includes: S71. Compare the abnormal contribution range and effective contribution range before and after the optimization and correction results are executed. If the abnormal contribution range is reduced and the effective contribution range is not reduced, retain the optimization and correction results; otherwise, cancel the temporary writing of intermediate candidate results to the measurement contribution relationship. S72. Map the retained optimization correction results to the abnormal contribution path, divide the actual contribution interval at the boundary of the abnormal contribution range, and adjust the interval contribution amount within the divided interval according to the contribution difference. S73. After re-merging and adjusting the interval contribution, the directed edges that do not exceed the energy data derivation result calculation amount after the division will remain valid, and the directed edges that still exceed the calculation amount after the division will be updated to the invalid state. S74. Summarize the adjusted actual contribution intervals and the effective states of directed edges to form the governance results.
10. A knowledge graph-based enterprise energy data asset governance method according to claim 1, characterized in that, S8 specifically includes: S81. Read the revision interval of the source measurement data, traverse the effective contribution paths in the governance results, find the intersection of the revision interval and the effective interval of the directed edge, and filter out the effective contribution paths containing overlapping intervals. S82. Along the screened effective contribution path, locate the affected directed edges level by level from the node corresponding to the energy data derived result to the node corresponding to the node corresponding to the metering evidence segment, extract the overlapping intervals and keep the interval contribution and effective state of the non-overlapping intervals. S83. Write the revised source measurement value into the overlapping interval, recalculate the interval contribution in the overlapping interval step by step according to the conversion process of the directed edge record, and correct the effective interval of the affected directed edge. S84. Write the recalculated interval contribution and the corrected effective interval back into the corresponding directed edge in the knowledge graph to form an update path. The effective contribution paths that were not screened out remain unchanged.
