A method and system for visual configuration of power settlement based on node dragging

By building a visual settlement dependency topology diagram in the power settlement system and combining it with a distributed computing framework, the problems of invisible global computing topology and low resource utilization in existing technologies are solved, and fast and accurate power settlement processing is achieved.

CN120429484BActive Publication Date: 2025-09-12BEIJING QU CREATIVE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510933250.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-09-12
Estimated Expiration
2045-07-08

AI Technical Summary

Technical Problem

In the existing electricity settlement system, dependencies are limited to a single settlement unit, and cross-unit data reference chain mapping cannot be achieved. This makes the global computing topology invisible and difficult to accurately locate the affected downstream settlement units. The execution process relies on a single-threaded script engine and cannot utilize distributed computing resources, resulting in high settlement task delays.

Method used

By providing a collection of data types and computing nodes in a visual interface, responding to user drag and drop operations, building a settlement dependency topology diagram, and utilizing a distributed computing framework to monitor data change status, it automatically locates affected downstream nodes for recalculation.

Benefits of technology

It achieves visual mapping of global dependencies across units, ensuring accurate location and calculation of downstream nodes when data changes, reducing settlement task latency from hours to seconds, and improving resource utilization and computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429484B_ABST
    Figure CN120429484B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for visual configuration of electricity settlement based on node dragging. Among them, the present application provides a data type set and computing nodes for electricity settlement in a visual interface, parses the operation rule expression in response to the node dragging operation and binds the electricity transaction data; generates a one-way node connection line by dragging the connection line between nodes by the user, constructs a settlement dependency topology with computing nodes as vertices and connection lines as directed edges, and maps the data reference path between nodes; initializes the calculation sequence based on the node with zero in-degree in the topology, and converts the expression of the binding relationship into an executable script through the variable binder; drives the distributed framework to schedule tasks in topological order based on the calculation sequence, determines the affected downstream nodes and data items in combination with the topology when monitoring data changes, and recalculates and outputs the settlement results in topological order. The present application realizes the visualization configuration and dynamic update automation of electricity settlement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent technology for power transaction settlement, and in particular to a method and system for visual configuration of power settlement based on node dragging. Background Art

[0002] As the scale of electricity market transactions continues to expand and settlement rules become increasingly complex, with scenarios such as mixed pricing for multiple units, dynamic adjustments to time-of-use electricity prices, and cross-provincial renewable energy subsidies, power companies face the dual challenges of flexible algorithm configuration and visualization of computational dependencies. Therefore, an intelligent settlement method that supports visual drag-and-drop configuration, global dependency topology construction, and incremental computational response is urgently needed.

[0003] Currently, a representative solution is the settlement unit formula editing method. This method allows users to group power plant units into logical settlement units based on electricity pricing strategies. In a visual interface, users can drag and drop electricity meter data and unit attribute parameters from the variable library, as well as mathematical operators and logical judgment symbols from the function library, to create settlement rule expressions within the unit.

[0004] However, this solution had significant flaws. Dependencies were limited to individual units, making it impossible to map data reference chains across units. This made the global computing topology invisible, making it difficult to accurately locate the affected downstream settlement units when the power data of a particular unit changed. The execution process relied on a single-threaded scripting engine, unable to leverage distributed computing resources, resulting in latency of several hours for large-scale settlement tasks. Summary of the Invention

[0005] The present application provides a node dragging-based electricity settlement visualization configuration method and system to solve the problem of low utilization of distributed resources in the prior art.

[0006] In a first aspect, the present application provides a node dragging-based electricity settlement visualization configuration method, comprising:

[0007] A data type set and corresponding computing nodes for power settlement are provided in a visual interface. In response to a user dragging and dropping a computing node, the computing rule expression configured for the computing node is parsed, and a binding relationship between the computing rule expression and the corresponding power transaction data is established.

[0008] In response to a user dragging a connection line between computing nodes, generating a node connection line representing a computing dependency relationship, and constructing a settlement dependency topology based on the computing dependency relationship represented by the node connection line, wherein the settlement dependency topology comprises a directed graph structure with the computing nodes as vertices and the node connection lines as directed edges, mapping data reference paths between nodes;

[0009] Initializing a calculation sequence according to a node with zero in-degree in the directed graph structure, and converting the operation rule expression carrying the binding relationship into an executable script through a variable binder;

[0010] Based on the initialized calculation sequence, the executable script is used to drive the distributed computing framework to schedule computing tasks in the topological order represented by the calculation sequence, and in the process of executing the computing tasks, the change status of the partitioned storage data is monitored, and the downstream computing nodes and their associated data items affected by the change are determined based on the settlement dependency topology, and the power settlement results are recalculated and output in combination with the topological order of the settlement dependency topology.

[0011] Optionally, it also includes:

[0012] The function configuration information, inter-node connection relationship and intermediate calculation results corresponding to the computing node are stored in the Hive data warehouse;

[0013] During the function definition process, based on the function configuration information stored in the Hive data warehouse, in response to the user's parameter configuration operation on the tool function node, a pre-verification data structure is generated for the function parameter whose data type is a dataset. The pre-verification data structure is obtained by automatically identifying the table header and column data type by parsing the CSV format simulation data file imported by the user;

[0014] When recalculating the electricity settlement results, historical archived data is extracted from the Hive data warehouse, the changed data is compared with the historical archived data, and the affected data items are located according to the settlement dependency topology. The data is verified in combination with the pre-verification data structure, and a reversal settlement result with a version mark is generated based on the verified data.

[0015] Optionally, it also includes:

[0016] Divide the intermediate calculation results into edited data and historical data according to the data status. The edited data is stored in the distributed memory database for online calculation result debugging, and the historical data is stored in the Hive data warehouse for reversal and settlement.

[0017] In response to the settlement result output instruction, the historical data is called, a preset Excel-like template configuration is parsed through the web-based settlement form template designer, and a filling rule for the hierarchical data corresponding to the calculation sequence is generated based on the cell orientation relationship, and the settlement result is driven to dynamically generate a multi-format settlement form according to the filling rule;

[0018] By deploying a file synchronization service in an external isolated area, the multi-format settlement statements are transmitted to the historical data storage node in the internal computing area, thereby achieving secure synchronization of settlement results between the internal and external networks.

[0019] Optionally, establishing a binding relationship between the operation rule expression and the corresponding power transaction data includes:

[0020] The corresponding power transaction data is extracted from the distributed storage device, and a binding relationship is established between the power transaction data and the operation rule expression, wherein the distributed storage device adopts a horizontal sharding strategy based on the transaction subject identifier and a vertical partitioning strategy based on the settlement cycle identifier to achieve isolated storage and parallel reading and writing of daily settlement statements and monthly settlement statements.

[0021] Optionally, in response to a user dragging a connection line between computing nodes, a node connection line representing a computing dependency relationship is generated, and based on the computing dependency relationship represented by the node connection line, a settlement dependency topology is constructed, wherein the settlement dependency topology comprises a directed graph structure with the computing nodes as vertices and the node connection lines as directed edges, mapping data reference paths between nodes, including:

[0022] In response to a user dragging operation from an output port of a first computing node to an input port of a second computing node, generating a unidirectional node connection line representing a computing dependency relationship, wherein the unidirectional node connection line is used to mark a data flow direction;

[0023] Extracting the connection status of the input port and the output port of each computing node based on all the generated unidirectional node connection lines, and determining the dependency direction between the computing nodes based on the connection status of the input port and the output port;

[0024] A directed graph structure is constructed with the computing nodes as vertices and the unidirectional node connection lines as directed edges to form a settlement dependency topology, wherein the starting point of each directed edge of the settlement dependency topology is a data output node and the end point is a data input node, and the direction of the directed edge is consistent with the dependency direction;

[0025] The settlement dependency topology is traversed, and a data reference path between nodes is mapped for each directed edge, wherein the data reference path label records the transfer path from the output data of the starting node to the input data of the ending node.

[0026] Optionally, a directed graph structure forming a settlement dependency topology is constructed with the computing nodes as vertices and the unidirectional node connection lines as directed edges, wherein the starting point of each directed edge of the settlement dependency topology is a data output node and the end point is a data input node, and the direction of the directed edge is consistent with the dependency direction, including:

[0027] Traverse all the one-way node connection lines generated by the user, and directly generate a corresponding directed edge for each one-way node connection line. The starting point of the directed edge is fixed to the starting computing node associated with the one-way node connection line, and the end point is fixed to the end computing node associated with the one-way node connection line. The direction of the directed edge is forcibly aligned with the user-defined data flow direction;

[0028] At the same time, all the computing nodes are integrated into a vertex set, and all the directed edges generated according to this rule are integrated into a directed edge set. According to the vertex set and the directed edge set, a directed graph structure of the settlement dependency topology is constructed, wherein each directed edge is bound to the output end identifier of the starting computing node and the input end identifier of the end computing node.

