Table detection method, apparatus and device, and storage medium
By employing a two-layer detection mechanism of column-level filtering and cell-level validation in multidimensional tables, the problem of misidentifying false loop dependencies as true loop dependencies is solved, thereby improving the processing efficiency and reliability of multidimensional tables.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing multidimensional tabular data processing systems cannot accurately distinguish between pseudo-cyclic dependencies and true-cyclic dependencies, causing users to frequently correct inter-column dependencies, which affects computational efficiency and applicability.
A two-layer detection mechanism of column-level filtering and cell-level verification is adopted. By filtering the loop points and performing cell-level verification, false loop dependencies and true loop dependencies are distinguished, thus avoiding misidentification.
It improves the processing efficiency and ease of use of multidimensional tables, reduces invalid operations, ensures the correct handling of true cycle dependencies, and enhances reliability in complex business scenarios.
Smart Images

Figure CN121809460A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of table processing technology, and in particular to a table detection method, apparatus, device and storage medium. Background Technology
[0002] In data organization and processing tools such as multidimensional tables, in order to meet the cross-data row association requirements in complex business scenarios, it is usually supported to manually configure cross-row association fields to build field reference relationships between different data rows, so as to realize functions such as linked data updates and recursive calculations.
[0003] In existing technologies, when performing dependency detection and calculation in multidimensional table data processing systems, dependency cycle detection is based solely on inter-column dependencies. When a closed loop of dependencies between multiple columns is detected, these columns are classified as having a circular dependency. Because of the circular dependency between columns, the calculation cannot be performed correctly, thus blocking the automatic calculation process of the corresponding column. For example, column 1 references column 2, but column 2 references column 1. Column 1 requires the result from column 2 to be calculated before it can be calculated, and column 2 also requires the result from column 1 to be calculated before it can be calculated. As a result, neither column 2 nor column 1 can be calculated to obtain a result. Figure 1 This is a diagram illustrating a multidimensional table with circular dependencies. For example... Figure 1 As shown, the "Start Quantity" in column 1 depends on the "End Quantity" in column 2 for calculation, while the "Start Quantity" in column 1 also depends on the "End Quantity" in column 2 for calculation. This creates a circular dependency between columns 1 and 2, leading to calculation errors. When this occurs, error codes are automatically populated in the cells of columns 1 and 2 of the multidimensional table to prompt the user to adjust the dependency between columns 1 and 2 to ensure normal calculation. However, in multidimensional tables, such circular dependencies may be pseudo-circular dependencies. A pseudo-circular dependency means that the calculation references between the cells in the columns forming the circular dependency do not form a closed loop, and there is no true circular reference conflict in the cell calculation process. Figure 2 This is a diagram illustrating the dependency information in column 1 of the multidimensional table. Figure 3 This is a diagram illustrating the dependency information in column 2 of a multidimensional table. For example... Figure 2 As shown, the dependency information for column 1 is "cross-row association," meaning that the cells in column 1 reference the content of the cell in the previous row of column 2. Therefore, the cell referenced by the first row of cells in column 1 does not actually exist, and its content is 0 by default without the need for data source calculation. Figure 3As shown, the dependency information for column 2 is [@starting quantity] + 100, which means the content of the same row cell in column 1 plus 100 equals the content of the same row cell in column 2. Therefore, the actual content of the first row cell in column 2 is 100. The second row cell in column 1 references the first row cell in column 2, so the content of the second row cell in column 1 is 100, and so on. In fact, the content of all cells in both column 1 and column 2 can be calculated, and there is no closed-loop calculation conflict. Therefore, existing data processing systems cannot distinguish between pseudo-cyclic dependencies and true cyclic dependencies, and may misidentify pseudo-cyclic dependencies as true cyclic dependencies, causing users to repeatedly correct inter-column dependencies and affecting the automatic calculation efficiency of multidimensional tables. Summary of the Invention
[0004] This application provides a table detection method, apparatus, device, and storage medium to determine whether some or all cells in multiple column nodes that form a circular dependency relationship form a circular dependency relationship, and to determine multiple column nodes as unprocessable nodes when cells form a circular dependency relationship. This solves the problem of misidentifying false circular dependencies as true circular dependencies in the prior art, reduces the number of times users manually correct inter-column dependencies, and improves the processing efficiency of multidimensional tables.
[0005] Firstly, this application provides a table detection method, including: Multiple link points are selected from each column node of the table to be processed, and at least two link points form a cyclic dependency relationship. If multiple nodes form a cyclic dependency relationship, then those multiple nodes are identified as unprocessable nodes.
[0006] Secondly, this application provides a form detection device, comprising: The link point determination module is configured to filter out multiple link points in each column node of the table to be processed, wherein at least two of the multiple link points form a cyclic dependency relationship. The module for determining unprocessable nodes is configured to determine the multiple node links as unprocessable nodes when there are cells forming a loop dependency relationship among the multiple node links.
[0007] Thirdly, this application provides a form detection device, comprising: One or more processors; A memory that stores one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the table detection method as described in the first aspect.
[0008] Fourthly, this application provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the table detection method as described in the first aspect.
[0009] In this application, column-level filtering is performed on the table to be processed to identify multiple nodes with closed-loop dependencies from the column nodes. Then, cell-level verification is performed on these nodes to determine whether the cells corresponding to them form closed-loop dependencies. If conflicts arise in the cells indicating closed-loop dependencies, these nodes are identified as unprocessable nodes. This dual-layer detection mechanism of column-level filtering and cell-level verification overcomes the limitations of judging loop dependencies solely based on column-to-column dependencies, accurately distinguishing between false and true loop dependencies. This solves the problem of existing technologies misidentifying false loop dependencies as true loop dependencies, avoiding repeated corrections of column-to-column dependencies by users, reducing unnecessary operations on the table, improving processing efficiency, and enhancing ease of use. Furthermore, it correctly handles infinite loops caused by true loop dependencies, reducing unnecessary calculations for true loop dependencies and improving the reliability and efficiency of the table in complex business scenarios. Attached Figure Description
[0010] Figure 1 This is a diagram of a multidimensional table with circular dependencies. Figure 2 This is a diagram illustrating the dependency information in column 1 of the multidimensional table; Figure 3 This is a diagram illustrating the dependency information in column 2 of the multidimensional table; Figure 4 This is a flowchart of a table detection method provided in an embodiment of this application; Figure 5 This is a schematic diagram of the dependency topology graph provided in the embodiments of this application; Figure 6 This is a flowchart of a cell for detecting whether multiple link points form a cyclic dependency relationship, provided in an embodiment of this application; Figure 7 This is one of the schematic diagrams of the starting dirty cell and dependent cells provided in the embodiments of this application; Figure 8 This is a schematic diagram illustrating the process of determining whether cells form a cycle through a computation stack, provided in an embodiment of this application. Figure 9 This is a second schematic diagram of the starting dirty cell and dependent cells provided in the embodiments of this application; Figure 10 This is a schematic diagram of the structure of a table detection device provided in an embodiment of this application; Figure 11This is a schematic diagram of the structure of a table detection 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. A process can be terminated when its operation is completed, but it may also have additional steps not included in the drawings. A process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0012] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0013] In common existing implementations, dependency detection and calculation in multidimensional table data processing systems rely solely on column dependencies for dependency cycle determination. In a multidimensional table, records are stored in rows, with each column being a field. Cells within a column can only accept content conforming to the field's preset type. Besides setting the field type, this field can also define dependencies with other fields, ensuring that all cells within that field have those dependencies. In other words, dependencies are managed through the column dependencies of the cell's parent column. When multiple columns are found to form a closed loop, they are identified as having a circular dependency. Due to this circular dependency, calculations cannot be performed correctly, thus blocking the automatic calculation process for the corresponding column. For example, column 1 references column 2, but column 2 references column 1. Column 1 requires column 2 to be calculated before it can be calculated, and column 2 also requires column 1 to be calculated before it can be calculated, resulting in neither column 2 nor column 1 being able to calculate the result. (Reference) Figure 1In a multidimensional table, the "Start Quantity" of column 1 depends on the "End Quantity" of column 2 for calculation, while the "Start Quantity" of column 1 also depends on the "End Quantity" of column 2 for calculation. This creates a circular dependency between columns 1 and 2, leading to calculation errors. When this occurs, error codes are automatically populated in the cells of columns 1 and 2 to prompt the user to adjust the dependency between columns 1 and 2 to ensure normal calculation. However, in multidimensional tables, such circular dependencies may be pseudo-circular dependencies. A pseudo-circular dependency means that the calculation references between the cells in the columns forming the circular dependency do not form a closed loop, and there is no true circular reference conflict in the cell calculation process. (Reference) Figure 2 The dependency information for column 1 is "cross-row association," meaning that cells in column 1 reference the content of the cell in the previous row of column 2. Therefore, the cell referenced by the first row of cells in column 1 does not actually exist, and its content is 0 by default, requiring no data source for calculation. (Reference) Figure 3 The dependency information for column 2 is [@starting quantity] + 100, meaning the content of the same row cell in column 1 plus 100 equals the content of the same row cell in column 2. Therefore, the actual content of the first row cell in column 2 is 100. The second row cell in column 1 references the first row cell in column 2, so the content of the second row cell in column 1 is 100, and so on. In fact, the content of all cells in columns 1 and 2 can be calculated, and there is no closed-loop calculation conflict. In contrast to pseudo-cyclic dependencies, when the calculation references of cells in columns forming a circular dependency relationship form a closed loop, the corresponding result cannot be calculated due to circular reference conflicts. This type of inter-column circular dependency relationship can be defined as a true circular dependency. Therefore, existing detection methods that only detect circular dependencies based on inter-column dependencies cannot accurately distinguish between pseudo-cyclic dependencies where cell calculation references do not form a closed loop and true circular dependencies where cell calculation references form a closed loop. During table processing, pseudo-cyclic dependencies are misidentified as true circular dependencies, requiring users to modify the inter-column dependencies of pseudo-cyclic dependencies, resulting in a large number of invalid operations and affecting the processing efficiency of multidimensional tables. Because the inter-column dependencies of pseudo-loop dependencies are not inherently misdefined, in many cases, after multiple attempts to correct the inter-column dependencies of pseudo-loop dependencies, users find that they still cannot solve the problem of the table being unable to be calculated. As a result, they delete the column data of pseudo-loop dependencies and stop using multidimensional tables to process this part of the column data, which seriously affects the applicability of multidimensional tables in complex business scenarios.
[0014] To address the aforementioned issues, this embodiment provides a table detection method that utilizes a two-layer detection mechanism of column-level filtering and cell-level validation. This overcomes the limitations of relying solely on inter-column dependencies to determine circular dependencies, thereby accurately distinguishing between false and true circular dependencies. This avoids users repeatedly correcting inter-column dependencies of false circular dependencies, reducing unnecessary operations on the table, improving processing efficiency, and enhancing ease of use. Furthermore, it correctly handles infinite loops caused by true circular dependencies, reducing unnecessary calculations related to true circular dependencies and improving the reliability and efficiency of the table in complex business scenarios.
[0015] The table detection method provided in this embodiment can be executed by a table detection device, which can be implemented through software and / or hardware. The table detection device can consist of two or more physical entities, or it can consist of a single physical entity. For example, the table detection device can be a terminal device with multidimensional table processing tools installed, such as a computer, tablet, or mobile phone. The multidimensional table processing tools are applications or browsers with functions for importing, generating, and processing multidimensional tables. The application can be multidimensional table application software. The browser supports online processing of multidimensional tables.
[0016] The table detection device is equipped with at least one type of operating system, including but not limited to Android, Linux, and Windows. The table detection device can install at least one application based on the operating system; this application can be a built-in application of the operating system or an application downloaded from a third-party device or server. In this embodiment, the table detection device has at least one application capable of executing table detection methods.
[0017] For ease of understanding, this embodiment uses a multidimensional table application software as the main body for executing the table detection method.
[0018] Figure 4 A flowchart of a table detection method provided in an embodiment of this application is given. (Reference) Figure 4 The specific methods for detecting this form include: S110. Select multiple link points from each column node of the table to be processed, and at least two link points among the multiple link points form a cyclic dependency relationship.
[0019] The table to be processed is a multidimensional table whose content needs to be updated. For example, when a user modifies the content of a cell or the dependency information of a column in a multidimensional table, the content of other cells or columns that reference that cell or column for calculations or other processing needs to be updated accordingly. In this case, the multidimensional table application software recognizes the multidimensional table as a table to be processed.
[0020] In the table to be processed, each column is treated as a column node. The multidimensional table application software determines the dependent columns of each column node based on the dependency information of each column. For example, if the content of column A is processed using the content of column B, then column B can be called a dependent column of column A; that is, the content of a column depends on the content of its dependent column for processing. The dependency information describes the relationship between columns and their dependent columns. Dependency information can be calculation formulas, command text, field associations, etc. When the dependency information is a calculation formula, the formula defines which columns' cell content in the table the corresponding column depends on for calculation. For example, if the calculation formula for column B is column B = column A + 100, then column A is a dependent column of column B, and column B is a column that column A depends on. Alternatively, when the dependency information is command text, the command text defines which columns' cell content in the table the corresponding column depends on to generate its corresponding content. For example, if the command text for the "Weather" column is to search for the weather in the "Location" column, then the "Weather" column is a column that column "Location" depends on. When the dependency information is a field association, the field association defines which columns' cell content the column's cell content directly uses. Figure 2 The "Start Quantity" column is shown to be linked to "End Quantity" in a different row. Therefore, the content of the "Start Quantity" cell is the same as the content of the cell preceding the "End Quantity" cell. When the content of the "End Quantity" cell is modified, the content of the cell in the next row after "Start Quantity" must also be modified. In this case, "End Quantity" becomes the dependent column of "Start Quantity," and "Start Quantity" becomes the dependent column of "End Quantity."
[0021] In multidimensional spreadsheet applications, column dependency information can be quickly set using an advanced function editor. Each column field has a corresponding advanced function editor, which offers various field types (such as formulas, lookup references, and AI fields). Users can choose the appropriate field type from the available options. Then, the dependency syntax is selected within the field type, and the column identifiers of the dependent columns are entered. Formulas and AI fields may require additional parameters or requirements. The advanced function editor generates the corresponding column dependency information based on the dependency syntax, the column identifiers of the dependent columns, and any additional parameters or requirements. Dependency syntax includes whole-column dependency syntax, row-level dependency syntax, and cross-row dependency syntax, among others. The column dependency syntax restricts the content of all cells in a column to depend on the content of every cell in the dependent column. The syntax is `[field]`, where `[field]` is the column identifier of the dependent column. The row dependency syntax restricts the content of cells in a column to depend on the content of cells in the same row as the dependent column. The syntax is `[@field]`, where `[@field]` is the column identifier of the dependent column. The cross-row dependency syntax restricts the content of cells in a column to depend on the content of the cell above or below the dependent column. The syntax is `cross-row dependency [field]`, where `[field]` is the column identifier of the dependent column. Of course, the advanced function editor supports setting multiple dependent columns, with different dependency relationships selected for different columns. For example, after selecting the advanced function editor for column B, the user selects the addition formula field type provided by the advanced function editor, chooses the row dependency syntax in the addition formula field type, enters the column identifier of column A, and changes the addition parameter to 100, thus forming the formula: Column B = [@Column A] + 100. Alternatively, after selecting the advanced function editor for the summary column field, the user can choose the content summary field type within the AI field, and then select the peer-to-peer dependency syntax and enter the column identifier for the text column to generate the instruction text for the summary column summarizing the [@text column]. Alternatively, after selecting the advanced function editor for the "Start Quantity" column field, the user can choose the lookup reference field type, select the cross-row association syntax, and enter the column identifier for the "End Quantity" column to generate cross-row association information between the "Start Quantity" column and the "End Quantity" column.
[0022] This embodiment allows for quick setting of dependency information for each column in a multidimensional table using an advanced function editor, enabling convenient management of inter-column dependencies.
[0023] After determining the dependent columns of the outgoing nodes, a dependency topology graph can be built based on the dependent columns of the column nodes. In the dependency topology graph, column nodes are pointed to by the column nodes of their dependent columns. For example, if column A is a dependent column of column B, then column A points to column B. Figure 5 This is a schematic diagram of the dependency topology graph provided in an embodiment of this application. For example... Figure 5As shown, the table to be processed includes column nodes A, B, C, D, E, and F. Column nodes B and C depend on column node A, column nodes A and C depend on column node D, column nodes D and E depend on column node F, and column node F depends on column node C.
[0024] After constructing the dependency topology graph, it can be traversed to determine if any column nodes form a cycle of dependencies. These cycle-dependent columns are then identified as loop nodes. A cycle of dependencies refers to a closed loop formed between corresponding cells or columns. (Reference) Figure 5 If column node D depends on column node F, column node F depends on column node C, and column node C depends on column node D, and these three column nodes form a closed loop, then column node D, column node F, and column node C are determined as link nodes.
[0025] Optionally, if multiple sets of nodes satisfying different cycle dependencies exist in the columns of the multidimensional table, the nodes corresponding to each cycle dependency are stored in the corresponding node set. That is, nodes on a closed cycle dependency are in the same node set. During subsequent true and false cycle detection, the corresponding nodes in each node set are detected individually to accurately identify the node sets of false cycle dependencies and true cycle dependencies, ensuring accurate differentiation between true and false cycles.
[0026] This embodiment filters out nodes with cyclic dependencies from all column nodes of the table to be processed, thus locking down the set of nodes suspected of having cyclic dependencies. This avoids invalid detection of columns without dependencies and ensures the targeted nature of subsequent processing. That is, in the subsequent true / false cycle detection stage, only column nodes with cyclic dependencies are used as verification objects, improving detection efficiency while avoiding the introduction of detection errors. Furthermore, columns without dependencies can be updated in parallel without waiting for the results of true / false cycle determination, ensuring the efficiency of table updates.
[0027] S120. Detect whether there are cells that form a cyclic dependency relationship among multiple link points.
[0028] For example, since multidimensional tables manage dependencies through inter-column dependencies, the dependency information of a cell is represented by the dependency information of its column. When there are circular reference conflicts between cells of multiple nodes, the cell content cannot be processed normally. The reason why the cell content cannot be processed is that the dependency information of the node is incorrect, causing the candidate node to form a true circular dependency. The correctness of the dependency information of the node can be distinguished by whether there are cells with circular dependencies between multiple nodes, that is, distinguishing whether the node is a true circular dependency or a false circular dependency.
[0029] After identifying multiple nodes that form circular dependencies, the dependencies between individual cells within each node can be further clarified. Based on these dependencies, it can be determined whether any cells form circular dependencies. If cells with circular dependencies exist, it indicates that the content of these cells cannot be processed correctly, suggesting that the node's dependency information is incorrect, resulting in a true circular dependency. Therefore, this node is identified as an unprocessable node. Conversely, if no cells with circular dependencies exist, it indicates that the content of each cell within the node can be processed normally, suggesting that the node's dependency information is correct, resulting in a false circular dependency. Therefore, this node is identified as a processable node.
[0030] In one embodiment, a processable node indicates that the node is a node from which a result can be computed, and an unprocessable node indicates that the node is a node from which a result cannot be computed.
[0031] This embodiment introduces cell-level circular dependency detection on the basis of column-level filtering to verify whether the cells corresponding to the node truly form a circular dependency relationship, thus achieving accurate differentiation between true and false circular dependencies.
[0032] For example, refer to Figures 1-3 Column 1, "Start Quantity," is linked to Column 2, "End Quantity," in a different row. Column 2, "End Quantity," is dependent on Column 1, "Start Quantity," in the same row. Columns 1 and 2 form a circular dependency, thus being identified as a loop node in step S110. Step S120 breaks down the dependencies of each cell in Columns 1 and 2, finding that cells in Column 2 depend on cells in the same row of Column 1, and each row of cells in Column 1 depends on the row above it in Column 2. The zeroth row of Column 2, which the first row of cells in Column 1 depends on, does not exist, meaning the first row of cells in Column 1 depends on the null value 0. Based on the dependencies between cells in Columns 1 and Column 2, it can be determined that the cells in the two columns do not form a circular dependency. Therefore, the circular dependency between Columns 1 and Column 2 can be identified as a pseudo-circular dependency, and Columns 1 and 2 are identified as processable nodes.
[0033] It should be noted that the detection step S120 is for a single set of node points. That is, step S120 will only determine whether there are cells forming a cycle dependency relationship among multiple node points in a single set, and will not detect multiple set of node points at the same time to avoid false detections. If multiple set of node points are selected in step S110, step S120 will be executed multiple times until all set of node points has been detected.
[0034] When detecting whether multiple nodes in a set of nodes have cells forming a cyclic dependency relationship, the direct dependent cells of each cell can be determined based on the dependency information of each cell in the node set. The content of each cell depends on the content of its direct dependent cells for processing. A dependency topology graph of cells is constructed based on the cells and their corresponding dependent cells. If a closed loop exists in the dependency topology graph, it is determined that multiple nodes have cells forming a cyclic dependency relationship; if no closed loop exists in the dependency topology graph, it is determined that multiple nodes do not have cells forming a cyclic dependency relationship.
[0035] However, multidimensional tables involve large amounts of data and a large number of cells representing key nodes. Constructing the dependency topology graph for all cells consumes significant resources and computation, leading to low processing efficiency. In reality, only a subset of cells may form cyclic dependencies, and the overall dependency topology graph belongs to the global topology. The cyclic dependencies formed by these isolated cells only constitute a portion of the global topology, thus representing a local topology. Therefore, the construction of the global topology involves inefficient processes, resulting in wasted resources and time.
[0036] Based on this, this embodiment proposes using any cell from multiple link points as the starting cell, and generating a corresponding dependency topology structure based on the starting cell. Cells in this dependency topology structure are indirectly or directly referenced by the starting cell; that is, cells in the dependency topology structure are direct or indirect dependent cells of the starting cell. Specifically, the content of the starting cell directly references the content of its directly dependent cells, and vice versa. It can be understood that the dependency topology structure of the starting cell belongs to a local topology structure in the dependency topology graph of all cells. This embodiment simplifies the construction of the global topology structure to the construction of a local topology structure, effectively reducing the computational load required for construction, thereby improving the detection efficiency of closed-loop cells.
[0037] Perform loop closure detection on the dependency topology corresponding to the starting cell. If a loop exists in the dependency topology (a loop is determined as long as any two or more cells form a loop, regardless of whether the starting cell is included in the loop), then multiple nodes are identified as having cells forming a cyclic dependency relationship. If no loop exists in the dependency topology, continue to obtain the next starting cell and construct its corresponding dependency topology until a dependency topology with a closed loop is determined. Alternatively, if the dependency topology corresponding to the last starting cell also lacks a closed loop, it can be determined that multiple nodes do not have cells forming a cyclic dependency relationship.
[0038] It should be noted that, apart from the starting cell, the other cells in the dependency topology do not have dependencies on cells outside the dependency topology. The starting cell only forms directed acyclic dependencies with cells outside the dependency topology. Therefore, once it is confirmed that the dependency topology corresponding to the starting cell does not have a closed loop, all cells in the dependency topology corresponding to the starting cell can be removed from the set of cells to be detected. This avoids repeatedly constructing the same local dependency topology and improves the detection efficiency of closed loop cells.
[0039] In one embodiment, all cells in the node set can be marked as dirty to indicate that they are cells to be detected within the node. A starting dirty cell is randomly selected from the dirty cell set. Based on the dependency topology corresponding to the starting dirty cell, it is detected whether multiple nodes have cells forming a cyclic dependency relationship. If no cyclic dependency relationship is detected in the dependency topology corresponding to the starting dirty cell, the dirty attribute of the starting dirty cell in the dependency topology is cleared. Then, starting dirty cells are selected from the remaining dirty cell set, effectively avoiding the construction of dependency topologies in the same local area.
[0040] For example, Figure 6 This is a flowchart provided in an embodiment of this application for detecting whether multiple link points form a cyclic dependency relationship. For example... Figure 6 As shown, the steps for detecting whether multiple nodes have cells that form a cyclic dependency relationship specifically include S1201-S1203: S1201. Mark each cell of multiple nodes as a dirty cell, and obtain the starting dirty cell from the current dirty cells.
[0041] For example, after filtering out the set of process nodes, the cells of each process node in the set are marked as dirty and stored in a dirty cell set. A dirty cell is randomly selected from the dirty cell set as the starting dirty cell.
[0042] S1202: Recursively query the dependent cells corresponding to the starting dirty cell. The starting dirty cell directly or indirectly depends on the dependent cells.
[0043] For example, based on the dependency information of the starting dirty cell, the corresponding direct dependent cell is queried. The content of the starting dirty cell is processed based on the dependency information and the content of the direct dependent cells. Then, based on the dependency information of the direct dependent cells of the starting dirty cell, the corresponding direct dependent cells are queried. At this point, the queried cells are the indirect dependent cells of the starting dirty cell. And so on, the direct dependent cells of the indirect dependent cells are queried as the indirect dependent cells of the starting dirty cell.
[0044] For example, Figure 7 This is one of the schematic diagrams of the starting dirty cell and dependent cells provided in the embodiments of this application. For example... Figure 7 As shown, D1 and D2 are Figure 5 Cells F1 and F2 in the first and second rows of column node D are... Figure 5 The cells C1 and C2 in the first and second rows of column node F are... Figure 5 The cells in the first and second rows of column node C. Assuming D1 is the starting dirty cell, the dependent cells of F1, F2, C1, C2, and D2 can be determined through recursive queries, where D1 directly depends on F1, and indirectly depends on F2, C1, C2, and D2.
[0045] Optionally, a computation stack can be used to cache the dependent cells of the initial dirty cell, and the cells stored in the computation stack can be used to quickly determine whether there is a closed loop between the initial dirty cell and its corresponding dependent cells when querying dependent cells. Specifically, the initial dirty cell is stored in an empty computation stack; after storing cells in the computation stack, the top cell of the computation stack is retrieved, and the direct dependent cells of the top cell are determined; if the direct dependent cell is a dirty cell, it is checked whether the direct dependent cell is stored in the computation stack; if the direct dependent cell is not stored in the computation stack, it is stored in the computation stack. The computation stack follows a last-in, first-out (LIFO) characteristic, meaning that when the initial dirty cell or a direct dependent cell is stored at the top of the computation stack, it will be retrieved as the top cell of the computation stack in the next step. If the initial dirty cell has multiple direct dependent cells, these multiple direct dependent cells are stored in the computation stack, and the last directly dependent cell added is retrieved from the top of the computation stack as the next top cell to be checked. Of course, if only some of the multiple direct dependent cells are dirty, the dirty cells are stored at the top of the computation stack.
[0046] This embodiment uses Figure 8 The process of determining whether cells form a cycle by calculating a stack is illustrated below as an example. Figure 8As shown, after marking the cells of each node in the node set as dirty, a dirty cell set is generated. The initial dirty cell is extracted from this dirty cell set and stored at the top of an empty computation stack. Then, the initial dirty cell is retrieved from the top of the stack and used as the top cell. Next, the direct dependent cells of the top cell (which is also the initial dirty cell) are retrieved, and it is determined whether these direct dependent cells are dirty cells. If a direct dependent cell is dirty, it is checked whether it exists in the computation stack. However, since only the initial dirty cell exists in the stack, the direct dependent cell does not exist, and it is then stored in the stack. After the direct dependent cell is stored in the stack, it is retrieved from the top of the stack as the new top cell. The direct dependent cells of the new top cell are determined, and these direct dependent cells are the indirect dependent cells of the initial dirty cell. If the direct dependent cells of the new top cell are dirty and do not exist in the stack, they are stored in the stack, and then the new top cell is retrieved again, repeating the above process.
[0047] It should be noted that the description of obtaining the top cell of the computation stack in this embodiment can be understood as viewing the top cell of the computation stack. Therefore, after obtaining the top cell of the computation stack, this top cell is still retained in the computation stack for subsequent determination of whether other top cells directly depend on the existing cells in the computation stack, thereby detecting that the computation stack stores cells forming a cyclic dependency relationship. In this case, when the dirty attribute of the top cell is canceled, the top cell is removed from the computation stack and is no longer retained in the computation stack. (See reference...) Figure 7 Assuming D2 is the initial dirty cell, F2 is found to be a directly dependent cell. Since F2 is dirty and not yet stored in the computation stack, it is added to the stack and becomes the new top cell. Then, C2 is found to be a directly dependent cell. Since C2 is dirty and not yet stored in the stack, it is added to the stack and becomes the new top cell, and so on, until C1 is added to the stack and becomes the new top cell. C1's direct dependent cell is D2, which is dirty and stored in the stack. This confirms that the cells stored in the stack form a circular dependency relationship.
[0048] This embodiment utilizes a computation stack to store the dirty attribute dependent cells of the starting dirty cell, so as to quickly determine whether the starting dirty cell and the dirty attribute dependent cells form a cyclic dependency relationship, thereby improving the efficiency of dependency cycle detection.
[0049] In another embodiment, after obtaining the initial dirty cell, the dependent cells corresponding to the initial dirty cell can be queried from the dirty cell set. The queried dependent cells are then considered dirty cells. Furthermore, a computation stack is also used to cache the initial dirty cell and its corresponding dependent cells. Specifically, the initial dirty cell is stored in an empty computation stack. After storing cells in the computation stack, the top cell of the computation stack is obtained. The direct dependent cells of the top cell are determined from the dirty cell set. If the direct dependent cells are not stored in the computation stack, they are stored in the computation stack.
[0050] In the above embodiments, when determining the direct dependent cells of the top cell of the stack, the direct dependent cells of the top cell can be determined based on the dependency information of the top cell. The dependency information of the top cell describes how the content of the top cell is determined based on the columns and cells mentioned in the dependency information.
[0051] Optionally, dependency information can be a calculation formula, where the columns and / or cells corresponding to the calculation parameters in the formula are the dependent columns and / or dependent cells of the top cell in the stack. After determining the dependent columns and / or dependent cells of the top cell based on its calculation formula, all cells in the dependent columns and / or dependent cells are identified as the direct dependent cells of the top cell. Alternatively, dependency information can also be instruction text, where the columns and / or cells referenced in the instruction text are the dependent columns and / or dependent cells of the top cell. After determining the dependent columns and / or dependent cells of the top cell based on its instruction text, all cells in the dependent columns and / or dependent cells are identified as the direct dependent cells of the top cell.
[0052] In one embodiment, the dependency information of the top cell of the stack involves two types: static dependency information and dynamic dependency information. Static dependency information defines a fixed dependency relationship between the top cell and its dependent columns and / or dependent cells; that is, the dependency relationship of the top cell does not change with the content of the dependent columns and / or dependent cells. For example, when the calculation formula of the top cell is N1 = N2 + N3, it indicates that column N1, containing the top cell, is obtained by adding columns N2 and N3. Changes in the content of columns N2 and N3 will not affect this calculation formula; therefore, this calculation formula is a static calculation formula. Dynamic dependency information defines a dynamically changing dependency relationship between the top cell and its dependent columns and / or dependent cells; that is, the dependency relationship of the top cell changes with the content of the dependent columns and / or dependent cells. For example, if the instruction text in the top cell of the stack is "Search for the weather in locations south of the Tropic of Cancer", it means that the weather content in the top cell is determined by the location content in each location column. Changes in the location content in the location columns will cause changes in the weather content in the top cell of the stack. Therefore, this instruction text is dynamic instruction text.
[0053] Because static and dynamic dependency information lead to different logics for determining the direct dependent cells of the top cell in the stack, to accurately determine whether a node contains cells forming a cyclic dependency, the corresponding direct dependent cells can be determined based on the static or dynamic dependency information of the top cell. Of course, before determining the direct dependent cells, it's necessary to first determine whether the dependency information of the top cell is static or dynamic. For example, the various calculation formulas and instruction texts in the multidimensional table can be pre-defined as either static or dynamic dependency information. The calculation formula or instruction text of the top cell can then be compared with the pre-defined types of static and dynamic dependency information to determine whether it is static or dynamic.
[0054] Furthermore, when the dependency information of the top cell is static dependency information, the dependent cells and / or cells in the dependent columns corresponding to the static dependency information are identified as the direct dependent cells of the top cell. For example, when the calculation formula of the top cell is N1 = N2 + N3, it indicates that column N1, where the top cell is located, is obtained by adding columns N2 and N3. Therefore, the cells in columns N2 and N3 that are in the same row as the top cell are identified as dependent cells of the top cell, and thus, the cells in columns N2 and N3 that are in the same row as the top cell are identified as the direct dependent cells of the top cell. Alternatively, if the calculation formula of the top cell is K1 = ... This indicates that the top cell K2 is obtained by adding all cells in column N2, thus determining that all cells in column N2 are direct dependent cells of the top cell. In this embodiment, when the dependency information of the top cell is static dependency information, each cell in the dependent column of the top cell and / or the dependent cells are taken as direct dependent cells, ensuring accurate selection of the direct dependent cells of the top cell.
[0055] When the dependency information of the top cell in the stack is dynamic, the directly dependent cells are determined from the dependent cells and / or dependent columns based on the content of the dependent cells and / or dependent columns corresponding to the dynamic dependency information. It can be understood that when the dependency information of the top cell is dynamic, only the dependent cells and / or dependent columns mentioned in the dynamic dependency information whose content satisfies the constraints in the dynamic dependency information are used to determine the content of the directly dependent cells. Therefore, based on the content of the dependent cells and / or dependent columns corresponding to the dynamic dependency information, cells whose content satisfies the constraints in the dynamic dependency information can be filtered out as directly dependent cells. For example, if the dynamic dependency information of the top cell is "search for weather south of the Tropic of Cancer", then the location cells south of the Tropic of Cancer in the location column can be determined as the directly dependent cells of the top cell. In this embodiment, when the dependency information of the top cell of the stack is dynamic dependency information, cells that meet the constraints in the dynamic dependency information are selected based on the content of the dependency column and / or the dependency cells as the direct dependent cells of the top cell of the stack. This ensures the accurate selection of direct dependent cells, avoids irrelevant cells from affecting the cell cycle detection, and ensures the accurate distinction between true cycle dependencies and false cycle dependencies.
[0056] In this embodiment, dynamic dependency information can be further refined into direct dynamic dependency information and indirect dynamic dependency information. Direct dynamic dependency information defines the direct use of the content of cells that satisfy the constraints to determine the content of the top cell in the stack, such as the aforementioned "searching for weather at locations south of the Tropic of Cancer" being direct dynamic dependency information. Indirect dynamic dependency information defines condition cells and result cells. Condition cells are all cells in the dependent cells and / or dependent columns used to determine whether the constraints are satisfied, and result cells are the cells that participate in determining the content of the top cell in the stack. A condition cell is associated with at least one result cell, and when a condition cell satisfies the constraints, the associated result cell is used to determine the content of the top cell in the stack.
[0057] Specifically, when the dynamic dependency information of the top cell of the stack is indirect, the cells and / or dependent cells of the dependent column can be divided into condition cells and result cells based on the dynamic dependency information. The target result cell is determined in the result cell based on the content of the condition cell. The condition cell and the target result cell are then identified as the direct dependent cells of the top cell. The target result cell is the result cell used to determine the content of the top cell, filtered by the content and constraints of the condition cells. In other words, the top cell is actually determined based on the condition cell and the target result cell, while other result cells besides the target result cell do not participate in the actual processing. Therefore, only the condition cell and the target result cell are identified as the direct dependent cells of the top cell.
[0058] For example, the dynamic dependencies of IF, XLOOKUP, and Range_IF classes in multidimensional tables are all indirect dynamic dependencies. The IF class defines constraints, condition cells, true cells, and false cells. When the content of a condition cell satisfies the constraint, the true cell is used as the target result cell to determine the content of the top cell in the stack; when the content of a condition cell does not satisfy the constraint, the false cell is used as the target result cell. The XLOOKUP class defines constraints, lookup value cells, condition columns, and return value columns. It can use the lookup value cell and each cell in the condition column as condition cells, and each cell in the return value column as a result cell. Then, based on the lookup value cell, it finds the row containing cells that satisfy the constraints in the condition column, and the corresponding cell in the return value column is determined as the target result cell. The dynamic dependency information of the range_if class defines constraints, condition columns, statistical condition cells, and statistical columns. Each cell in the statistical condition cells and condition columns can be used as a condition cell, and each cell in the statistical columns can be used as a result cell. Then, based on the statistical condition cells, the row containing the cells that meet the constraints in the condition columns is found, and the cell in the corresponding row in the statistical columns is used as the target result cell.
[0059] After identifying the target result cell, the target result cell and the condition cell are determined as the direct dependent cells of the top cell of the stack.
[0060] In this embodiment, when the dependency information of the top cell of the stack is indirect dynamic dependency information, the dependency column and dependency cell can be divided into condition cells and result cells based on the indirect dynamic dependency information. The condition cells are treated as direct dependency cells, and the result cells associated with the condition cells that meet the constraints are also treated as direct dependency cells. This avoids treating cells that do not participate in the actual processing of the top cell of the stack as direct dependency cells, ensuring the accurate screening of direct dependency cells, thereby improving the detection accuracy of subsequent loop cells.
[0061] As discussed above, when the dependency information of the top cell in the stack is dynamic, the direct dependent cells of the top cell will be affected by the content of the dependent cells and / or dependent columns. Furthermore, the top cell may become a dependent cell and / or dependent column of other top cells. Therefore, the accuracy of the top cell's content will affect the accuracy of the direct dependent cells of other top cells. For further information, please refer to... Figure 8 After identifying the direct dependent cells of the top cell in the stack, and assuming the direct dependent cells are not dirty cells, the content of the top cell is updated based on its dependency information and the content of its direct dependent cells. The updated content is used for subsequent filtering of direct dependent cells that satisfy dynamic dependencies with the top cell. After updating the content of the top cell, its dirty attribute is removed, and it is deleted from the calculation stack. Dynamic dependencies refer to the dependency relationships between the top cell and its direct dependent cells when the dependency information of the top cell is dynamic. When the direct dependent cells of the top cell are not dirty cells, the content of the top cell can be precisely determined based on the content of its direct dependent cells and the dependency information. If the dependency information is a calculation formula, the content of the direct dependent cells is substituted into the formula to obtain the new content of the top cell, and this new content replaces the original content. If the dependency information is instruction text, the relevant information of the content of the direct dependent cells is queried according to the instructions in the dependency information, such as querying the weather for the location of the direct dependent cell. The queried weather information is used as the new content of the top cell, replacing the original content. After updating the content of the top cell of the stack, if the condition cell of the subsequent new top cell is the updated content of that cell, it can be determined whether the constraint condition is met based on the updated content of that cell. If it is met, the associated result cell is selected as the direct dependency cell of the new top cell, thereby ensuring the accurate matching of the direct dependency cells of the new top cell. In this embodiment, after determining the direct dependency cells of the top cell, when the top cell is confirmed as a computable cell that does not form a circular dependency relationship, the top cell is calculated so that the direct dependency cells of other top cells can be accurately filtered based on the content of the top cell, thereby improving the detection accuracy of subsequent circular cells.
[0062] It should be noted that even if some top cells of the stack have their corresponding content calculated, if a loop of cells is still detected in the link node, then all cells of the link node, including the top cell of the updated content, will be identified as cells that cannot be calculated. Then, error codes will be filled into the cells that cannot be calculated to prompt the user that the dependency relationship of the column containing these cells is incorrect.
[0063] S1203. Based on the starting dirty cell and the corresponding dependent cell, detect whether there are cells forming a circular dependency relationship among multiple nodes; if no cells forming a circular dependency relationship are detected, cancel the dirty attribute of the starting dirty cell and the corresponding dependent cell, and obtain a new starting dirty cell.
[0064] For example, a local topology is generated by the starting dirty cell and its corresponding dependent cells. Based on whether a closed loop formed by the dirty cells exists in the local topology, if it does, it is confirmed that multiple nodes have cells forming a loop dependency relationship; otherwise, the dirty attribute of the starting dirty cell and its corresponding dependent cells is cleared and they are removed from the dirty cell set. Then, the next starting dirty cell is obtained from the dirty cell set, and steps S1202 and S1203 are executed. When the dirty cell set is empty, and a local topology with a closed loop formed by dirty cells has not yet been generated, it can be confirmed that no cells forming a loop dependency relationship exist among the nodes.
[0065] It should be noted that if the dependent cells of the starting dirty cell are recursively queried in the dirty cell set, then if the local topology generated by the starting dirty cell and the corresponding dependent cells has a closed loop, it can be confirmed that there are cells with cyclic dependencies among multiple nodes. Otherwise, the dirty attributes of the starting dirty cell and the corresponding dependent cells are cleared and removed from the dirty cell set.
[0066] Furthermore, when storing the dependent cells of the initial dirty cell through a computation stack, it is possible to detect whether multiple stage points have cells forming cyclic dependencies based on the cells stored in the computation stack and the currently queried directly dependent cells. Specifically, if the directly dependent cell corresponding to the top cell of the stack is not a dirty cell, the dirty attribute of the top cell of the stack is canceled, a new top cell of the stack is obtained from the computation stack, and the directly dependent cell of the new top cell of the stack is determined. When the directly dependent cell of the top cell of the stack is not a dirty cell, it indicates that the top cell of the stack does not depend on any cell in the stage point for processing. At this time, the top cell of the stack breaks out of the constraint of the cyclic dependency relationship of the stage point and can be processed normally to obtain the corresponding content. Therefore, the dirty attribute of the top cell of the stack can be canceled to indicate that it is a processable cell. If a new top cell of the stack depends on this processable cell, the new top cell of the stack can be further confirmed as a processable cell, thereby gradually canceling the dirty attribute of cells in the stage point that do not form cyclic dependencies, sorting out the dependency logic of cells in the stage point, and accurately determining whether the cyclic dependency relationship of the stage point is a true cyclic dependency or a false cyclic dependency.
[0067] refer to Figure 8 After obtaining the direct dependent cell corresponding to the top cell of the stack, it is determined whether the direct dependent cell is a dirty attribute. If it is a dirty attribute, it is checked whether the direct dependent cell exists in the computation stack. If it is not a dirty attribute, the top cell of the stack is processed to update its content, so that the content of the top cell can be used to accurately determine whether it is a direct dependent cell of other top cells of the stack. After processing the top cell to update its content, the dirty attribute of the top cell of the stack is removed and it is deleted from the computation stack. Then it is checked whether the computation stack is empty. If it is not empty, a new top cell is obtained from the computation stack. If it is empty, a new starting dirty cell is obtained from the dirty cell set. For example, Figure 9 This is a second schematic diagram of the starting dirty cell and dependent cells provided in the embodiments of this application. For example... Figure 9As shown, C2 is the initial dirty cell, directly dependent on cell F2. Subsequently, F2, D2, C1, F1, and D1 can be used as the top cells of the stack. When the top cell is D1, it can be determined that its directly dependent cell is null. Since null values have no dirty attribute, it can be determined that the top cell D1 does not depend on any cell in the node for processing. Therefore, the dirty attribute of the top cell D1 is canceled, and the content of D1 is updated. The top cell D1 is then removed from the computation stack. The new top cell is then determined to be F1. F1's directly dependent cell is D1. Since D1's dirty attribute has been canceled, it becomes a processable cell. Therefore, the top cell F1 does not depend on dirty cells, and its dirty attribute can be canceled and it is removed from the computation stack. At this point, the new top cell becomes C1. This process continues until the dirty attribute of C2 is canceled and it is removed from the computation stack, leaving the computation stack empty. After the computation stack becomes empty, the next starting dirty cell is obtained from the dirty cell set. The dirty attributes of F2, D2, C1, F1 and D1 are also removed from the dirty cell set after they are canceled. These cells will no longer be used as starting dirty cells, thus filtering the dirty cell set.
[0068] In this embodiment, when the directly dependent cell is not a dirty cell, it indicates that the top cell of the stack will not form a circular dependency with other dirty cells, thereby clearing the dirty attribute of the top cell of the stack. This filters out the processable cells that will not form a circular dependency, avoids repeated circular dependency detection on processable cells and causes detection errors, and improves detection efficiency and detection accuracy.
[0069] If the cell directly dependent on the top cell of the stack is a dirty cell and is stored in the computation stack, then multiple step nodes are identified as having cells that form a cyclic dependency relationship. (Reference) Figure 8 After obtaining the directly dependent cell corresponding to the top cell of the stack, it is determined whether the directly dependent cell is a dirty cell. If it is a dirty cell, it is determined whether the directly dependent cell exists in the computation stack. If the directly dependent cell exists in the computation stack, it is determined that the cells form a cycle, thus confirming that multiple nodes have cells forming a cycle dependency relationship. In this embodiment, when the directly dependent cell is a dirty cell and stored in the computation stack, it indicates that the top cell of the stack has formed a closed loop with the dirty cells in the computation stack, thus confirming that multiple nodes have cells forming a cycle dependency relationship. It is not necessary to fully construct the local topology structure of the initial dirty cell, but only to detect the closed loop, which effectively improves the efficiency of cycle dependency detection and achieves accurate and fast detection of cells forming a cycle dependency relationship.
[0070] Since the top cell of the stack is viewed from the computation stack, directly depending on the cell being stored in the computation stack means that it is currently being stored in the computation stack, for example... Figure 7If D2 is the starting dirty cell currently stored in the computation stack, and the top cell of the stack is C1, and its direct dependent cell is D2, then it can be determined that the cells D2, F2, C2, D1, F1, and C1 currently stored in the computation stack have a cyclic dependency relationship. This confirms that multiple nodes have cells that form a cyclic dependency relationship.
[0071] In another embodiment, if a dirty cell in the computation stack is a direct dependency cell of the top cell determined directly from the dirty cell set, then if no direct dependency cell of the top cell is found in the dirty cell set, it can be confirmed that the top cell does not depend on the cells of the cycle points for computation. Therefore, the dirty attribute of the top cell is removed, and the next top cell is retrieved from the computation stack. If a direct dependency cell of the top cell is found in the dirty cell set, and this direct dependency cell is stored in the computation stack, then it is determined that multiple cycle points have cells forming a cyclic dependency relationship.
[0072] S130. In the case where multiple nodes have cells that form a cyclic dependency relationship, the multiple nodes are identified as unprocessable nodes.
[0073] For example, when multiple nodes are found to have cyclic dependencies, it indicates that the dependency information of multiple nodes is incorrect. At this time, multiple nodes can be marked as unprocessable nodes, and the user can be notified in the table that multiple nodes are unprocessable nodes so that the user can correct the dependency information of multiple nodes in time, thus ensuring the processing efficiency and accuracy of the multidimensional table.
[0074] Furthermore, after identifying multiple process nodes as unprocessable nodes, if other column nodes in the multidimensional table depend on this unprocessable node, then that column node is also identified as an unprocessable node. (Reference) Figure 5If node E depends on node F, then after nodes E, C, and D are identified as unprocessable nodes due to cells forming a cyclic dependency, node E also becomes unprocessable and is thus identified as an unprocessable node as well. This embodiment identifies column nodes that depend on true cyclic dependencies as unprocessable nodes to avoid spending time processing the content of such column nodes when processing multidimensional tables, eliminating unnecessary processing steps and improving the processing efficiency of multidimensional tables. Although the aforementioned steps mention processing the content of cells in column nodes that do not form cyclic dependencies, when a column node is identified as an unprocessable node, all cell contents of that column node are identified as unprocessable cells, including cells whose content has already been processed. This is because multidimensional tables manage dependencies through inter-column dependencies, and if some columns have cyclic dependencies, it indicates that the column dependency information is incorrect, requiring modification of the column dependency information to ensure that the multidimensional table correctly manages the dependencies of each column. When the dependency information of a column is modified, the dependent cells within that column change, causing the cell content to change as well. The content of the cells in the column needs to be reprocessed or the column's true cycle dependency needs to be reassessed. Therefore, the processed content in cells cannot be used as the final cell content displayed in the table, and these cells must also be set as unprocessable cells.
[0075] It should be noted that nodes forming true cycles cannot be processed due to conflicting dependencies, requiring manual user intervention to correct these dependencies. Column nodes dependent on nodes with true cycles, however, are not unprocessable because of incorrect dependencies, but rather because the node's content cannot be accessed. In this case, users do not need to manually correct the dependencies; instead, the node should be marked as processable only after the user has corrected the dependencies. Therefore, the reasons for the unprocessability of nodes forming true cycles and column nodes dependent on them are different. Different markings can be used for these two types of unprocessable nodes to prompt users to correct the dependencies of unprocessable nodes and to temporarily skip unprocessable column nodes that depend on them during multidimensional table processing. For example, the error code "CIRCULAR" can be filled in the cells of nodes in the multidimensional table to prompt users to correct the dependencies of the corresponding nodes, while other types of error codes can be filled in the cells of column nodes that depend on them to indicate that users do not need to correct the dependencies of the corresponding column nodes.
[0076] S140. In the case where there are no cells that form a loop dependency among multiple process nodes, the multiple process nodes are identified as normal processing nodes.
[0077] For example, if there are cells forming a circular dependency relationship among multiple stage points, it indicates that the cells of the stage points can be processed normally. In this case, the circular dependency relationship among multiple stage points is confirmed to be a false circular dependency. The dependency relationship is correct and does not require user correction. Thus, multiple stage points are marked as normal processing nodes so that the normal processing nodes can be processed to update the cell content of the normal processing nodes when processing multidimensional tables.
[0078] Furthermore, after identifying multiple process nodes as normal processing nodes, if other column nodes in the multidimensional table depend on these normal processing nodes, then those column nodes are also identified as normal processing nodes. (Reference) Figure 5 If node E depends on node F, then after nodes E, C, and D are determined to be processed normally because there are no cells forming a cycle dependency, node E can also be processed normally, thus also being determined as a normal processing node. This embodiment determines column nodes that depend on nodes with spurious cycle dependencies as normal processing nodes to ensure that all nodes with logically consistent dependencies can be processed when processing multidimensional tables, guaranteeing the accuracy of multidimensional table processing.
[0079] In summary, the table detection method provided in this application performs column-level filtering on the table to be processed to identify multiple nodes with closed-loop dependencies from the column nodes of the table. Then, it performs cell-level verification on these multiple nodes to determine whether the cells corresponding to the multiple nodes form a closed-loop dependency. When conflicts of closed-loop dependencies exist in cells, the multiple nodes are identified as unprocessable nodes. Through the above technical means, a dual-layer detection mechanism of column-level filtering and cell-level verification can overcome the limitation of judging cyclic dependencies solely based on inter-column dependencies, thereby accurately distinguishing between false and true cyclic dependencies. This solves the problem of existing technologies misidentifying false cyclic dependencies as true cyclic dependencies, avoids users repeatedly correcting inter-column dependencies of false cyclic dependencies, reduces invalid operations on the table, improves table processing efficiency, and enhances the ease of use of the table. Furthermore, it also ensures the correct handling of infinite loops caused by true cyclic dependencies, reduces unnecessary calculations for true cyclic dependencies, and improves the reliability and efficiency of the table in complex business scenarios.
[0080] Based on the above embodiments, Figure 10 This is a schematic diagram of a table detection device provided in an embodiment of this application. (Reference) Figure 10 The table detection device provided in this embodiment specifically includes: a node determination module 21 and an unprocessable node determination module 22.
[0081] Among them, the link point determination module 21 is configured to filter out multiple link points in each column node of the table to be processed, and at least two link points among the multiple link points form a cyclic dependency relationship. The module 22 for determining unprocessable nodes is configured to determine multiple nodes as unprocessable nodes when multiple nodes have cells that form a loop dependency relationship.
[0082] Based on the above embodiments, the table detection device includes a loop detection module, which includes: a start acquisition submodule, configured to filter out multiple loop points in each column node of the table to be processed, mark each cell of the multiple loop points as a dirty cell, and obtain the start dirty cell from the current dirty cells; a dependency query submodule, configured to recursively query the dependent cells corresponding to the start dirty cell, wherein the start dirty cell directly or indirectly depends on the dependent cells; and a loop detection submodule, configured to detect whether there are cells forming a loop dependency relationship among the multiple loop points based on the start dirty cell and the corresponding dependent cells; when no cells forming a loop dependency relationship are detected, the dirty attribute of the start dirty cell and the corresponding dependent cell is canceled, and a new start dirty cell is obtained.
[0083] Based on the above embodiments, the dependency query submodule includes: a first push unit configured to store the initial dirty cell into an empty computation stack; a dependency query unit configured to obtain the top cell of the computation stack after storing the cell in the computation stack, and determine the direct dependent cell of the top cell; a storage detection unit configured to detect whether the direct dependent cell is stored in the computation stack if the direct dependent cell is a dirty cell; and a second push unit configured to store the direct dependent cell into the computation stack if the direct dependent cell is not stored in the computation stack.
[0084] Based on the above embodiments, the loop detection submodule includes: a dirty attribute elimination unit, configured to cancel the dirty attribute of the top cell when the directly dependent cell is not a dirty cell, obtain a new top cell in the calculation stack and determine the directly dependent cell of the new top cell; and / or, a loop confirmation unit, configured to confirm that multiple link points have cells that form a loop dependency relationship when the directly dependent cell is a dirty cell and is stored in the calculation stack.
[0085] Based on the above embodiments, the dependency query unit includes a dependency query subunit, which is configured to determine the direct dependent cells of the top cell of the stack based on the dependency information of the top cell of the stack.
[0086] Based on the above embodiments, the dependency query sub-unit is specifically configured to determine the dependent cells corresponding to the static dependency information and / or each cell in the dependency column as the direct dependent cells of the top cell when the dependency information of the top cell is static dependency information.
[0087] Based on the above embodiments, the dependency query sub-unit is specifically configured to determine the directly dependent cell in the dependent cell and / or dependent column based on the content of the dependent cell and / or the content of the dependent column corresponding to the dynamic dependency information when the dependency information of the top cell of the stack is dynamic dependency information.
[0088] Based on the above embodiments, the dependency query sub-unit is further configured to divide each cell and / or dependency cell of the dependency column into condition cells and result cells based on dynamic dependency information; determine the target result cell in the result cell according to the content of the condition cell; and determine the condition cell and the target result cell as the direct dependency cells of the top cell of the stack.
[0089] Based on the above embodiments, the ring formation detection module further includes: a cell update submodule, configured to, after determining the directly dependent cells of the top cell, update the content of the top cell based on the dependency information of the top cell and the content of the directly dependent cells, provided that the directly dependent cells are not dirty cells; the updated content of the cell is used for subsequent filtering of directly dependent cells that satisfy the dynamic dependency relationship with the top cell.
[0090] Based on the above embodiments, the unprocessable node determination module 22 further includes an unprocessable node determination submodule, configured to determine a column node as an unprocessable node when the column node depends on the unprocessable node after multiple link nodes have been determined as unprocessable nodes.
[0091] The table detection device provided in this application, as described above, performs column-level filtering on the table to be processed to identify multiple nodes with closed-loop dependencies from the column nodes of the table. Then, it performs cell-level verification on these multiple nodes to determine whether the cells corresponding to the multiple nodes form a closed-loop dependency. When a conflict of closed-loop dependencies exists in a cell, the multiple nodes are identified as unprocessable nodes. Through this technical means, a dual-layer detection mechanism of column-level filtering and cell-level verification can overcome the limitation of judging loop dependencies solely based on inter-column dependencies, thereby accurately distinguishing between false and true loop dependencies. This solves the problem of existing technologies misidentifying false loop dependencies as true loop dependencies, avoids users repeatedly correcting inter-column dependencies of false loop dependencies, reduces invalid operations on the table, improves table processing efficiency, and enhances the ease of use of the table. Furthermore, it also ensures the correct handling of infinite loops caused by true loop dependencies, reduces unnecessary calculations for true loop dependencies, and improves the reliability and efficiency of the table in complex business scenarios.
[0092] The table detection device provided in this application embodiment can be used to execute the table detection method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0093] Figure 11 This is a schematic diagram of the structure of a table detection device provided in an embodiment of this application, with reference to... Figure 11 The table detection device includes a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The number of processors 31 and the number of memories 32 in the table detection device can be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the table detection device can be connected via a bus or other means.
[0094] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the table detection method in any embodiment of this application (e.g., the node determination module 21 and the unprocessable node determination module 22 in the table detection device). The memory 32 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 32 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 may further include memory remotely located relative to the processor, 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.
[0095] The communication device 33 is used for data transmission.
[0096] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 32, thereby realizing the table detection method described above.
[0097] Input device 34 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 35 may include display devices such as a display screen.
[0098] The table detection device provided above can be used to execute the table detection method provided in the above embodiments, and has corresponding functions and beneficial effects.
[0099] This application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a table detection method. The table detection method includes: filtering out multiple link points in each column node of the table to be processed, wherein at least two link points form a cyclic dependency relationship; and determining multiple link points as unprocessable nodes when there are cells forming a cyclic dependency relationship among the multiple link points.
[0100] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, 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 disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it 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 residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0101] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the table detection method described above, but can also perform related operations in the table detection method provided in any embodiment of this application.
[0102] The table detection device, storage medium, and table detection equipment provided in the above embodiments can execute the table detection method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the table detection method provided in any embodiment of this application.
[0103] 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 described 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 this application is determined by the scope of the claims.
Claims
1. A table detection method, characterized in that, include: Multiple link points are selected from each column node of the table to be processed, and at least two link points form a cyclic dependency relationship. If multiple nodes form a cyclic dependency relationship, then those multiple nodes are identified as unprocessable nodes.
2. The table detection method according to claim 1, characterized in that, After filtering out multiple process nodes from the various column nodes of the table to be processed, the process includes: Mark each cell of the multiple node points as a dirty cell, and obtain the starting dirty cell from the current dirty cells; Recursively query the dependent cells corresponding to the starting dirty cell, where the starting dirty cell directly or indirectly depends on the dependent cells; Based on the initial dirty cell and its corresponding dependent cells, it is detected whether there are cells forming a cyclic dependency relationship among the multiple nodes; if no cells forming a cyclic dependency relationship are detected, the dirty attribute of the initial dirty cell and its corresponding dependent cells is canceled, and a new initial dirty cell is obtained.
3. The table detection method according to claim 2, characterized in that, The recursive query of the dependent cells corresponding to the starting dirty cell includes: Store the initial dirty cell into an empty compute stack; After the cell is stored in the calculation stack, the top cell of the calculation stack is obtained, and the directly dependent cells of the top cell are determined. If the directly dependent cell is a dirty cell, check whether the directly dependent cell is stored in the computation stack; If the directly dependent cell is not stored in the computation stack, the directly dependent cell is stored in the computation stack.
4. The table detection method according to claim 3, characterized in that, The step of detecting whether there are cells forming a cycle dependency relationship among the multiple link points based on the initial dirty cell and the corresponding dependent cells includes: If the directly dependent cell is not a dirty cell, remove the dirty attribute of the top cell of the stack, obtain a new top cell in the computation stack, and determine the directly dependent cells of the new top cell; and / or, If the directly dependent cell is a dirty cell and is stored in the computation stack, it is confirmed that there are cells forming a cyclic dependency relationship among the multiple node points.
5. The table detection method according to claim 3, characterized in that, Determining the directly dependent cells of the top cell of the stack includes: The direct dependent cells of the top cell of the stack are determined based on the dependency information of the top cell of the stack.
6. The table detection method according to claim 5, characterized in that, The process of determining the directly dependent cells of the top cell of the stack based on the formula of the top cell includes: If the dependency information of the top cell of the stack is static dependency information, the dependent cells and / or each cell in the dependency column corresponding to the static dependency information are determined as the direct dependent cells of the top cell of the stack.
7. The table detection method according to claim 5, characterized in that, Determining the direct dependent cells of the top cell based on the dependency information of the top cell includes: If the dependency information of the top cell of the stack is dynamic dependency information, the directly dependent cell is determined from the dependent cell and / or the dependent column based on the content of the dependent cell and / or the content of the dependent column corresponding to the dynamic dependency information.
8. The table detection method according to claim 7, characterized in that, The step of determining directly dependent cells in the dependent cells and / or dependent columns based on the content of the dependent cells and / or dependent columns corresponding to the dynamic dependency information includes: Based on the dynamic dependency information, each cell in the dependency column and / or the dependency cell is divided into a condition cell and a result cell; The target result cell is determined in the result cell based on the content of the condition cell; The condition cell and the target result cell are determined as the direct dependent cells of the top cell of the stack.
9. The table detection method according to claim 3, characterized in that, After determining the direct dependent cells of the top cell of the stack, the method further includes: If the directly dependent cell is not a dirty cell, the content of the top cell is updated based on the dependency information of the top cell and the content of the directly dependent cell; the updated content of the cell is used for subsequent filtering of directly dependent cells that satisfy the dynamic dependency relationship with the top cell.
10. The table detection method according to claim 1, characterized in that, After determining the plurality of process nodes as unprocessable nodes, the method further includes: If a column node depends on an unprocessable node, the column node is identified as an unprocessable node.
11. A form detection device, characterized in that, include: The link point determination module is configured to filter out multiple link points in each column node of the table to be processed, wherein at least two of the multiple link points form a cyclic dependency relationship. The module for determining unprocessable nodes is configured to determine the multiple node links as unprocessable nodes when there are cells forming a loop dependency relationship among the multiple node links.
12. A form detection device, characterized in that, include: One or more processors; A memory that stores one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the table detection method as described in any one of claims 1-10.
13. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the table detection method as described in any one of claims 1-10.