Visual data report generation method and device, equipment and storage medium
By editing report nodes and configuring data sources and connections on a visual canvas, an intermediate representation model is generated, and a header tree and task topology are constructed, solving the problem of fixed template dependency and achieving flexible and efficient report generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 广州市扬新技术研究有限责任公司
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-01
AI Technical Summary
Existing report generation methods rely on fixed templates, resulting in long development cycles, high maintenance costs, and difficulty for non-technical personnel to use, failing to meet the business needs of enterprises that are rapidly iterating.
By receiving node editing operations on the visualization canvas, report nodes are generated and connection relationships, data source information, and binding expressions are configured. The nodes are serialized into an intermediate representation model, a header tree and task topology are constructed, and the calculation unit is executed to generate the target data report.
It enables users to generate reports flexibly without needing to master fixed templates, improving generation efficiency and flexibility, and meeting the business needs of enterprises in rapid iteration.
Smart Images

Figure CN121960415A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for generating visual data reports. Background Technology
[0002] With the development of computer technology, more and more data can be presented in the form of reports, which greatly improves the intuitiveness of the data and the efficiency of processing.
[0003] Current report generation methods generally rely on fixed templates. When business logic changes, these templates need to be modified, resulting in long development cycles and high maintenance costs. Furthermore, the application of fixed templates requires a high level of expertise, making it difficult for non-technical personnel to become familiar with them. This significantly limits the efficiency and flexibility of report generation, failing to meet the rapidly iterating business needs of enterprises. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for generating visual data reports, which solves the technical problem in related technologies where the report generation method relying on fixed templates limits the efficiency and flexibility of report generation and fails to meet the business needs of enterprises that are rapidly iterating. It can effectively improve the efficiency and flexibility of report generation and meet the business needs of enterprises that are rapidly iterating.
[0005] In a first aspect, embodiments of this application provide a method for generating visual data reports, including: Receive node editing operations on the visualization canvas, generate multiple report nodes on the visualization canvas according to the node editing operations, and configure the connection relationship between the report nodes, the data source information of the report nodes, and the binding expression of the report nodes; Based on the connection relationships, the data source information, and the binding expression, the visualization canvas is serialized into an intermediate representation model; Construct a header tree and generate a task topology based on the intermediate representation model; The calculation results corresponding to each report node are obtained by executing multiple calculation units in the task topology, the calculation results are filled into the header tree, and the target data report is generated based on the header tree.
[0006] In a second aspect, embodiments of this application provide a visualization data report generation device, including a node configuration module, an intermediate conversion module, a model processing module, and a report generation module, wherein: The node configuration module is used to receive node editing operations on the visualization canvas, generate multiple report nodes on the visualization canvas according to the node editing operations, and configure the connection relationship between the report nodes, the data source information of the report nodes, and the binding expression of the report nodes. The intermediate conversion module is used to serialize the visualization canvas into an intermediate representation model based on the connection relationship, the data source information, and the binding expression. The model processing module is used to construct a header tree and generate a task topology based on the intermediate representation model; The report generation module is used to execute multiple calculation units in the task topology to obtain the calculation results corresponding to each report node, fill the calculation results into the header tree, and generate the target data report based on the header tree.
[0007] In a third aspect, embodiments of this application provide a visualization data report generation device, including: a memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the visualization data report generation method as described in the first aspect.
[0008] In a fourth aspect, embodiments of this application provide a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform the visualization data report generation method as described in the first aspect.
[0009] This application embodiment receives node editing operations on a visualization canvas, generates multiple report nodes on the canvas based on these operations, and configures the connection relationships between the report nodes, the data source information of the report nodes, and the binding expressions of the report nodes. Based on the connection relationships, data source information, and binding expressions, the visualization canvas is serialized into an intermediate representation model. A header tree and a task topology are constructed based on the intermediate representation model. Multiple calculation units in the task topology are executed to obtain the calculation results corresponding to each report node. The calculation results are filled into the header tree, and the target data report is generated based on the header tree. Users can flexibly generate target data reports by performing node editing operations on the visualization canvas without needing to be familiar with fixed templates, effectively improving the efficiency and flexibility of report generation and meeting the business needs of rapid enterprise iteration. Attached Figure Description
[0010] Figure 1 This is a flowchart of a method for generating visual data reports provided in an embodiment of this application; Figure 2This is a flowchart of another method for generating visual data reports provided in this application embodiment; Figure 3 This is a schematic diagram of the structure of a visualization data report generation device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a visualization data report generation device provided in an embodiment of this application. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but additional steps not included in the drawings may also be present. The above processes can correspond to methods, functions, procedures, subroutines, subroutines, etc.
[0012] Figure 1 A flowchart of a visualization data report generation method provided in this application embodiment is given. The visualization data report generation method provided in this application embodiment can be executed by a visualization data report generation device, which can be implemented by hardware and / or software and integrated into a visualization data report generation device.
[0013] The following description uses a visualization data report generation device as an example to illustrate the visualization data report generation method. (Reference) Figure 1 The method for generating this visual data report includes: S110: Receives node editing operations on the visualization canvas, generates multiple report nodes on the visualization canvas based on the node editing operations, and configures the connection relationships between report nodes, the data source information of report nodes, and the binding expressions of report nodes.
[0014] In one embodiment, a visual canvas can be provided through a visual editor, allowing users to edit nodes on the canvas. These node editing operations include adding or deleting report nodes, adjusting their positions (through inputting positions, dragging, etc.), adjusting their sizes (width and length), adjusting their z-order, connecting report nodes, configuring node types and attributes, and defining connection relationships. Node types may include header nodes, leaf / data nodes, group nodes, formula nodes, and fetch nodes. Node attributes may include node identifier (id), label, cell span information (rowSpan, colSpan), bound expressions (expr, such as summation, filtering, and correlation calculations), data source information (dsId), formatting rules, permission information, and version number. The data source information refers to the origin of the original data for the report node, such as a URL or storage address, while the bound expression refers to the processing method used on the original data.
[0015] S120: Serialize the visualization canvas into an intermediate representation model based on the connection relationships, data source information, and binding expressions.
[0016] For example, based on the connection relationships, data source information, and binding expressions of each report node on the visualization canvas, the visualization canvas is serialized into an intermediate representation (IR) model according to a pre-defined data format. The intermediate representation model can record a node table, a connection table, canvas metadata (canvas size, coordinate system, version), and node meta-model definitions, etc. By serializing the visualization canvas into an intermediate representation model, the transformation from free interaction with the visualization canvas to a structured executable model is achieved, providing accurate input for subsequent header tree construction and task topology generation.
[0017] In one embodiment, all report nodes and connections on the visualization canvas can be traversed to extract node identifiers, node types, node attributes, node sizes, and stacking levels, as well as the starting report node, target report node, and connection semantics of the connections. This extracted information is then converted into a node table (including node identifiers, node types, node attributes, node sizes, and stacking levels) and a connection table (including starting report nodes, target report nodes, and connection semantics). The structured data in the node and connection tables is serialized into an intermediate representation model file in JSON format. This intermediate representation model file may contain the node table, connection table, canvas metadata, and node metamodel definitions, and the intermediate representation model can support parsing by the report engine.
[0018] S130: Construct the header tree and generate the task topology based on the intermediate representation model.
[0019] For example, a header tree and a task topology are constructed based on the intermediate representation model. The task topology includes multiple computational units, and the nodes in the header tree can correspond to different report nodes, with each computational unit potentially corresponding to one or more report nodes. Optionally, the intermediate representation model can be input into a preset report engine, which then constructs the header tree and generates the task topology based on the intermediate representation model.
[0020] The header tree can be understood as a multi-level tree model used to organize the header structure of visual data reports. It can be created based on the connection relationships, size information, stacking hierarchy, and position information of report nodes in the intermediate representation model. The task topology can be understood as an execution sequence model used to guide the generation of calculation results for report nodes. It can be created based on the connection relationships, data source information, and binding expressions of report nodes in the intermediate representation model. The task topology can define the execution order of calculation units, and the calculation results of each report node are obtained by executing the calculation units in the topology.
[0021] S140: Execute multiple computing units in the task topology to obtain the calculation results corresponding to each report node, fill the calculation results into the header tree, and generate the target data report based on the header tree.
[0022] For example, the calculation results of each calculation unit in the task topology are obtained, and the calculation results are filled into the corresponding positions of the report nodes in the header tree. After filling the calculation results of each calculation unit into the header tree, the target data report can be generated based on the header tree. For example, based on the row and column layout and span information of each tree node in the header tree, a corresponding two-dimensional cell matrix is constructed. Then, the calculation results of each tree node in the header tree are filled into the corresponding cells of the two-dimensional cell matrix, and finally, a target data report in a report format that can be rendered or exported is obtained.
[0023] As described above, by receiving node editing operations on the visualization canvas, multiple report nodes are generated on the visualization canvas based on the node editing operations. The connection relationships between the report nodes, the data source information of the report nodes, and the binding expressions of the report nodes are configured. Based on the connection relationships, data source information, and binding expressions, the visualization canvas is serialized into an intermediate representation model. A header tree and a task topology are constructed based on the intermediate representation model. Multiple calculation units in the task topology are executed to obtain the calculation results corresponding to each report node. The calculation results are filled into the header tree, and the target data report is generated based on the header tree. Users can flexibly generate target data reports by performing node editing operations on the visualization canvas without needing to be familiar with fixed templates, effectively improving the efficiency and flexibility of report generation and meeting the business needs of rapid enterprise iteration.
[0024] Based on the above embodiments, Figure 2 A flowchart of another method for generating visual data reports according to an embodiment of this application is provided. This method is a concretization of the above-described method for generating visual data reports. (Reference) Figure 2 The method for generating this visual data report includes: S210: Receive node editing operations on the visualization canvas, generate multiple report nodes on the visualization canvas based on the node editing operations, and configure the connection relationships between report nodes, the data source information of report nodes, and the binding expressions of report nodes.
[0025] S220: Serialize the visualization canvas into an intermediate representation model based on the connection relationships, data source information, and binding expressions.
[0026] S230: Create a header tree based on the connection relationships between the various report nodes in the intermediate representation model.
[0027] For example, the intermediate representation model is input into the report engine, which then creates a header tree based on the connection relationships between the various report nodes in the intermediate representation model. In one embodiment, when creating the header tree based on the connection relationships between the various report nodes in the intermediate representation model, a multi-level tree structure can be created based on the connection relationships, size information, and stacking hierarchy of the various report nodes in the intermediate representation model; the multi-level tree structure is then mapped to rows and columns based on the position information of the various report nodes in the intermediate representation model, and the multi-level tree structure after row and column mapping is recursively processed by span to obtain the header tree.
[0028] For example, the report nodes are divided into a multi-level tree structure according to the connection relationships between the various report nodes in the intermediate representation model (e.g., parent-child hierarchical association, merge command). The size information of each report node in the intermediate representation model is recorded in the corresponding node in the multi-level tree structure. The row and column numbers of the multi-level tree structure are set according to the position information of each report node in the intermediate representation model, thereby performing row and column mapping on the multi-level tree structure.
[0029] Furthermore, based on the connection relationships and stacking hierarchy of each report node in the intermediate representation model, the multi-level tree structure after row and column mapping is recursively processed for span (e.g., the parent node's colSpan is equal to the sum of its child nodes by default) to obtain the header tree. This application parses the connection relationships of report nodes in the intermediate representation model, recursively constructs a multi-level tree structure, and calculates the row and column spans, accurately converting canvas semantics into table merging rules. This ensures a clear header hierarchy and accurate row and column spans, providing an accurate structural framework for subsequent report layout and improving the quality of data report generation.
[0030] The mapping of multi-level tree structures can be based on row and column information rules, node parent-child relationship rules, merging semantic rules, and conflict resolution rules. Row and column information rules determine rows based on the hierarchical grouping of node coordinates (e.g., grouping all nodes by their vertical coordinates, mapping nodes whose differences from their vertical coordinate values are within the same preset threshold range to the same header row; the same applies to hierarchical grouping by horizontal coordinates). For node parent-child relationship rules, if a parent-child relationship exists (or determined by graphical inclusion / connection direction), the parent node shown by the connection is at a higher level, and the column span of the parent node is equal to the sum of the column spans of its child nodes. For merging semantic rules, if the connection type is merge, or if two or more nodes are strictly aligned in coordinates and marked as merged by the user, these nodes are merged into a cell during rendering. For conflict resolution rules, if there are overlapping or conflicting stages (e.g., coordinate overlap, cross-row / cross-column conflicts), the decision to retain, merge, or split nodes is based on the stacking hierarchy (z-order) and user-specified priority. Optionally, if the node type is a placeholder, the rendering engine can automatically fill in the default value or placeholder text when there is no data.
[0031] In one possible embodiment, the visualization data report generation method provided in this application may perform row and column mapping on a multi-level tree structure based on the position information of each report node in the intermediate representation model. In the case of report nodes with position conflicts in the intermediate representation model, conflict resolution is performed on the report nodes with position conflicts based on their priority, stacking level, and creation time.
[0032] For example, when a report node with a positional conflict is detected in an intermediate representation model (e.g., a report node with an overlapping area, a report node spanning multiple rows or columns), conflict resolution can be performed on the report node with the positional conflict based on its priority, stacking level, and creation time. This conflict resolution can involve merging or deleting the report node.
[0033] For example, report nodes with lower priority are deleted sequentially based on priority, stacking level, and creation time. If priorities are the same, report nodes with lower stacking levels are deleted; if stacking levels are the same, report nodes with earlier creation times are deleted. This application effectively resolves data report layout errors caused by report node conflicts by handling conflicting report nodes based on their priority, stacking level, and creation time. This ensures the accuracy of header tree construction and report layout, and improves the stability and reliability of report generation.
[0034] In one possible embodiment, the visualization data report generation method provided in this application performs span recursive processing on the multi-level tree structure after row and column mapping to obtain the header tree. This can be done by recursively processing the multi-level tree structure after row and column mapping upwards, and performing span recursive processing based on the connection relationship and connection type corresponding to the multi-level tree structure to obtain the header tree.
[0035] For example, the recursion is performed by starting from the leaf node level of the multi-level tree structure and traversing upwards, processing the parent node of each node layer by layer until the root node is reached. For each node in the multi-level tree structure, all its direct child nodes are determined, and the initial span of the current node is calculated based on its row and column mapping results (such as row number and column number). Where the child nodes are connected by ordinary parent-child lines (without merging semantics), the column span of the parent node is the sum of the column spans of all child nodes (e.g., if the column span of child node A is colSpan=2 and the column span of child node B is colSpan=3, then the column span of the parent node is colSpan=5). The row span of the parent node can be the largest row span among the child nodes to ensure that the row range of all child nodes is covered.
[0036] Furthermore, the node span is adjusted based on the connection type between nodes (such as semantic instructions like merge or split). For example, if there is a merge-type connection between child nodes (such as the merge instruction), these child nodes are considered as a merge unit, and the column span of the parent node is taken as the total span of the merge unit (e.g., if child nodes C and D are merged, with column spans colSpan of 2 and 2 respectively, then the total span of the merge unit = 4, and the column span of the parent node = 4). Simultaneously, the row and column range of the merge unit is marked (e.g., the starting column = the starting column of child node C, and the ending column = the ending column of child node D). If the connection between child nodes is a split-type connection, the column span of the parent node is calculated based on the span after the child node is split (e.g., if child node E is split into E1 and E2, each with a column span of 1, then the column span of the parent node colSpan = 2). The calculated row and column spans are then updated in the attributes of the current node in the multi-level tree structure. Using the current node as a child node, the process continues recursively upwards, processing its direct parent nodes until the root node completes the span calculation. After confirming the span information of all nodes in the multi-level tree structure, the multi-level tree structure is transformed into a header tree containing complete row and column positions, span rules, and merging semantics.
[0037] S240: Create a directed acyclic graph based on the connection relationships of each report node in the intermediate representation model, data source information, and binding expressions. Divide the directed acyclic graph into multiple computational units and generate a task topology based on the multiple computational units.
[0038] For example, the connection relationships, data source information, and binding expressions of each report node in the intermediate representation model are determined. Each report node is mapped to a vertex of a Directed Acyclic Graph (DAG). The vertex attributes are attached with the data source information and binding expression of the node. Directed edges are created according to the connection relationships (data dependency direction) between nodes. For example, if the output of node X is the input of node Y, then a directed edge is added from node X to node Y to form a directed acyclic graph.
[0039] Furthermore, based on the dependencies in the directed acyclic graph (DAG), the DAG is divided into multiple computational units, and a task topology can be generated based on these multiple computational units. The task topology can be a directed graph of computational units, where the vertices of the directed graph represent computational units, and the edges represent dependencies between units.
[0040] This application creates a directed acyclic graph based on the connection relationships between various report nodes in the intermediate representation model, data source information, and binding expressions. This accurately maps the data dependencies between report nodes, avoiding the execution order errors caused by ambiguous dependencies in traditional report calculations. Furthermore, it splits nodes without mutual dependencies into calculation units according to topological sorting, supports parallel execution, significantly shortens data calculation time, and improves report generation efficiency.
[0041] S250: Execute multiple computing units in the task topology to obtain the calculation results corresponding to each report node, fill the calculation results into the header tree, and generate the target data report based on the header tree.
[0042] In one possible embodiment, the visualization data report generation method provided in this application executes multiple computing units in the task topology to obtain the calculation results corresponding to each report node. This can be achieved by obtaining node data based on the data source information corresponding to each computing unit in the task topology, and processing the node data according to the binding expression corresponding to the computing unit to obtain the calculation results corresponding to each report node.
[0043] For example, data source information for each node is extracted. This information may include data type (e.g., database, API interface, local file), connection parameters (e.g., IP address, port, key), and query rules (e.g., SQL statement, API path, file filtering conditions). Node data is obtained based on this data source information, and then processed according to binding expressions to obtain the calculation results for each report node. These binding expressions can be used for aggregation, data association, data format conversion, and data filtering of node data. This application obtains node data based on the data source information corresponding to each calculation unit in the task topology and processes the node data according to the binding expressions corresponding to the calculation units. This allows for diverse reporting requirements to be met without modifying the underlying code; it also adapts to dynamic adjustments in different business scenarios, reducing report iteration costs.
[0044] In one possible embodiment, the visualization data report generation method provided in this application generates a target data report based on a header tree. This can be achieved by: generating a two-dimensional cell matrix based on the row and column layout and span information of each tree node in the header tree; filling the calculation results of each tree node in the header tree into the corresponding cells of the two-dimensional cell matrix to obtain the target data report.
[0045] For example, the header tree is traversed, and the row and column layout parameters (e.g., starting row index, starting column index), span information (e.g., row span, column span), and node type (e.g., header node, data node) of each tree node are extracted. The maximum row index and maximum column index of all nodes in the header tree are calculated, and the total number of rows and columns are determined based on these indices. A two-dimensional cell matrix is then generated according to these total rows and columns. A corresponding cell range is assigned to each tree node; for example, the continuous cell range covered by each tree node in the two-dimensional cell matrix can be marked based on the starting row, starting column, and span value. Cells corresponding to nodes that span rows and columns are then merged.
[0046] Furthermore, based on the binding relationship between the header tree nodes and report nodes, the calculation results of each tree node in the header tree are filled into the corresponding cells of the two-dimensional cell matrix to obtain the target data report. Specifically, for single-value nodes, the calculation results can be filled into their corresponding merged cell area; for table-type nodes, the results are filled into the corresponding consecutive cells in row and column order; and for multi-level header nodes, the calculation results are filled into the merged cells they cover. This application generates a two-dimensional cell matrix based on the row and column layout and span information of each tree node in the header tree, and fills the calculation results into the two-dimensional cell matrix to obtain the target data report. This accurately reproduces the positional relationship and merging logic of the report nodes in the visualization canvas, ensuring that the final report is highly consistent with the user-designed prototype and improving the quality of data report generation.
[0047] For example, when a user opens a designer configured with methods for generating visual data reports, the designer creates a visual canvas. The user can add three report nodes to the visual canvas: a header node N_header (type=header, x=10, y=10, w=400, h=40, label='Region'), a leaf node N_sales_total (type=leaf, x=10, y=60, w=200, h=30, expr='SUM(sales.amount) WHERE sales.date between @start and @end', dsId='salesDB'), and a leaf node N_avg_price (type=leaf, x=210, y=60, w=200, h=30, expr='AVG(sales.price)', dsId='salesDB'). Users can connect the header node N_header to the leaf nodes N_sales_total and N_avg_price via parent-child relationships, setting "Region" as the parent node and "Total Sales" and "Average Price" as the two child nodes. The designer can serialize the three report nodes on the canvas into an intermediate representation model. When the report engine detects that the user has performed a report generation operation, it constructs the header tree and generates the task topology based on the intermediate representation model. The two computational units of the task topology are assigned to two parallel processors for processing, and the calculation results are written to the leaf nodes of the header tree. The layout engine calculates the data report table based on the row and column mapping and span information and merges the parent cells corresponding to the header nodes. The renderer can then export the calculated report table as an Excel file with merged cells as the target data report and return it to the user.
[0048] As described above, by receiving node editing operations on the visualization canvas, multiple report nodes are generated on the visualization canvas based on the node editing operations. The connection relationships between report nodes, data source information, and binding expressions of the report nodes are configured. Based on the connection relationships, data source information, and binding expressions, the visualization canvas is serialized into an intermediate representation model. A header tree and task topology are constructed based on the intermediate representation model. Multiple calculation units in the task topology are executed to obtain the calculation results corresponding to each report node. The calculation results are filled into the header tree, and the target data report is generated based on the header tree. Users can flexibly generate target data reports by performing node editing operations on the visualization canvas, without needing to be familiar with fixed templates, effectively improving the efficiency and flexibility of report generation and meeting the business needs of rapid enterprise iteration. Simultaneously, by creating a directed acyclic graph based on the connection relationships, data source information, and binding expressions of each report node in the intermediate representation model, the data dependencies between report nodes are accurately mapped, avoiding the execution order errors caused by ambiguous dependencies in traditional report calculations. Furthermore, nodes without mutual dependencies are split into calculation units according to the topology, supporting parallel execution, significantly shortening data calculation time and improving report generation efficiency.
[0049] Figure 3 A schematic diagram of a visualization data report generation device provided in an embodiment of this application is given. (Reference) Figure 3 The visualization data report generation device includes a node configuration module 31, an intermediate conversion module 32, a model processing module 33, and a report generation module 34.
[0050] The node configuration module 31 receives node editing operations on the visualization canvas, generates multiple report nodes on the visualization canvas based on the node editing operations, and configures the connection relationships between report nodes, the data source information of report nodes, and the binding expressions of report nodes. The intermediate conversion module 32 serializes the visualization canvas into an intermediate representation model based on the connection relationships, data source information, and binding expressions. The model processing module 33 constructs a header tree and generates a task topology based on the intermediate representation model. The report generation module 34 executes multiple calculation units in the task topology to obtain the calculation results corresponding to each report node, fills the calculation results into the header tree, and generates the target data report based on the header tree.
[0051] As described above, by receiving node editing operations on the visualization canvas, multiple report nodes are generated on the visualization canvas based on the node editing operations. The connection relationships between the report nodes, the data source information of the report nodes, and the binding expressions of the report nodes are configured. Based on the connection relationships, data source information, and binding expressions, the visualization canvas is serialized into an intermediate representation model. A header tree and a task topology are constructed based on the intermediate representation model. Multiple calculation units in the task topology are executed to obtain the calculation results corresponding to each report node. The calculation results are filled into the header tree, and the target data report is generated based on the header tree. Users can flexibly generate target data reports by performing node editing operations on the visualization canvas without needing to be familiar with fixed templates, effectively improving the efficiency and flexibility of report generation and meeting the business needs of rapid enterprise iteration.
[0052] In one possible embodiment, the model processing module 33 constructs a header tree and generates a task topology based on the intermediate representation model, including: Create a header tree based on the connection relationships between the various report nodes in the intermediate representation model; A directed acyclic graph (DAG) is created based on the connection relationships between various report nodes in the intermediate representation model, data source information, and binding expressions. The DAG is then split into multiple computational units, and a task topology is generated based on these multiple computational units.
[0053] In one possible embodiment, the model processing module 33 creates a header tree based on the connection relationships between the various report nodes in the intermediate representation model, including: Create a multi-level tree structure based on the connection relationships, size information, and stacking hierarchy of each report node in the intermediate representation model; Based on the position information of each report node in the intermediate representation model, the multi-level tree structure is mapped to rows and columns, and the multi-level tree structure after row and column mapping is recursively processed by span to obtain the header tree.
[0054] In one possible embodiment, the model processing module 33 performs row and column mapping on the multi-level tree structure based on the position information of each report node in the intermediate representation model, including: In the case of report nodes with conflicting positions in the intermediate representation model, conflict resolution is performed on the report nodes with conflicting positions based on their priority, stacking level, and creation time.
[0055] In one possible embodiment, the model processing module 33 performs span recursive processing on the multi-level tree structure after row and column mapping to obtain a header tree, including: The multi-level tree structure after upward recursive row and column mapping is used to obtain the header tree by recursively processing the span according to the connection relationship and connection type corresponding to the multi-level tree structure.
[0056] In one possible embodiment, the report generation module 34 executes multiple computing units in the task topology to obtain the calculation results corresponding to each report node, including: Obtain node data based on the data source information corresponding to each computing unit in the task topology; The node data is processed according to the binding expression corresponding to the calculation unit to obtain the calculation results corresponding to each report node.
[0057] In one possible embodiment, the report generation module 34 generates a target data report based on the header tree, including: A two-dimensional cell matrix is generated based on the row and column layout and span information of each tree node in the header tree; The calculation results of each tree node in the header tree are filled into the corresponding cells of the two-dimensional cell matrix to obtain the target data report.
[0058] It is worth noting that in the embodiments of the above-mentioned visualization data report generation device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this application.
[0059] This application also provides a visualization data report generation device, which can integrate the visualization data report generation apparatus provided in this application. Figure 4 This is a schematic diagram of the structure of a visual data report generation device provided in an embodiment of this application. (Reference) Figure 4 The visualization data report generation device includes: an input device 43, an output device 44, a memory 42, and one or more processors 41; the memory 42 is used to store one or more programs; when one or more programs are executed by one or more processors 41, the one or more processors 41 implement the visualization data report generation method provided in the above embodiments. The input device 43, output device 44, memory 42, and processors 41 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.
[0060] The memory 42, as a computing device-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the visualization data report generation method provided in any embodiment of this application (e.g., the node configuration module 31, intermediate conversion module 32, model processing module 33, and report generation module 34 in the visualization data report generation device). The memory 42 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory 42 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 42 may further include memory remotely located relative to the processor 41, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0061] Input device 43 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 44 may include display devices such as a display screen.
[0062] The processor 41 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 42, thereby realizing the above-mentioned method for generating visual data reports.
[0063] The visualization data report generation apparatus, device, and computer provided above can be used to execute the visualization data report generation method provided in any of the above embodiments, and have corresponding functions and beneficial effects.
[0064] This application embodiment also provides a storage medium for storing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to execute the visualization data report generation method provided in the above embodiment. The visualization data report generation method includes: receiving node editing operations on a visualization canvas; generating multiple report nodes on the visualization canvas according to the node editing operations; configuring the connection relationships between the report nodes, the data source information of the report nodes, and the binding expressions of the report nodes; serializing the visualization canvas into an intermediate representation model according to the connection relationships, data source information, and binding expressions; constructing a header tree and generating a task topology according to the intermediate representation model; executing multiple calculation units in the task topology to obtain the calculation results corresponding to each report node; filling the calculation results into the header tree; and generating a target data report according to the header tree.
[0065] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROMs, floppy disks, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disks or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. Furthermore, storage media may reside in a first computer system in which a program is executed, or may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage media may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0066] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the visualization data report generation method provided above, but can also perform related operations in the visualization data report generation method provided in any embodiment of this application.
[0067] The visualization data report generation apparatus, device, and storage medium provided in the above embodiments can execute the visualization data report generation method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the visualization data report generation method provided in any embodiment of this application.
[0068] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments provided herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A method for generating visual data reports, characterized in that, include: Receive node editing operations on the visualization canvas, generate multiple report nodes on the visualization canvas according to the node editing operations, and configure the connection relationship between the report nodes, the data source information of the report nodes, and the binding expression of the report nodes; Based on the connection relationships, the data source information, and the binding expression, the visualization canvas is serialized into an intermediate representation model; Construct a header tree and generate a task topology based on the intermediate representation model; The calculation results corresponding to each report node are obtained by executing multiple calculation units in the task topology, the calculation results are filled into the header tree, and the target data report is generated based on the header tree.
2. The method for generating visualized data reports according to claim 1, characterized in that, The step of constructing the header tree and generating the task topology based on the intermediate representation model includes: Create a header tree based on the connection relationships between the various report nodes in the intermediate representation model; A directed acyclic graph is created based on the connection relationships of each report node in the intermediate representation model, the data source information, and the binding expression. The directed acyclic graph is then split into multiple computational units, and a task topology is generated based on the multiple computational units.
3. The method for generating visualized data reports according to claim 2, characterized in that, The step of creating a header tree based on the connection relationships between the various report nodes in the intermediate representation model includes: A multi-level tree structure is created based on the connection relationships, size information, and stacking hierarchy of each report node in the intermediate representation model; Based on the position information of each report node in the intermediate representation model, the multi-level tree structure is mapped by rows and columns, and the multi-level tree structure after row and column mapping is recursively processed by span to obtain the header tree.
4. The method for generating visualized data reports according to claim 3, characterized in that, The step of mapping the multi-level tree structure to rows and columns based on the position information of each report node in the intermediate representation model includes: In the case of report nodes with conflicting positions in the intermediate representation model, conflict resolution is performed on the report nodes with conflicting positions based on their priority, stacking level, and creation time.
5. The method for generating visualized data reports according to claim 3, characterized in that, The process of performing span recursive processing on the multi-level tree structure after row and column mapping to obtain the header tree includes: The multi-level tree structure after upward recursive row and column mapping is used to obtain the header tree by performing span recursive processing based on the connection relationship and connection type corresponding to the multi-level tree structure.
6. The method for generating visualized data reports according to claim 1, characterized in that, The execution of multiple computing units in the task topology to obtain the calculation results corresponding to each of the report nodes includes: Node data is obtained based on the data source information corresponding to each computing unit in the task topology; The node data is processed according to the binding expression corresponding to the calculation unit to obtain the calculation results corresponding to each report node.
7. The method for generating visualized data reports according to claim 1, characterized in that, The step of generating the target data report based on the header tree includes: A two-dimensional cell matrix is generated based on the row and column layout and span information of each tree node in the header tree; The calculation results of each tree node in the header tree are filled into the corresponding cells of the two-dimensional cell matrix to obtain the target data report.
8. A visualization data report generation device, characterized in that, It includes a node configuration module, an intermediate transformation module, a model processing module, and a report generation module, among which: The node configuration module is used to receive node editing operations on the visualization canvas, generate multiple report nodes on the visualization canvas according to the node editing operations, and configure the connection relationship between the report nodes, the data source information of the report nodes, and the binding expression of the report nodes. The intermediate conversion module is used to serialize the visualization canvas into an intermediate representation model based on the connection relationship, the data source information, and the binding expression. The model processing module is used to construct a header tree and generate a task topology based on the intermediate representation model; The report generation module is used to execute multiple calculation units in the task topology to obtain the calculation results corresponding to each report node, fill the calculation results into the header tree, and generate the target data report based on the header tree.
9. A visualization data report generation device, characterized in that, include: Memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the visualization data report generation method as described in any one of claims 1-7.
10. A storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the visualization data report generation method as described in any one of claims 1-7.