[0029] Optionally, based on the initialized calculation sequence, the executable script drives the distributed computing framework to schedule computing tasks in the topological order represented by the calculation sequence, and during the execution of the computing tasks, monitors the change status of partition storage data, determines the downstream computing nodes affected by the change and their associated data items based on the settlement dependency topology, and recalculates and outputs the power settlement results in combination with the topological order of the settlement dependency topology, including:

[0030] Distributing the executable script to a task queue of a distributed computing framework according to the order of the computing sequence, scheduling computing tasks for execution according to the order of the task queue, and accessing a corresponding data storage path to obtain data when each computing task is executed;

[0031] During the execution of computing tasks, the incremental data capturer monitors the data change status of the partition storage area. When a data change is detected, the location identifier of the changed data item is extracted.

[0032] Triggering a lineage tracer to locate downstream computing nodes affected by the change and associated data items with the location identifiers based on the directed graph structure of the settlement dependency topology;

[0033] According to the topological order of the calculation sequence, the executable scripts corresponding to the affected downstream computing nodes are rescheduled to perform the calculation tasks, and the recalculated power settlement results are output to the result storage area. The power settlement results are classified according to the settlement cycle identifier to generate a daily settlement statement or a monthly settlement statement.

[0034] Optionally, a data type set and corresponding computing nodes for electricity settlement are provided in a visual interface, and in response to a user dragging and dropping a computing node, an operation rule expression configured for the computing node is parsed, including:

[0035] Presetting a data type set in the visualization interface, the data type set including contracted electricity quantity, transaction electricity price, and settlement period identifier;

[0036] In response to a user dragging a computing node to a canvas area, loading an operation rule expression corresponding to the computing node from a preset node library, the operation rule expression including a variable placeholder;

[0037] Parsing the operation rule expression through a parameterized extraction engine, identifying the data source type corresponding to the variable placeholder, and matching a specific data storage path from the data type set according to the data source type;

[0038] The variable placeholder is associated with the matched data storage path to generate a binding relationship mapping table, wherein the binding relationship mapping table records the corresponding relationship between each variable placeholder and the data storage path.

[0039] Optionally, initializing a calculation sequence according to a node with zero in-degree in the directed graph structure, and converting the operation rule expression carrying the binding relationship into an executable script through a variable binder, includes:

[0040] Scan the in-degree values ​​of all vertices in the directed graph structure, select vertices with in-degree values ​​of zero as initial calculation nodes, and perform topological sorting based on the directions of directed edges starting from the initial calculation nodes to generate a calculation sequence, wherein the calculation sequence records the execution order of the calculation nodes;

[0041] Reading the binding relationship mapping table through the variable binder, processing each computing node in turn according to the order of the computing sequence, and replacing the variable placeholders in the operation rule expression with the corresponding data storage path;

[0042] The replaced operation rule expression is compiled into a structured query script or a function call script to generate an executable script queue corresponding to the order of the calculation sequence.

[0043] In a second aspect, the present application provides a node dragging-based electricity settlement visualization configuration system, including:

[0044] A parsing module provides a set of data types and corresponding computing nodes for power settlement in a visual interface. In response to a user dragging and dropping a computing node, the module parses the calculation rule expression configured for the computing node and establishes a binding relationship between the calculation rule expression and the corresponding power transaction data.

[0045] a construction module, in response to a user dragging a connection line between computing nodes, generating a node connection line representing a computing dependency relationship, and constructing a settlement dependency topology based on the computing dependency relationship represented by the node connection line, wherein the settlement dependency topology comprises a directed graph structure with the computing nodes as vertices and the node connection lines as directed edges, mapping data reference paths between the nodes;

[0046] A conversion module initializes a calculation sequence according to the nodes with zero in-degree in the directed graph structure, and converts the operation rule expression carrying the binding relationship into an executable script through a variable binder;

[0047] The output module, based on the initialized calculation sequence, drives the distributed computing framework through the executable script to schedule computing tasks in the topological order represented by the calculation sequence, and in the process of executing the computing tasks, if the change status of the partition storage data is monitored, determines the downstream computing nodes and their associated data items affected by the change based on the settlement dependency topology, and recalculates the power settlement results in combination with the topological order of the settlement dependency topology and outputs them.

[0048] This application transforms the complex electricity settlement rule configuration process into intuitive graphical operations by providing preset data types and calculation nodes in a visual interface and responding to user drag and drop operations, significantly lowering the user threshold and avoiding manual coding errors; by dragging connecting lines, a settlement dependency topology diagram with nodes as vertices and connecting lines as directed edges is automatically constructed, clearly visualizing the data flow and calculation dependency relationship between rules, ensuring logical traceability and laying a structured foundation for subsequent calculations; based on this topology diagram, the calculation sequence is automatically initialized, and the rule expression is converted into an executable script through a variable binder, eliminating the risk of circular dependencies and efficiently connecting user configuration and machine execution; finally, the distributed computing framework is driven to schedule tasks based on this topological sequence, and the data change status is intelligently monitored, and only the affected minimum downstream nodes and data are incrementally recalculated along the topological path, thereby utilizing the distributed architecture to efficiently process massive electricity trading data, and quickly respond to data changes and accurately locate the recalculation range, greatly improving settlement calculation efficiency and resource utilization. While ensuring the accuracy and reliability of the results, the flexibility, maintainability and overall performance of the system are significantly enhanced.

[0049] Furthermore, by uniformly storing the function configurations of computing nodes, inter-node connections, and intermediate calculation results in the Hive data warehouse, the entire computing process is traceable and configuration reuse is achieved. When defining tool functions, the system automatically identifies table headers and column data types based on user-imported CSV simulation data to generate pre-verification data structures, significantly reducing the complexity of manual configuration and avoiding the risk of data type mismatches. When performing power settlement recalculations, the system extracts Hive historical archived data to compare changes, accurately locates affected data items based on the settlement dependency topology, and triggers a pre-verification mechanism, efficiently identifying the scope of data changes and ensuring input consistency. Finally, based on the verification results, a versioned reversal settlement result is generated. Through result versioning, errors can be quickly traced and corrected, improving the system's fault tolerance and auditability. The above process forms a closed-loop management system of "storage-verification-recalculation-correction," achieving a trinity of configuration reliability, verification automation, and result auditability in power settlement scenarios, thereby enhancing system robustness and business continuity.

[0050] These and other aspects of the present application will become more readily apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0052] Figure 1 A flowchart of a node dragging-based power settlement visualization configuration method provided by the present application is shown;

[0053] Figure 2 A scene diagram showing a node dragging-based power settlement visualization configuration method provided by the present application is shown;

[0054] Figure 3 A schematic diagram of the structure of a node dragging-based electricity settlement visualization configuration system provided by the present application is shown. DETAILED DESCRIPTION

[0055] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0056] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to being different types.

[0057] Researchers have found that there are significant flaws in the current electricity settlement system. Dependencies are limited to a single settlement unit, and cross-unit data reference chain mapping cannot be achieved. This makes the global computing topology invisible and difficult to intuitively monitor and debug the overall process. At the same time, when the generator set or transaction data changes (such as power updates), the system cannot efficiently locate the affected downstream settlement units, and manual traversal of dependencies is required, which is inefficient. In addition, the execution process relies on a single-threaded script engine and cannot utilize distributed computing resources. When faced with massive amounts of electricity transaction data, settlement tasks are delayed by up to several hours, seriously affecting performance and business responsiveness. Therefore, there is an urgent need for an electricity settlement configuration method based on visualization and distributed collaboration.

[0058] In response to the above problems, the present invention proposes a method for visual configuration of electricity settlement based on node dragging. The core of the method is to construct a settlement dependency topology that can map a global reference chain through interactive dragging operations by users, and seamlessly integrate a distributed computing framework to dynamically optimize task execution. Specifically, a preset set of data types and corresponding computing nodes are provided in the visual interface. Users drag nodes to bind operation rules and electricity trading data; drag connecting lines to generate dependencies between nodes to form a settlement dependency topology with a directed graph structure; initialize the calculation sequence based on the node with zero in-degree, and use a variable binder to convert the rules into executable scripts; finally, drive the distributed framework to schedule tasks in topological order, monitor data changes, and automatically trigger the recalculation of affected nodes based on the topology to output settlement results. This method realizes the visual mapping of global dependencies across units, ensuring that downstream nodes can be accurately located and recalculated when data changes; at the same time, through distributed parallel processing, the latency of large-scale settlement tasks is reduced from several hours to seconds, solving the problems of opaque dependency chains and low resource utilization in the background technology.

[0059] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0060] Figure 1 A flowchart of a method for visually configuring power settlement based on node dragging is provided for an embodiment of the present application, such as Figure 1 As shown, the method includes:

[0061] 101. Provide a data type set and corresponding computing nodes for power settlement in a visual interface. In response to a user dragging and dropping a computing node, parse the operation rule expression configured for the computing node and establish a binding relationship between the operation rule expression and the corresponding power transaction data.

[0062] Optionally, step 101 may specifically include the following steps:

[0063] 1011. Presetting a data type set in the visualization interface, the data type set including contracted electricity quantity, transaction electricity price, and settlement period identifier;

[0064] 1012. In response to a user dragging a computing node to a canvas area, loading an operation rule expression corresponding to the computing node from a preset node library, the operation rule expression including a variable placeholder;

[0065] 1013. Parse the operation rule expression through a parameterized extraction engine, identify the data source type corresponding to the variable placeholder, and match a specific data storage path from the data type set according to the data source type;

[0066] 1014. Associating the variable placeholder with the matched data storage path to generate a binding relationship mapping table, wherein the binding relationship mapping table records the corresponding relationship between each variable placeholder and the data storage path;

[0067] 1015. Extract the corresponding power transaction data from the distributed storage device and establish a binding relationship between the power transaction data and the operation rule expression, wherein the distributed storage device adopts a horizontal sharding strategy based on the transaction subject identifier and a vertical partitioning strategy based on the settlement cycle identifier to achieve isolated storage and parallel reading and writing of daily settlement statements and monthly settlement statements.

[0068] In the above steps, the data type set refers to the data type set pre-set in the visualization interface, including the contracted electricity quantity, transaction price, and settlement period identifier. Contracted electricity quantity refers to the quantity of electricity agreed upon in the electricity trading contract. Transaction price refers to the price agreed upon in the electricity trading transaction. Settlement period identifier refers to a unique ID used to identify the settlement period. Compute node refers to a visual element representing computational logic that users can drag and drop into the canvas area. The canvas area refers to the area within the visualization interface where users can drag and drop compute nodes for configuration. The node library refers to a library that stores pre-defined compute nodes. Operation rule expressions refer to expressions containing computational logic, typically including variable placeholders. Variable placeholders refer to the placeholders used to represent variables in operation rule expressions. The parameterized extraction engine refers to the engine used to parse expressions and identify variables. The data source type refers to the data type of the variable source. The data storage path refers to the specific path of data in the storage system. The binding relationship mapping table refers to a table that records the correspondence between variable placeholders and data storage paths. The distributed storage device refers to a distributed storage system used to store electricity trading data. The transaction entity identifier refers to a unique ID that identifies the transaction entity. A horizontal sharding strategy is one that shards data horizontally based on transaction entity identifiers. A vertical sharding strategy is one that partitions data vertically based on settlement cycle identifiers. Daily settlement statements refer to settlement data generated daily. Monthly settlement statements refer to settlement data generated monthly.

[0069] In an embodiment of the present application, first, a data type set is preset in the visual interface through step 1011, and the front-end framework initialization technology is used for implementation. Specifically, the component lifecycle hook function is used to load the predefined configuration data. The processing process includes parsing the pre-configuration information to generate a structured collection object containing the contract electricity volume, transaction electricity price and settlement period identifier. This object is output to the subsequent sub-steps as the basic data source to provide a type definition basis for data matching.

[0070] Secondly, in response to the user dragging the calculation node to the canvas area through step 1012, the browser event-driven technology is combined with the drag operation interface to implement the process, and the processing process includes monitoring the drag event to trigger the node library query logic, loading the operation rule expression corresponding to the calculation node, and extracting the expression content containing the variable placeholder. The expression is passed to the next sub-step as the parsing input.

[0071] Next, step 1013 uses a parameterized extraction engine to parse the operation rule expression, which is implemented using regular expression matching technology. The processing process includes scanning the expression string to identify all variable placeholder names, and then matching the data source type from the preset data type set output in step 1011. The dictionary query algorithm is applied to generate a specific data storage path, which is output as a logical mapping result to the subsequent sub-steps.

[0072] Then, step 1014 is used to associate the variable placeholder with the matching data storage path, and key-value pair storage technology is used for implementation. The processing process includes the engine creating a memory mapping table to store the mapping relationship between each placeholder and the corresponding path, and generating a binding relationship mapping table as a data extraction index output to the next sub-step.

[0073] Finally, step 1015 extracts power transaction data from the distributed storage device based on the binding relationship mapping table, and implements it using distributed data storage and parallel computing technology. The processing process includes the device using a hash sharding algorithm based on the transaction subject identifier to perform horizontal sharding storage, and a time partitioning algorithm based on the settlement period identifier to implement vertical partitioning storage to isolate daily settlement statements and monthly settlement statements. The data is then read through the parallel query interface. After the extraction is completed, the engine dynamically injects the power transaction data into the operation rule expression to establish a complete binding relationship.

[0074] In practical applications, in the development of a power trading and settlement system, a data type library is first built into the visual interface. This library contains three core data elements: contract quantity, transaction price, and settlement period identifier. When a user drags a compute node labeled "Monthly Electricity Bill Generation" onto the configuration canvas, the system automatically activates pre-configured logic: it loads the corresponding operation rule expression "Sum(@Contract Data * @Price Parameter)" from the node knowledge base, where the placeholder prefixed with "@" indicates the variable to be bound. The system's intelligent parsing engine automatically identifies the semantic characteristics of these placeholders, such as "@Contract Data" associated with the contract quantity type and "@Price Parameter" associated with the transaction price type, and dynamically maps them to the logical storage units defined in the data center abstraction layer. A structured variable binding mapping table is then generated to record the correspondence between placeholders and logical storage units. During the data extraction phase, based on a distributed storage architecture, a hybrid strategy of horizontal sharding of the transaction entity dimension and vertical partitioning of the settlement period is adopted. This ensures that settlement data for different periods is physically isolated but can be accessed in parallel, ultimately enabling automated binding of operation rules to dynamic data. This configuration approach significantly improves the flexibility of settlement model construction and system maintainability.

[0075] In the overall solution of step 101 above, complex settlement rule configurations are transformed into intuitive drag-and-drop operations through an intuitive graphical interface and pre-set computing nodes, significantly improving the configuration efficiency and accuracy of settlement rules and effectively reducing human operational errors. Relying on the horizontal sharding and vertical partitioning strategies of the distributed storage architecture, the system achieves efficient management and parallel reading and writing of massive power trading data, ensuring that the processing of daily and monthly settlement statements is isolated and efficient. The core parameterized extraction engine automatically identifies variable types and dynamically binds to data sources, eliminating the need for handwritten code or complex configurations. This not only greatly improves the processing power and reliability of the system, supports the settlement processing of massive data, but also completely simplifies the user operation process through a "no code, drag and drop" interactive method, and ultimately comprehensively optimizes the visualization and automation level of the power settlement process.

[0076] 102. In response to a user dragging a connection line between computing nodes, generating a node connection line representing a computing dependency relationship, and constructing a settlement dependency topology based on the computing dependency relationship represented by the node connection line, wherein the settlement dependency topology comprises a directed graph structure with the computing nodes as vertices and the node connection lines as directed edges, mapping data reference paths between nodes;

[0077] Optionally, step 102 may specifically include the following steps:

[0078] 1021. In response to a user dragging operation from an output port of a first computing node to an input port of a second computing node, generating a unidirectional node connection line representing a computing dependency relationship, wherein the unidirectional node connection line is used to mark a data flow direction;

[0079] 1022. Extract the connection status of the input port and output port of each computing node based on all the generated unidirectional node connection lines, and determine the dependency direction between the computing nodes based on the connection status of the input port and output port;

[0080] 1023. Construct a directed graph structure forming a settlement dependency topology with the computing nodes as vertices and the unidirectional node connection lines as directed edges. Each directed edge of the settlement dependency topology starts at a data output node and ends at a data input node. The direction of the directed edge is consistent with the dependency direction.

[0081] Among them, step 1023 may specifically include the following process: traversing all the one-way node connection lines generated by the user, and directly generating a corresponding directed edge for each one-way node connection line, the starting point of the directed edge is fixed to the starting point computing node associated with the one-way node connection line, and the end point is fixed to the end point computing node associated with the one-way node connection line, and the direction of the directed edge is forcibly aligned with the user-defined data flow direction; at the same time, all the computing nodes are integrated into a vertex set, and all directed edges generated according to this rule are integrated into a directed edge set, and according to the vertex set and the directed edge set, a directed graph structure of the settlement dependent topology is constructed, wherein each directed edge is bound to the output end identifier of the starting point computing node and the input end identifier of the end point computing node.

[0082] 1024. Traverse the settlement dependency topology and map a data reference path between nodes for each directed edge. The data reference path label records the transfer path from the output data of the starting node to the input data of the ending node.

[0083] In the above steps, computational dependencies refer to the logical dependencies between compute nodes for data input and output. Settlement dependency topology refers to a directed graph structure with compute nodes as vertices and node connections as directed edges, used to map inter-node dependencies. A directed graph structure is a graph data structure consisting of a set of vertices and a set of directed edges. A data reference path is the label for the logical path along which data is transferred from an output node to an input node. The first compute node is the starting node for a user-dragged connection. The output port is the interface on a compute node for outputting data. The second compute node is the ending node for a user-dragged connection. The input port is the interface on a compute node for inputting data. Dependency direction refers to the flow of data dependencies between nodes, determined by the connection status. A directed edge is an element in a directed graph that represents a node connection. A data output node is a compute node that serves as a data source. A data input node is a compute node that serves as a data receiver. The directed graph structure of the settlement dependency topology refers to the final constructed directed graph object. Traversal refers to the process by which the system iterates through the data structure.

[0084] In an embodiment of the present application, first, step 1021 is implemented in response to the user's operation of dragging from the output port of the first computing node to the input port of the second computing node, using user interface event processing technology. The processing process includes listening to the mouse drag and release event, and automatically drawing a one-way node connection line on the visual canvas. The connection line marks the direction of data flow as from the first computing node to the second computing node. Specifically, the SVG or Canvas drawing engine is used to render the line and bind the direction arrow identifier. The one-way node connection line is passed as output to the next sub-step for defining the dependency basis.

[0085] Secondly, step 1022 is implemented based on all the generated unidirectional node connection lines using a port status analysis algorithm. The processing process includes parsing the output port and input port connection status of each unidirectional node connection line, applying port scanning logic to traverse the ports of each computing node, collecting the number of connections and direction information of the ports, and then determining the dependency direction between the computing nodes based on the input port and output port connection status. For example, the master-slave dependency relationship is judged based on the connection density of the port. The dependency direction is passed as output to the next sub-step to provide a direction basis for the construction of the directed graph structure.

[0086] Then, through step 1023, a directed graph structure of a settlement dependency topology is constructed with the computing nodes as vertices and the unidirectional node connection lines as directed edges. This is implemented using graph theory modeling technology. The processing process includes traversing all user-generated unidirectional node connection lines, applying a directed edge generation algorithm to each unidirectional node connection line, fixing the starting point to the associated starting computing node, and fixing the end point to the associated end point computing node, forcing the directed edge direction to align with the user-defined data flow direction, then integrating all computing nodes into a vertex set, integrating all generated directed edges into a directed edge set, and using a graph database or memory graph object to construct a directed graph structure. Each directed edge is bound to the output terminal identifier of the starting computing node and the input terminal identifier of the end computing node. The settlement dependency topology is passed to the next sub-step as output to provide a basic framework for path mapping.

[0087] Finally, step 1024 is used to traverse the settlement dependency topology, which is implemented using a path mapping algorithm. The processing process includes looping through each directed edge of the directed graph, applying path generation logic to extract the output data of the starting node and the input data of the end node, creating a data reference path label to record the transmission path, and the path label is stored in a key-value pair format and associated with the edge identifier. The data reference path is used as output to end the topology construction process.

[0088] In a practical application, within a power grid settlement visualization configuration system, when a user drags the output port of the "Electricity Verification" node to the input port of the "Electricity Fee Calculation" node, the system automatically generates a unidirectional connection line representing the data flow. By monitoring the status of all connections on the canvas, the system analyzes the dependency logic between nodes. For example, if a user creates three connection lines, forming dependency chains from A to B, B to C, and A to C, the system dynamically constructs a settlement dependency topology with the compute nodes (A, B, and C) as vertices and the connection lines as directed edges. Each directed edge is forcibly bound to the output identifier of the starting node (for example, the "Approved Energy Value" output field of node A) and the input identifier of the ending node (for example, the "Baseline Energy" input slot of node C). When the topology is constructed, the system automatically generates a data reference path label for the A-C connection line. This label essentially records the data transmission path from memory address 0x7ff3a on node A to memory address 0x8dcb1 on node C, enabling transparent mapping of data references between nodes. This topology construction mechanism effectively supports the complex settlement logic chaining of hundreds of nodes.

[0089] In the overall solution of step 102 above, when the user drags the connection line to define the dependency relationship between the computing nodes, a unidirectional node connection line representing the data flow direction is automatically generated, and the settlement dependency topology structure is accurately constructed. The system uses the computing nodes as vertices and the connection lines as directed edges to dynamically generate a directed graph structure, forcing the direction of the directed edges to align with the user-defined data flow direction. Each directed edge is bound to the output identifier of the starting node and the input identifier of the end node, realizing the automatic mapping of the data reference path between nodes. This topological model fully records the transmission link from the output data of the starting node to the input data of the end node, significantly improving the transparency and maintainability of the settlement logic, while eliminating the risk of human error in manually maintaining dependencies. This visual dependency management mechanism effectively supports the assembly construction of complex settlement rules, provides a structured foundation for the subsequent topological traversal and data traceability of the settlement engine, and ultimately greatly enhances the reliability of the settlement system and the efficiency of fault point tracing, further optimizing the automation processing capabilities of the entire power settlement process.

[0090] 103. Initializing a calculation sequence according to the node with zero in-degree in the directed graph structure, and converting the operation rule expression carrying the binding relationship into an executable script through a variable binder;

[0091] Optionally, step 103 may specifically include the following:

[0092] 1031. Scan the in-degree values ​​of all vertices in the directed graph structure, select vertices with an in-degree value of zero as initial computation nodes, and perform topological sorting based on the directions of directed edges starting from the initial computation nodes to generate a computation sequence. The computation sequence records the execution order of the computation nodes.

[0093] 1032. Read the binding relationship mapping table through the variable binder, process each computing node in sequence according to the order of the computing sequence, and replace the variable placeholders in the computing rule expression with corresponding data storage paths;

[0094] 1033. Compile the replaced operation rule expression into a structured query script or a function call script, and generate an executable script queue corresponding to the order of the calculation sequence.

[0095] In the above steps, the directed graph structure refers to a directed graph data structure that determines the topology of the dependency. A node with zero in-degree refers to a vertex in a directed graph with zero in-edges. A computation sequence refers to a record of the computation node execution order generated based on topological sorting. A variable binder refers to a component that reads the binding relationship mapping table and processes variable replacement. A binding relationship mapping table refers to a table that records the correspondence between variable placeholders and data storage paths. An operation rule expression refers to a computation rule definition containing variable placeholders. A variable placeholder represents the position of a variable in an expression. A data storage path refers to the specific location path of data in the storage system. A structured query script refers to a query script that is compiled similar to SQL. A function call script refers to code that is compiled into a function call format. An executable script queue refers to a collection of executable scripts arranged in computation sequence order. An initial computation node refers to a vertex with zero in-degree and no dependencies. A topological sort refers to an algorithm that determines the execution order of nodes based on the direction of directed edges.

[0096] In the embodiment of the present application, first, step 1031 is used to scan and settle the in-degree values ​​of all vertices in the dependency topology directed graph structure. Among them, the in-degree value Refers to the vertex The number of incoming edges, vertices Represents a computational node in the graph structure. Use the in-degree calculation function of the graph theory algorithm to traverse the vertex set. ,in, Represents the set of all vertices in the graph. Apply the linear screening algorithm to filter out the in-degree values ​​that meet The vertices of the initial computing node set ,in Represents the set of starting nodes after screening. Apply Kahn topological sorting algorithm: Initialize an empty queue ,in, Represents a temporary storage queue for node sorting. Execute the enqueue operation When the queue meets When the loop is executed: take out the first node of the team join sequence ,in, Indicates the vertex currently being processed, Represents the final generated topology sequence. Remove All outgoing edges and associated vertices The in-degree value of If the update satisfies Then execute the queue operation Finally, a loop-free computation sequence is generated , if the sequence length Not equal to the total number of vertices A circular dependency is detected.

[0097] Secondly, in step 1032, the binding relationship mapping table is read through the variable binder, wherein the binding relationship mapping table is defined as a key-value pair mapping relationship. ,in, Indicates the variable name, Indicates the corresponding data storage path. The operation rule expression for each computing node Perform parsing, where Represents the original operation rule string: recognize all forms Variable placeholders, forming a placeholder set phi, where phi Indicates the set of recognized placeholders. According to the mapping relationship Query the path of each placeholder , generating a new expression text to ,in, Indicates that the variable placeholder is replaced with the expression after the path. The escape function is applied to the path containing special characters to ensure the grammatical integrity. For example, the path slash is automatically escaped to , verify the logical correctness of expressions through AST parser, such as verifying mathematical formulas The construct validity of Indicates the target value to be calculated. represents the sum operation, Indicates the number of items, Indicates the Quality data fields, Indicates the speed data field.

[0098] Finally, step 1033 is used to perform the compilation conversion: for the data query class expression , build an abstract syntax tree and inject type checking functions ,in, Indicates the path data field, Indicates the data type defined in the binding relationship mapping table and generates a structured query script. For calculating logical expressions such as physical formulas ,in, Indicates the energy value calculation target, Indicates the quality data field, Represents the speed of light constant and reconstructs the syntax tree into a function call chain. After compilation, the sequence Store in FIFO queue sequentially Trigger execution to ensure that script , execution order Dependency constraints.

[0099] In practical applications, within a power settlement automation platform, the system first scans the directed graph structure of the settlement dependency topology and precisely locates vertices with zero in-degree as initial computation nodes, such as independent data source access nodes. A topological sorting algorithm is then used to generate a computation sequence, for example, a strictly ordered queue from node A to node B to node C. The variable binder then processes each node according to this sequence: it reads a pre-established binding relationship mapping table and automatically replaces the variable placeholder @ContractData in the operation rule expression "Sum(@ContractData)" with the corresponding logical storage unit identifier. After semantic parsing, the system dynamically compiles the expression into an executable script, for example, converting the rule for node A into an SQL query and the rule for node B into a Python function call. This ultimately generates an executable script queue that strictly matches the computation sequence, ensuring that the script for node C is triggered only after the preceding nodes have completed execution. This mechanism significantly improves the flexibility and maintainability of the settlement engine by decoupling rule configuration from execution logic.

[0100] In the overall solution of step 103 above, the variable binder automatically reads the preset binding relationship mapping table and intelligently replaces the variable placeholders in the operation rule expression with the actual data storage path, achieving seamless integration between the calculation logic and the underlying data. Ultimately, the system automatically compiles and generates a structured executable script queue that supports batch processing and pipeline execution, completely avoiding the complexity and error rate of manual coding. At the same time, it significantly improves the parallel processing capabilities of computing tasks by dynamically arranging dependencies. This not only ensures the efficient and error-free execution of complex settlement rules, but also provides the system with a flexible and scalable script scheduling framework, comprehensively enhancing the automation accuracy and scalability of the power settlement process.

[0101] 104. Based on the initialized calculation sequence, the executable script is used to drive the distributed computing framework to schedule computing tasks in the topological order represented by the calculation sequence, and in the process of executing the computing tasks, the change status of the partitioned storage data is monitored, and the downstream computing nodes and their associated data items affected by the change are determined based on the settlement dependency topology, and the power settlement results are recalculated and output in combination with the topological order of the settlement dependency topology.

[0102] Optionally, step 104 may specifically include the following steps:

[0103] 1041. Distribute the executable script to a task queue of a distributed computing framework according to the order of the computing sequence, schedule computing tasks for execution according to the order of the task queue, and access a corresponding data storage path to obtain data when each computing task is executed;

[0104] 1042. During the execution of the computing task, the data change status of the partition storage area is monitored by the incremental data capturer, and when a data change is detected, the location identifier of the changed data item is extracted;

[0105] 1043. Trigger the lineage relationship tracer to locate the downstream computing nodes affected by the change and their associated data items with the location identifiers based on the directed graph structure of the settlement dependency topology.

[0106] 1044. According to the topological order of the calculation sequence, the executable scripts corresponding to the affected downstream computing nodes are rescheduled to perform the calculation tasks, and the recalculated power settlement results are output to the result storage area. The power settlement results are classified according to the settlement period identifier to generate a daily settlement statement or a monthly settlement statement.

[0107] In the above steps, the initialized computation sequence refers to the sequence containing the node execution order generated by topological sorting. An executable script refers to a structured query script or function call script. A distributed computing framework refers to an engine that supports parallel task execution, such as Spark or Flink. A computation sequence refers to an array or list that records the execution order of compute nodes. Scheduling computation tasks refers to the process of deploying tasks corresponding to compute nodes to the computing framework for execution. Partitioned storage data refers to electricity trading data stored in a distributed system using sharding and partitioning strategies. Change status refers to a flag indicating whether data has been added, deleted, or modified. A settlement dependency topology refers to a directed graph structure with compute nodes as vertices and directed edges connecting them. A downstream compute node refers to a data receiving node affected by a change in the settlement dependency topology. A data item refers to a specific data element, such as the contracted electricity value. Recalculating electricity settlement results refers to recalculating the settlement result based on the changed data. Output refers to the process of storing the completed computation results in a specified location. A task queue refers to a sequentially arranged set of tasks in a distributed computing framework. A partitioned storage area refers to a data block divided within a distributed storage device, such as an HBase column family partition. A location identifier is a unique identifier for a changed data item, such as a primary key hash value. A lineage tracer is a tracking component that traces data dependencies based on a graph structure. Downstream computing nodes and their associated data items refer to affected nodes and their corresponding data paths. A location identifier is an identifier for a data item, such as an ID combination. Topological order refers to the execution order consistent with the computation sequence. Executable scripts executing computation tasks refer to the process of running compiled scripts to process data. The recalculated electricity settlement result refers to the updated settlement output, such as the new contract value. The result storage area refers to the storage partition used to store the final output, such as an HDFS directory.

[0108] In the embodiment of the present application, first, in step 1041, the topological order of the calculation sequence is calculated. Distribute the executable script to the task queue of the distributed computing framework, where Represents an ordered sequence of nodes. The task dispatcher parses the sequence to generate a task order list, according to Submit the script to the Spark or Flink framework in the order of the nodes in the task scheduler. The task scheduler executes the task in sequence according to the queue priority. The priority value Proportional to the sequence index. During execution, the storage system is accessed through a pre-bound data storage path, such as the HDFS path / data / transaction. Power transaction data is read using a parallel I / O interface based on a data partition identifier, such as the partition key date=20230101.

[0109] Then, in step 1042, data changes are monitored during execution: a CDC listener is deployed to scan the storage system's binlog, such as the HBase write log. When data addition, deletion, or modification is detected in a specific partition, such as the path / data / transaction / partition=202301, the primary key combination of the change record is extracted. The primary key combination is defined as Subject ID, Period ID The entity ID identifies the business account, and the period ID marks the settlement period. This key value is used for downstream lineage tracing.

[0110] Then, trigger the blood relationship traceability through step 1043: change the primary key Load the settlement dependency directed graph for the starting point. Execute the breadth-first search algorithm, the BFS algorithm starts from the starting point Recursive expansion. Traverse all associated edges according to the data reference path label, which is defined as Bound to directed edges , identifies data dependencies. Recursively down to the final set of dependent nodes Indicates the set of affected nodes. Generate a mapping table synchronously Record the relationship between data changes and nodes.

[0111] Finally, the affected tasks are rescheduled in step 1044: according to the topological sequence right Reordering must satisfy any node In sequence The order in the script remains unchanged. The compiled script is extracted from the script queue and re-executed through the distributed computing module. The data filtering mechanism is used to automatically skip the unchanged partitions. The unchanged partitions meet the condition function IsChanged. After the settlement results are generated, they are partitioned and stored by period identifier. The period identifier is defined as periodID. For example, monthly settlement results are stored in the path / result / monthly, and daily settlement results are stored in the path / result / daily.

[0112] In practical applications, within the implementation of a settlement system for a provincial power trading platform, the system first generates a computational sequence based on the settlement dependency topology, such as an ordered queue for data collection, energy calibration, electricity bill calculation, and result verification. The distributed computing framework then schedules the corresponding executable scripts for execution. When the system reaches the energy calibration node, it accesses distributed storage to retrieve the raw energy data. Simultaneously, the incremental data capturer detects a change in the contracted energy volume of a power generation group within the storage area, involving a 500-megawatt-hour data correction on May 10, 2024. It immediately extracts the unique partition identifier corresponding to this changed data item, such as entity ID#PJ033 + date partition 20240510. The lineage tracer is then activated, traversing the directed graph structure of the settlement dependency topology to locate the downstream nodes directly affected by the data change: the associated energy input item in the electricity bill calculation node; and the benchmark reference item in the result verification node. The system then reschedules the computational tasks of these two affected nodes according to the topological order, first triggering the electricity bill calculation node to recalculate the electricity bill using the corrected energy volume, and then driving the result verification node to execute the verification logic. Finally, the updated monthly settlement statement is written to the result storage area. The statement is automatically archived to the "202405" monthly storage partition according to the settlement cycle identifier. At the same time, the daily correction results are synchronously generated into the 20240510 daily settlement statement. The entire process does not require restarting the full process calculation.

[0113] In the overall solution for step 104, a dynamic response mechanism ensures efficient and reliable operation of the settlement system. The distributed computing framework strictly follows the topologically structured computational sequence to schedule tasks, ensuring that all compute nodes execute precisely in the order of dependencies, mitigating the risk of mis-execution. During execution, the incremental data capturer monitors data changes in partitioned storage and triggers an automatic response the moment a data change occurs. Based on the settlement dependency topology, the system activates the lineage traceability engine, locating the affected downstream compute nodes and associated data items within milliseconds. It intelligently selects the recalculation scope, completely avoiding the resource waste of full computations. The system then automatically schedules the executable scripts for the affected nodes to perform the recalculation task according to the original topological order, and outputs the latest settlement results to the result storage area, categorized by settlement cycle identifier. The generation processes of daily and monthly settlement statements are completely isolated. This mechanism significantly improves change response speed and resource utilization while ensuring data consistency. It also supports the precise processing of trillions of data points in settlement scenarios, significantly enhancing the system's ability to cope with business fluctuations, ultimately achieving the goal of unmanned, automated operation throughout the entire lifecycle of electricity settlement.

[0114] The following is a complete embodiment of steps 101 to 104:

[0115] like Figure 2As shown in the figure, in a daily settlement scenario at a provincial power trading center, when the distributed computing framework initiates a settlement-dependent topology consisting of 37 compute nodes, the system first locates three zero-indegree source nodes, collects electricity, synchronizes the contract database, and stores the electricity price fluctuation factor database. The engine strictly follows the topological order to drive the execution queue: at 08:00, the electricity collection node is started, extracting 12,500 daily meter point raw data from distributed storage; at 08:03, the electricity cost calculation node is triggered to invoke a precompiled script to calculate the time-of-use electricity price for 870 million kWh of traded electricity. Peak memory consumption on a single node reaches 142GB.

[0116] At 11:15, the incremental monitoring module detected a change in the storage area: the contracted electricity capacity of a wind farm entity was revised from 1,250 MWh to 1,310 MWh. The system completed the change impact analysis within 300 milliseconds: locating the S3_DATA_PORT input interface of the electricity bill calculation node, a third-level downstream node, along the settlement dependency topology. This interface included the entity's daily electricity capacity for 96 time periods, the six billing rules associated with the fee item matcher in the settlement form generation node, and the impact of the deviation threshold detector on three verification parameters at the audit node.

[0117] The system immediately triggered a recalculation at various levels: At 11:16, the electricity bill calculation node rebuilt its calculation model, recalculating the entity's electricity bill of 1.28 million yuan using the corrected electricity consumption. At 11:18, the settlement document generation node updated 23 associated settlement documents, synchronizing the new electricity bill value for the master settlement document number SETTLE-20240815-09 to 1.28 million yuan. At 11:21, the audit node performed deviation detection, correcting the original 7.2% volatility to a compliant 4.8%. The final correction results were written to the storage architecture at 11:25: Five data files were updated in the daily partition / settle / 20240815, and two transaction logs were appended to the monthly partition / settle / 202408. The entire process recalculated only three key nodes out of 37, precisely locking the data backtracking range within the three-level dependency path, saving computing resources compared to a traditional full recalculation.

[0118] Optionally, the method further includes: storing the function configuration information, the connection relationship between nodes and the intermediate calculation results corresponding to the computing node in the Hive data warehouse; in the function definition process, based on the function configuration information stored in the Hive data warehouse, in response to the user's parameter configuration operation on the tool function node, generating a pre-verification data structure for the function parameter whose data type is a data set, the pre-verification data structure is obtained by automatically identifying the header and column data type by parsing the CSV format simulation data file imported by the user; when performing the recalculation of the power settlement result, extracting historical archived data from the Hive data warehouse, comparing the changed data with the historical archived data, and locating the affected data items according to the settlement dependency topology, and performing data verification in combination with the pre-verification data structure, and generating a reversal settlement result with a version mark based on the verified data.

[0119] In the above steps, function configuration information refers to the operation rule definition and parameter setting metadata contained in the computing node; the connection relationship between nodes refers to the data dependency flow mapped by the directed graph structure with computing nodes as vertices and node connection lines as directed edges established based on the settlement dependency topology; the intermediate calculation results refer to the non-final electricity settlement data generated in the process of executing the calculation task; the Hive data warehouse refers to a structured data management system that uses a distributed architecture to support partitioned storage; the tool function node refers to a configurable node that provides general computing functions such as aggregation or conversion; the pre-verification data structure refers to the field type definition and constraint rule structure generated by automatically identifying the CSV file header and the first row of data; the historical archive data refers to the past electricity settlement result set stored in Hive by version; the reversal settlement result refers to the revised settlement output data with a unique version identifier.

[0120] In an embodiment of the present application, first, the function configuration information corresponding to the computing node, such as the operation expression string, the metadata of the connection relationship between the nodes including the vertex ID and the directed edge set, and the intermediate calculation result data such as the local calculation value, are written to the specified partition table of the Hive data warehouse through the batch JDBC interface. The partition strategy is divided into physical blocks based on the settlement period identifier, such as creating partitions by monthly ID; in the function definition process, when the user performs parameter configuration operations on the tool function node, if the parameter type is marked as a data set, the system responds and triggers the pre-verification process: calling a CSV parsing library such as Open CSV to load the simulation data file uploaded by the user to automatically scan the header row to extract the field name, and based on the first row of data, use regular expression matching such as numerical feature detection rules to infer the column data type such as DECIMAL or STRING, and generate a pre-verification data structure including the field name, data type constraint and non-empty identifier stored in the memory cache; when performing the recalculation of the power settlement result, extract historical archive data such as the complete data set of the previous settlement period from the history data partition table of Hive, and use a difference comparison algorithm such as Spark The SQL ANTIJOIN operator compares the changed data with the historical data at the field level, row by row, to identify the locations of the difference records. Then, based on the directed graph of the settlement dependency topology, a BFS breadth-first search is applied to backtrack from the difference point to locate the affected downstream nodes and their associated data items. Combined with the cached pre-verification data structure, forced type conversions such as string to decimal and null value checks such as checking non-null constraints are performed on the changed data. The data that passes the verification is driven to generate a reversal settlement result with a version mark, such as the version mark using the settlement cycle ID plus timestamp format 20230801120000correctionV1. Finally, the reversal result increment is synchronized to the Hive correction result partition table and the metadata version is updated.

[0121] In actual applications, within the production environment of a regional settlement center for a power grid, the system stores the function configuration parameters and inter-node connections for 152 computing nodes in Hive's node_config_v2 table, generating an average of 1.52 billion intermediate calculation results daily and persisting them to partitioned tables. When configuring a tool-type function node, the system automatically processes the dataset type parameter: the user uploads a simulated CSV file containing a list of electricity sales companies. The system parses the first row and infers the field types (STRING(20), DATE, DECIMAL(16,2)) based on 1,000,000 rows of sampled data, generating a pre-verification structure with length and precision constraints. When cross-provincial transaction data changes, the system executes the following process: extracting the original settlement value of transaction subject GD_PJ088 (123,000,000 yuan) from Hive's hist_settle_202408 partition, comparing it to the newly written revised value of 128,500,000 yuan, and identifying a difference of 5,500,000 yuan. Based on the settlement dependency topology, the third-level downstream nodes are located: the electricity bill accounting node involves five data ports, and the inter-provincial settlement order node is associated with 12 expense items. The pre-verification structure is called to verify the data: the buyer code length is checked to be ≤ 20 characters, the amount value is verified to conform to the DECIMAL(16,2) precision, and the reversal result with the version tag SETTLEVER20240901REV03 is generated and written to the amend result table. The entire process takes only 1 / 5 of the time of the traditional mode, which is faster than the initial version.

[0122] By automatically identifying table headers and column data types based on simulated data files in CSV format, a pre-verified data structure is generated, providing pre-placed data format protection for data set type parameters, significantly reducing the data structure error rate during the configuration period. In the recalculation scenario, the system intelligently compares the changed data and historical archived data in the Hive data warehouse, accurately locates the range of affected data items based on the settlement dependency topology, and automatically performs outlier cleaning and format repair through the pre-verified data structure. Finally, the reversal settlement results with version marks are generated and output to the classified storage area, realizing error tracking and version backtracking capabilities for daily and monthly settlement statements. This mechanism advances data consistency verification to the configuration stage, simultaneously enhancing the reliability of incremental recalculation. While ensuring the accurate traceability of trillion-level electricity settlement data, it builds an integrity closed loop from parameter configuration to result audit, comprehensively improving the settlement system's anti-disturbance capabilities and compliance audit efficiency.

[0123] Optionally, the method also includes: dividing the intermediate calculation results corresponding to the computing node into edit state data and historical state data according to the data status, the edit state data is stored in a distributed memory database for online calculation result debugging of the executable script, and the historical state data is stored in a Hive data warehouse for reversal of settlement; in response to the settlement result output instruction, calling the historical state data, parsing the preset Excel-like template configuration through the web version of the settlement form template designer, generating the filling rules of the hierarchical data corresponding to the calculation sequence according to the cell orientation relationship, and driving the settlement results to dynamically generate multi-format settlement forms according to the filling rules; through the file synchronization service deployed in the external isolation area, the multi-format settlement form is transmitted to the historical state data storage node in the internal computing area, so as to realize the secure synchronization of the settlement results between the internal and external networks.

[0124] In the above steps, edited data refers to the intermediate calculation results being debugged during the electricity settlement process; historical data refers to the settlement intermediate data archived to Hive after verification; distributed memory database refers to a read-write storage system built on Redis or Ignite; the web version of the settlement form template designer refers to an online template configuration tool that supports Excel-like operations; Excel-like template configuration refers to the settlement form layout rules defined by cell row and column coordinates; hierarchical data refers to the settlement result data structure layered according to the calculation sequence; filling rules refer to the dynamic data mapping logic generated according to the template; multi-format settlement form refers to the settlement result file that can be output in PDF, HTML and CSV formats at the same time; file synchronization service refers to the SFTP / FTP file transfer agent deployed in the DMZ isolation area; the external isolation area refers to a secure network domain that is logically isolated from the enterprise intranet; the internal computing area refers to the protected network domain where the core computing services are deployed; the historical data storage node refers to the physical node where the archived results are located in the Hive data warehouse cluster.

[0125] In the embodiment of the present application, first, the intermediate calculation results are divided into editable data and historical data according to the data processing stage: the editable data is stored in a distributed memory database such as a Redis cluster, and a hash structure is used to cache the calculation results with the settlement ID_node ID as the key value, supporting the online debugging module to interactively modify the executable script parameters; the historical data is synchronized to the hispid data partition table of Hive through a daily batch job at 00:00, providing a reference data source for the reversal settlement. When the settlement result output instruction is received, the historical data in Hive is called, and the preset Excel-like template is parsed through the web version of the settlement form template designer (integrated with the Lucky sheet engine). Filling rules are automatically generated based on the cell orientation relationship, such as binding the A1 cell to the name of the electricity purchaser and binding the B3:C5 area to the electricity matrix; the engine traverses the hierarchical data according to the topological level of the calculation sequence, driving the multi-format settlement form generation module based on Apache FOP to inject data into the template according to the filling rules, and simultaneously outputs a PDF settlement form, an HTML visual report and a CSV raw data file. Finally, through the SFTP synchronization service deployed in the isolation area, the sync-server process monitors the settlement order generation directory, encrypts and compresses the data, and then transmits it through the firewall to the Hive data node in the intranet computing area. It completes secure synchronization and records audit logs in the / settlement / outbox path.

[0126] In practical applications, during the operation of a power trading platform's settlement system, the system strictly separates intermediate calculation results generated by compute nodes by state: editable data required for debugging is stored in a Redis distributed in-memory database, supporting online modification of formula parameters and preview of settlement results; historical data required for audit traceability is persistently stored in the hissettlement partition of the Hive data warehouse. When a settlement result output command is triggered, the system invokes the web-based settlement statement designer to parse a pre-configured Excel-like template configuration containing 650 structured cells. The system automatically generates hierarchical fill rules based on cell orientation, for example, binding cell B7 to the "inter-provincial transmission fee total" indicator, an output item of the transmission fee summary node in the calculation sequence. Based on the historical data stored in Hive's hist_settle_202408 partition, the system drives the settlement engine to dynamically generate settlement statements in three formats: PDF, Excel, and HTML, according to these fill rules. The PDF version fully retains the merged cell structure and calculation formula logic of the original template. The file synchronization service deployed in the DMZ then automatically initiated the transfer task, monitoring the HDFS / output style directory for new files. It then encrypted and compressed the batch of 500 settlement statements into a ZIP format, with a maximum size of 1.2GB per package. The ZIP files were then transmitted to the internal computing area via dual one-way optical gates and securely written to the year-month storage path specified in Hive's final settle partition table. This mechanism enabled the editable in-memory database to support 53 formula debugging operations during a monthly settlement, while the historical warehouse generated 84,200 structured settlement statements using 3.7TB of data. The secure transmission link completed the 50GB data synchronization task at a speed of 200 milliseconds, ensuring that core data remained within the intranet.

[0127] By intelligently dividing the intermediate results of computing nodes into editable data and historical data, the system stores editable data in a distributed in-memory database, supporting debugging of calculation results and script logic verification, significantly improving error correction efficiency during the rule configuration phase. Historical data is persistently stored in the Hive data warehouse, providing a traceable and complete historical benchmark for reversal settlements. When responding to settlement output instructions, the system calls upon historical data to drive the web-based settlement statement template designer to parse Excel-like pre-set templates. Based on cell orientation relationships, it automatically generates hierarchical data filling rules and dynamically outputs settlement statements in multiple formats, such as PDF and Excel, completely eliminating manual typesetting. Through a file synchronization service deployed in an externally isolated area, settlement statements are transmitted to the internal historical data storage node, enabling secure synchronization of settlement results between internal and external networks within a strictly isolated network environment. Digital signatures and version watermarks are automatically added during the synchronization process. This mechanism connects all aspects of debugging, auditing, and output, ensuring data security and version consistency while supporting the dynamic generation of daily and monthly settlement statements in seconds, ultimately building an intelligent, unmanned settlement output system.

[0128] Figure 3 The present invention provides a schematic diagram of a node dragging-based power settlement visualization configuration system. Figure 3 As shown, the system includes:

[0129] The parsing module 31 provides a set of data types and corresponding computing nodes for power settlement in a visual interface. In response to a user dragging and dropping a computing node, the parsing module 31 parses the calculation rule expression configured for the computing node and establishes a binding relationship between the calculation rule expression and the corresponding power transaction data.

[0130] A construction module 32 generates node connection lines representing computational dependencies in response to a user dragging a connection line between computational nodes, and constructs a settlement dependency topology based on the computational dependencies represented by the node connection lines, wherein the settlement dependency topology comprises a directed graph structure with the computational nodes as vertices and the node connection lines as directed edges, mapping data reference paths between the nodes.

[0131] The conversion module 33 initializes a calculation sequence according to the nodes with zero in-degree in the directed graph structure, and converts the operation rule expression carrying the binding relationship into an executable script through a variable binder;

[0132] The output module 34, based on the initialized calculation sequence, drives the distributed computing framework through the executable script to schedule computing tasks in the topological order represented by the calculation sequence, and in the process of executing the computing tasks, if the change status of the partition storage data is monitored, determines the downstream computing nodes and their associated data items affected by the change based on the settlement dependency topology, and recalculates the power settlement results in combination with the topological order of the settlement dependency topology and outputs them.

[0133] Figure 3 The node dragging-based power settlement visualization configuration system can be executed Figure 1 The implementation principle and technical effects of the node dragging-based power settlement visualization configuration method described in the illustrated embodiment will not be elaborated on here. The specific manner in which each module and unit performs operations in the node dragging-based power settlement visualization configuration system in the above embodiment has been described in detail in the embodiment of the method and will not be elaborated on here.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A node dragging-based power settlement visualization configuration method, characterized in that: include: A data type set and corresponding computing nodes for power settlement are provided in a visual interface. In response to a user's dragging operation on a computing node, the operation rule expression configured for the computing node is parsed, and a binding relationship between the operation rule expression and the corresponding power transaction data is established, including: Extracting corresponding power transaction data from a distributed storage device and establishing a binding relationship between the power transaction data and the operation rule expression, wherein the distributed storage device adopts a horizontal sharding strategy based on a transaction subject identifier and a vertical partitioning strategy based on a settlement period identifier; In response to a user dragging a connection line between computing nodes, a node connection line representing a computing dependency relationship is generated, and based on the computing dependency relationship represented by the node connection line, a settlement dependency topology is constructed, wherein the settlement dependency topology is a directed graph structure with the computing nodes as vertices and the node connection lines as directed edges, mapping the data reference path between the nodes, including: In response to a user dragging operation from an output port of a first computing node to an input port of a second computing node, generating a unidirectional node connection line representing a computing dependency relationship, wherein the unidirectional node connection line is used to mark a data flow direction; Extracting the connection status of the input port and the output port of each computing node based on all the generated unidirectional node connection lines, and determining the dependency direction between the computing nodes based on the connection status of the input port and the output port; A directed graph structure is constructed with the computing nodes as vertices and the unidirectional node connection lines as directed edges to form a settlement dependency topology, wherein the starting point of each directed edge of the settlement dependency topology is a data output node and the end point is a data input node, and the direction of the directed edge is consistent with the dependency direction; Traversing the settlement dependency topology, mapping a data reference path between nodes for each directed edge, wherein the data reference path label records the transmission path from the output data of the starting node to the input data of the ending node; Initializing a calculation sequence according to a node with zero in-degree in the directed graph structure, and converting the operation rule expression carrying the binding relationship into an executable script through a variable binder; Based on the initialized calculation sequence, the executable script is used to drive the distributed computing framework to schedule computing tasks in the topological order represented by the calculation sequence, and in the process of executing the computing tasks, the change status of the partitioned storage data is monitored, and the downstream computing nodes and their associated data items affected by the change are determined based on the settlement dependency topology, and the power settlement results are recalculated and output in combination with the topological order of the settlement dependency topology.

2. The method according to claim 1, characterized in that Also includes: The function configuration information, inter-node connection relationship and intermediate calculation results corresponding to the computing node are stored in the Hive data warehouse; During the function definition process, based on the function configuration information stored in the Hive data warehouse, in response to the user's parameter configuration operation on the tool function node, a pre-verification data structure is generated for the function parameter whose data type is a dataset. The pre-verification data structure is obtained by automatically identifying the table header and column data type by parsing the CSV format simulation data file imported by the user; When recalculating the electricity settlement results, historical archived data is extracted from the Hive data warehouse, the changed data is compared with the historical archived data, and the affected data items are located according to the settlement dependency topology. The data is verified in combination with the pre-verification data structure, and a reversal settlement result with a version mark is generated based on the verified data.

3. The method according to claim 1, characterized in that Also includes: Divide the intermediate calculation results into edited data and historical data according to the data status. The edited data is stored in the distributed memory database for online calculation result debugging, and the historical data is stored in the Hive data warehouse for reversal and settlement. In response to the settlement result output instruction, the historical data is called, a preset Excel-like template configuration is parsed through the web-based settlement form template designer, and a filling rule for the hierarchical data corresponding to the calculation sequence is generated based on the cell orientation relationship, and the settlement result is driven to dynamically generate a multi-format settlement form according to the filling rule; By deploying a file synchronization service in an external isolated area, the multi-format settlement statements are transmitted to the historical data storage node in the internal computing area, thereby achieving secure synchronization of settlement results between the internal and external networks.

4. The method according to claim 1, wherein A directed graph structure forming a settlement dependency topology is constructed with the computing nodes as vertices and the unidirectional node connection lines as directed edges. The starting point of each directed edge of the settlement dependency topology is a data output node and the end point is a data input node. The direction of the directed edge is consistent with the dependency direction, including: Traverse all the one-way node connection lines generated by the user, and directly generate a corresponding directed edge for each one-way node connection line. The starting point of the directed edge is fixed to the starting computing node associated with the one-way node connection line, and the end point is fixed to the end computing node associated with the one-way node connection line. The direction of the directed edge is forcibly aligned with the user-defined data flow direction; At the same time, all the computing nodes are integrated into a vertex set, and all the directed edges generated according to this rule are integrated into a directed edge set. According to the vertex set and the directed edge set, a directed graph structure of the settlement dependency topology is constructed, wherein each directed edge is bound to the output end identifier of the starting computing node and the input end identifier of the end computing node.

5. The method according to claim 1, characterized in that Based on the initialized calculation sequence, the executable script drives the distributed computing framework to schedule computing tasks according to the topological order represented by the calculation sequence, and during the execution of the computing tasks, monitors the change status of the partition storage data, determines the downstream computing nodes and their associated data items affected by the change based on the settlement dependency topology, and recalculates and outputs the power settlement results in combination with the topological order of the settlement dependency topology, including: Distributing the executable script to a task queue of a distributed computing framework according to the order of the computing sequence, scheduling computing tasks for execution according to the order of the task queue, and accessing a corresponding data storage path to obtain data when each computing task is executed; During the execution of computing tasks, the incremental data capturer monitors the data change status of the partition storage area. When a data change is detected, the location identifier of the changed data item is extracted. Triggering a lineage tracer to locate downstream computing nodes affected by the change and associated data items with the location identifiers based on the directed graph structure of the settlement dependency topology; According to the topological order of the calculation sequence, the executable scripts corresponding to the affected downstream computing nodes are rescheduled to perform the calculation tasks, and the recalculated power settlement results are output to the result storage area. The power settlement results are classified according to the settlement cycle identifier to generate a daily settlement statement or a monthly settlement statement.

6. The method according to claim 1, characterized in that A data type set and corresponding computing nodes for power settlement are provided in a visual interface. In response to a user dragging and dropping a computing node, the operation rule expression configured for the computing node is parsed, including: Presetting a data type set in the visualization interface, the data type set including contracted electricity quantity, transaction electricity price, and settlement period identifier; In response to a user dragging a computing node to a canvas area, loading an operation rule expression corresponding to the computing node from a preset node library, the operation rule expression including a variable placeholder; Parsing the operation rule expression through a parameterized extraction engine, identifying the data source type corresponding to the variable placeholder, and matching a specific data storage path from the data type set according to the data source type; The variable placeholder is associated with the matched data storage path to generate a binding relationship mapping table, wherein the binding relationship mapping table records the corresponding relationship between each variable placeholder and the data storage path.

7. The method according to claim 1, characterized in that Initializing a calculation sequence based on a node with zero in-degree in the directed graph structure, and converting the operation rule expression carrying the binding relationship into an executable script through a variable binder, including: Scan the in-degree values ​​of all vertices in the directed graph structure, select vertices with in-degree values ​​of zero as initial calculation nodes, and perform topological sorting based on the directions of directed edges starting from the initial calculation nodes to generate a calculation sequence, wherein the calculation sequence records the execution order of the calculation nodes; Reading the binding relationship mapping table through the variable binder, processing each computing node in turn according to the order of the computing sequence, and replacing the variable placeholders in the operation rule expression with the corresponding data storage path; The replaced operation rule expression is compiled into a structured query script or a function call script to generate an executable script queue corresponding to the order of the calculation sequence.

8. A node dragging-based electricity settlement visualization configuration system, characterized in that: include: The parsing module is used to provide a set of data types and corresponding computing nodes for power settlement in a visual interface, parse the operation rule expression configured for the computing node in response to the user's drag and drop operation on the computing node, and establish a binding relationship between the operation rule expression and the corresponding power transaction data, including: Extracting corresponding power transaction data from a distributed storage device and establishing a binding relationship between the power transaction data and the operation rule expression, wherein the distributed storage device adopts a horizontal sharding strategy based on a transaction subject identifier and a vertical partitioning strategy based on a settlement period identifier; A construction module is configured to generate node connection lines representing computational dependencies in response to a user dragging a connection line between computational nodes, and to construct a settlement dependency topology based on the computational dependencies represented by the node connection lines, wherein the settlement dependency topology comprises a directed graph structure with the computational nodes as vertices and the node connection lines as directed edges, mapping data reference paths between nodes, including: In response to a user dragging operation from an output port of a first computing node to an input port of a second computing node, generating a unidirectional node connection line representing a computing dependency relationship, wherein the unidirectional node connection line is used to mark a data flow direction; Extracting the connection status of the input port and the output port of each computing node based on all the generated unidirectional node connection lines, and determining the dependency direction between the computing nodes based on the connection status of the input port and the output port; A directed graph structure is constructed with the computing nodes as vertices and the unidirectional node connection lines as directed edges to form a settlement dependency topology, wherein the starting point of each directed edge of the settlement dependency topology is a data output node and the end point is a data input node, and the direction of the directed edge is consistent with the dependency direction; Traversing the settlement dependency topology, mapping a data reference path between nodes for each directed edge, wherein the data reference path label records the transmission path from the output data of the starting node to the input data of the ending node; A conversion module, configured to initialize a calculation sequence based on nodes with zero in-degree in the directed graph structure, and convert an operation rule expression carrying the binding relationship into an executable script through a variable binder; The output module is used to drive the distributed computing framework to schedule computing tasks in the topological order represented by the computing sequence based on the initialized computing sequence through the executable script, and in the process of executing the computing tasks, if the change status of the partition storage data is monitored, the downstream computing nodes and their associated data items affected by the change are determined based on the settlement dependency topology, and the power settlement results are recalculated and output in combination with the topological order of the settlement dependency topology.

Citation Information

Patent Citations

  • Distributed power settlement calculation method and system

    CN112597442A

  • Business process construction method and system

    CN120196381A