Table updating method and device, equipment and storage medium
By generating change events and limiting the scope of processing, the problem of invalid calculations in spreadsheets is solved, resulting in more efficient data updates and faster response times.
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
In existing technologies, spreadsheets have low data update efficiency because the expansion of the calculation scope leads to a large number of invalid calculations, especially when cell dependencies spread.
By generating change events, recording the row identifier of the cell whose content has changed, and sending it to the dependent columns, updates are only made when the latest processing result of the cell to be processed is different from its own content. The processing scope is limited to the dependent cells of the cell whose content has changed, and column-based storage management is used instead of row-based management.
It effectively reduces the amount of cell processing and updating, improves the response speed and efficiency of the spreadsheet system, reduces operating resources, and reduces monitoring and processing costs.
Smart Images

Figure CN121809431A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of table calculation, and in particular to a table updating method and device, equipment and a storage medium. BACKGROUND
[0002] In a data organization and processing tool such as an electronic table, to meet the multi-data joint calculation in a complex business scenario, a flexible formula calculation node can be used to flexibly process multiple cell data. The result of each calculation node can be used as the dependent input of the next calculation node, thereby forming a nested calculation relationship of cell data. When the referenced cell data changes, all the subsequently dependent cell data needs to be recalculated.
[0003] In the prior art, the data updating of the electronic table mainly adopts an updating method of first static dirty diffusion and then calculation. Specifically, after a user modifies the cell data of the electronic table, the cell data that depends on the changed cell is marked dirty, and then the dirty cell is calculated by the calculation reference, and the content of the corresponding cell is updated based on the calculation result. However, this method causes the calculation range to expand when the dirty diffusion is performed, such as the dependent relationship of the entire column reference causing the dirty diffusion to the entire column and then to the remaining columns, but actually part of the cells are not calculated, which undoubtedly causes a large amount of invalid calculation and affects the data updating efficiency of the electronic table. SUMMARY
[0004] The present application provides a table updating method, device, equipment and storage medium to constrain the processing range of the table in the dependent cells of the content change cell, avoid the processing range from spreading to the entire column cell to cause a large amount of invalid processing, effectively reduce the cell processing amount and updating amount, and solve the problem of low data updating efficiency of the electronic table in the prior art.
[0005] In a first aspect, the present application provides a table updating method, comprising: When a change occurs in any column of the table, a corresponding change event is generated according to the content change cell of the changed column, and the change event records the row identifier of the content change cell; The change event is sent to the dependent column of the changed column, the dependent column determines the to-be-processed cell according to the change event, and in the case that the latest processing result of the to-be-processed cell is different from the content itself, the content of the to-be-processed cell is changed to the latest processing result.
[0006] In a second aspect, the present application provides a table updating device, comprising: The change event generation module is configured to generate a corresponding change event according to a content change cell when a change occurs in any column of a table, the change event recording a row identifier of the content change cell; The cell change module is configured to send the change event to a dependent column of the change column, determine a to-be-processed cell according to the change event by the dependent column, and change content of the to-be-processed cell to a latest processing result in a case where the latest processing result is different from the content of the to-be-processed cell.
[0007] In a third aspect, the present application provides a table updating device, comprising: one or more processors; a memory storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the table updating method as described in the first aspect.
[0008] In a fourth aspect, the present application provides a storage medium containing computer executable instructions for executing the table updating method as described in the first aspect when executed by a computer processor.
[0009] In the present application, when any column of the table is changed, a corresponding change event is generated according to the content of the changed cell, the change event records the row identifier of the changed cell; the change event is sent to the dependent column of the changed column, the dependent column determines the to-be-processed cell according to the change event, and in the case that the latest processing result of the to-be-processed cell is different from the content of the to-be-processed cell, the content of the to-be-processed cell is changed to the latest processing result. Through the above technical means, the dependent column can generate a change event based on the content changed cell and send it to the dependent column, so that the dependent column determines the to-be-processed cell based on the row identifier carried in the change event, thereby limiting the processing range to the dependent cells of the content changed cell, avoiding the whole column of the dependent column being marked dirty and expanding the processing range, effectively reducing the cell processing amount and the update amount, reducing the running resources required for table updating, and improving the response speed of the table system. In addition, the table is originally a data structure composed of rows, and generally uses row management. However, the present application manages the change event in the dimension of column, which actually replaces the row management mode or the cell management mode with the column storage management mode, so that any operation on the cell data is uniformly maintained through the column, facilitating concurrent design for the column, and reducing the monitoring and processing cost by changing the monitoring from cell to column. For example, when multiple cells in the column are changed, the column can be uniformly maintained, that is, a corresponding change event is generated according to the content of the changed cell, which can be sent to the dependent column in a whole or concurrent manner, and the dependent column can also mark dirty and process concurrently according to the change event, thereby accelerating the efficiency of the whole table marking dirty and processing. Moreover, in the column management mode, the table maintains the relationship between each other through the column, and connects the dependent relationship between each other through the event, that is, the change event is directed to the dependent column, so that the dependent column quickly responds to the change event and timely updates the corresponding dependent cell, without waiting for the table to mark dirty and process all cells and then uniformly calculate and process, thereby further improving the response speed of the table system. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 is a table diagram of static dirty diffusion provided by an embodiment of the present application; Figure 2 is a flowchart of a table updating method provided by an embodiment of the present application; Figure 3 is a schematic diagram of a change event pushing process provided by an embodiment of the present application; Figure 4 is a schematic diagram of a topology structure and processing sequence provided by an embodiment of the present application; Figure 5 is a schematic diagram of a directed dependent topology structure provided by an embodiment of the present application; Figure 6This is a schematic diagram of the cell to be processed in the table provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of a table updating device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a table update 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 one implementation, spreadsheet data updates primarily employ a method of first statically labeling and spreading dirty data across the entire spreadsheet, followed by overall calculation. Specifically, after a user modifies cell data in the spreadsheet, the cells that are hierarchically dependent on the modified cell are labeled as dirty. Then, a calculation reference performs an overall calculation on the labeled dirty cells, and the content of the corresponding cells is updated based on the calculation result. Specifically, if the spreadsheet manages dependencies through cell dependencies, labeling hierarchically dependent cells can be done by labeling directly or indirectly dependent cells based on the cell dependencies of the modified cell. If the spreadsheet manages dependencies through the columns to which cells belong, labeling hierarchically dependent cells can be done by labeling all cells in the columns to which the modified cell belongs, including all cells in those columns. However, regardless of the dependency management method used by the spreadsheet, the above update method leads to an expansion of the calculation scope during dirty data diffusion. For example, a dependency relationship involving an entire column reference can cause the error message to spread throughout the entire column and then to other columns. However, some cells, because the content of the dependent cells has not been modified, are not recalculated. This undoubtedly results in a large amount of invalid calculations, affecting the data update efficiency of the spreadsheet. For example, Figure 1 This is a schematic diagram of static dirt diffusion provided in an embodiment of this application. For example... Figure 1As shown, each cell in column B depends on any cell in column A, and each row of cells in column C depends on the corresponding row of cells in column B. The calculation formula for column B is: if the sum of column A > 0, column B = column E * 1.2; if the sum of column A <= 0, column B = column E. The calculation formula for column C is column B * 1.5. A change in any cell in column A may cause a change in the entire cell in column B, and a change in a row of cells in column B will cause a change in the corresponding row of cells in column C. When a user modifies the content of cell 4 in row A, due to the dependencies between column B and column A, and between column B and column C, all cells in column B and all cells in column C are marked as dirty. Then, all cells in column B and all cells in column C are calculated and updated. For example, a change in row 4 of column A causes the actual calculation formula in column B to change from column B = column E to column B = column E * 1.2, which will dirty all cells in column B, and then dirty all cells in column C. In reality, if all cells in column E except for rows 2 and 5 have values of 0, resulting in only rows 5 and 2 of column B having changed content, then only rows 5 and 2 of column C need to be calculated. This means that the update mode after static dirty label diffusion performs invalid calculations on most cells in column C, affecting the table's update efficiency. Moreover, when the table finally calculates all the dirty cells, it needs to re-examine the dependencies between each dirty cell to ensure calculation accuracy. This re-examination of dependencies and the accumulation of calculations for a large number of cells will undoubtedly further reduce the table's update efficiency.
[0014] To address the aforementioned issues, this embodiment provides a table update method that confines the processing scope of the table to the dependent cells of the cells whose content has changed, preventing the processing scope from spreading to the entire column and causing a large amount of invalid processing, thus effectively reducing the amount of cell processing and updates. Furthermore, once a dependent cell is identified, the corresponding dependent cell is updated promptly, without waiting for a final unified calculation of all marked cells, further improving the response speed of the table system. Additionally, this application manages change events at the column level, essentially replacing row-based or cell-based management with column-based storage and maintenance management. This ensures that any operation on cell data is maintained uniformly through the column, facilitating concurrent design for that column and changing the monitoring from monitoring cell changes to monitoring column changes, reducing monitoring and processing costs.
[0015] The table update method provided in this embodiment can be executed by a table update device, which can be implemented through software and / or hardware. The table update device can consist of two or more physical entities, or a single physical entity. The table update method supports hierarchical dirtying and calculation for both ordinary tables and multidimensional tables, rather than overall dirtying followed by overall calculation. In an ordinary table, each cell manages its dependencies through inter-cell relationships. That is, when calculating the content of a cell in an ordinary table, the corresponding dependent cells can be determined based on the dependency information of the cell content, and the content of that cell can be calculated based on the content of the dependent cells. In a multidimensional table, each row is a record unit, and each column is a field. Cells in a column can only input content that conforms to the preset type of the field. In addition to setting the field type, the field can also set dependencies with other fields, so that all cells under that field have that dependency. That is, the dependencies of each cell in a multidimensional table are managed through the inter-column dependencies of the column to which the cell belongs. Of course, multidimensional tables can be compatible with the functions of ordinary tables to support setting cell dependencies and managing them through inter-cell dependencies.
[0016] Therefore, the table updating device can be a terminal device with a common table processing tool installed, or it can be a terminal device with a multidimensional table processing tool installed. The terminal device can be a computer, tablet, or mobile phone, etc. Among them, the multidimensional table processing tool is an application or browser with the function of importing, generating, and processing multidimensional tables. The application can be multidimensional table application software, and the browser supports online processing of multidimensional tables.
[0017] The form update device has at least one type of operating system installed, including but not limited to Android, Linux, and Windows. The form update 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 form update device has at least one application capable of executing the form update method. The application executing the form update method can be an application for opening and editing documents or a browser.
[0018] For ease of understanding, this embodiment uses a multidimensional table application software as the main body for executing the table update method as an example for description.
[0019] Figure 2 A flowchart of a table updating method provided in an embodiment of this application is given. (Reference) Figure 2 The specific methods for updating this table include: S110. When any column in the table changes, a corresponding change event is generated based on the content of the changed column and the change event record contains the row identifier of the changed cell.
[0020] In this context, a "content-changed cell" is a cell whose content has changed, and a "changed column" is a column where the content of any cell has changed. Changing cell content can be achieved through the following methods: directly modifying the cell content, changes in the content of dependent cells, changes in cell dependencies, and changes in the dependencies of the column containing the cell. These modifications—including changes in cell content, cell dependencies, and column dependencies—can be triggered by user modifications or by intelligent modification. Intelligent modification can involve modifying the dependencies of the column containing the cell. For example, if a user directly modifies row 4 of column A in the table, causing a change in the content of row 4, then row 4 is identified as the content-changed cell, and column A is identified as the changed column. Similarly, if intelligent modification of the dependency information of column A in the table at the column level causes a change in the content of every cell in column A, then every cell in column A is identified as a content-changed cell, and column A is identified as the changed column. For example, if the content of cell 4 in row A changes, cell 5 in row B depends on cell 4 in row A. After cell 5 in row B is processed according to the changed content of cell 4 in row B, its content also changes accordingly. In this case, column B is the changed column, and cell 5 in row B is the content changed cell.
[0021] When a cell in any column of a table changes due to cell modification, column modification, or diffusion processing, that cell is designated as a content-changed cell, and that column as a changed column. Then, a change event is generated based on the row identifiers of the content-changed cells in the changed column. This change event indicates which cells in the changed column the changed column is pushing their content changes to the dependent columns. The change event records the row identifiers of individual or all content-changed cells in the changed column. When a change event includes row identifiers of all content-changed cells, the changed column can send all row identifiers of all content-changed cells to the dependent columns. When a change event includes the row identifier of a single content-changed cell, the changed column can generate multiple change events for each row identifier of all content-changed cells, and then send these row identifiers concurrently to the dependent columns through these multiple change events. The dependent columns can then perform dirtying and processing based on the row identifiers of the content-changed cells carried in the change events.
[0022] In one embodiment, the multidimensional table application software sets up a corresponding column event center and column update proxy for the content updates and maintenance of each column. The column update proxy is used to update the cell content of the column and generate change events based on the updated cell content. The column event center is used to pass change events to the column event centers of other columns. For example, when a cell in any column changes due to cell modification, column modification, or diffusion processing, a cell modification operation is triggered. The multidimensional table application software sends the cell modification operation to the corresponding column update proxy, which responds to the cell modification operation by updating the content of the corresponding cell. After the cell content is updated, a change event is generated for the row identifier of the cell, and the change event is passed to the column event center, which then pushes the change event to the dependent columns. Alternatively, when the column update agent receives a change event from the column event center of the dependent column, it determines the cell to be processed based on the change event. After processing the new content of the cell to be processed, the column update agent compares whether the new content of the cell is the same as the original content. If they are not the same, the cell is updated with the new content and a change event is generated based on the row identifier of the cell. The change event is then passed to the column event center, which pushes the change event to the dependent column.
[0023] Multidimensional tables and regular tables are traditionally data structures composed of rows, typically managed in a row-based manner. However, this application manages change events by column, essentially replacing row-based or cell-based management with column-based storage and maintenance. This ensures that any operation on cell data is maintained uniformly through the column, facilitating concurrent design for that column and reducing monitoring and processing costs by shifting from monitoring cell changes to monitoring column changes. For example, when multiple cells in the aforementioned column undergo changes, they can be uniformly maintained by that column. Change events are generated based on the content of the changed column, and can be sent to dependent columns either holistically or concurrently. Dependent columns can also concurrently perform dirty checking and calculation based on change events, accelerating the overall dirty checking and calculation efficiency of the table. Furthermore, with column-based management, the table maintains relationships between columns and connects these dependencies through events. This enables the targeted propagation of change events to dependent columns, allowing them to quickly respond to change events and promptly update their corresponding dependent cells without waiting for the table to perform dirty checking on all cells before unified calculation, further improving the response speed of the table system.
[0024] S120. Send the change event to the dependent column of the changed column. The dependent column determines the cell to be processed based on the change event. If the latest processing result of the cell to be processed is different from its own content, change the content of the cell to be processed to the latest processing result.
[0025] In this context, the content of a cell in the dependent column depends on the content of the cell in the changing column for processing. In other words, the changing column is depended upon by the dependent column; it is a dependent column of the dependent column. The dependent column needs to update its own content based on the content of the changing column. For example, when the content of a cell in column B uses the content of a cell in column A, then column B is called the dependent column of column A, and column A is the dependent column of column B. Because the dependent column (such as column B) depends on the content of cells in the changing column (such as column A), when the content of a cell in the changing column changes, the content of the dependent column may also change. Therefore, it is necessary to process the content of the dependent column based on the content of the changing column to determine whether the content of the dependent column has changed.
[0026] Multidimensional table applications define the dependencies between corresponding columns and their dependent columns in the dependency information of each column. This dependency information allows you to determine the columns that a changed column depends on. The dependency information can include calculation formulas, instruction text, and field association information. When the dependency information is a calculation formula, the formula defines which columns' cell content in the table the corresponding column relies 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 dependent column of column A. After determining that column A is the changed column, the calculation formula for column B confirms that column B uses cell content from column A during its calculation, thus making column B the dependent column of the current changed column (column A). Alternatively, when the dependency information is instruction text, the instruction text defines which columns' cell content in the table the corresponding column relies on to generate its corresponding content. For example, if the instruction text for the "Weather" column is to search for the weather in the "Location" column, then the "Weather" column is a dependent column of the "Location" column. After identifying the "Location" column as the change column, the calculation formula for the "Weather" column confirms that the "Weather" column uses cell content from the "Location" column when filling, thus making the "Weather" column the dependent column for the current change column. When the dependency information is field association information, the field association information defines which columns' cell content is directly used by a column. For example, if the dependency information for "Start Quantity" is a cross-row association with "End Quantity," then the cell content of "Start Quantity" is the same as the previous cell content in "End Quantity." When the cell content of "End Quantity" is modified and it becomes the change column, the cell content of the next row of "Start Quantity" must also be modified, thus making "End Quantity" the dependent column for "Start Quantity."
[0027] 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.
[0028] 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.
[0029] It can retrieve the dependency information of each column in a table. If the dependency information involves a column that is being changed, that column is identified as the dependent column of the changed column, and the change event of the changed column is sent to the dependent column. For example, if column B is a dependent column and its calculation formula is column B = [@column A] + 100, then when column A is the changed column, the change event is sent to column B. As another example, if column B is a dependent column and its calculation formula is: when the sum of [column A] > 0, column B = [@column C] + 100; when the sum of [column A] <= 0, column B = [@column D] + 50, then when column A is the changed column, the change event is sent to column B. Similarly, columns C and D are also dependent columns of column B; when either column C or column D changes, the change event is sent to the dependent column B.
[0030] When each column of the table has a corresponding column event center and column update proxy, after the column update proxy of the changed column generates a change event, the column event center of the changed column sends the change event to the column event center of the dependent column. The column event center of the dependent column pre-subscribes to the change event of the changed column based on the dependency relationship between the dependent and dependent columns. For example, during table initialization or after the table's dependency information is updated, the dependent columns of each column are determined based on their dependency information, and the column event centers of these columns subscribe to the change events of the corresponding dependent columns. The dependency information indicates the dependency relationship between columns. This embodiment uses a subscription and push mode to transmit change events between the column event centers of the changed column and the dependent column. The changed column only needs to push the change event to the subscribed dependent column without needing to know the dependent column's judgment logic, eliminating the judgment step of the dependent column, reducing event transmission latency, and thus improving the response speed of change events.
[0031] It should be noted that the column event centers of each column in a table can communicate directly with each other. That is, the column event center of a changed column can push change events to the column event centers of its subscribed dependent columns. In addition, the table can also set a table event center to manage the subscription information of each column event center, thereby enabling indirect communication between the column event centers. Specifically, the changed column sends its change event to the table event center, which then queries the subscription information to identify the dependent columns that have subscribed to the change events of that changed column, and then pushes the change event to the column event center of the dependent column.
[0032] Furthermore, multidimensional table applications can manage multiple tables simultaneously, with table dependencies between them. For example, the column event center of a column that table B depends on might directly subscribe to the column event center of a changed column in table A, and the changed column event center in table A would then push change events directly to the column event center of the column that table B depends on. However, when multidimensional table applications involve multiple tables, direct subscriptions between column event centers across tables can lead to a large amount of subscription information being managed by each column event center. Since column event centers have relatively low processing capacity, managing a large amount of subscription information can affect their transmission efficiency, ultimately impacting the response speed of change events. To address this, a corresponding table event center can be set up for each table. The table event center manages the cross-table subscription information, and the table event center then handles the cross-table push of change events.
[0033] Specifically, in the case where the event center of the column being depended on subscribes to a change event of a changed column across tables, the event center of the changed column sends the change event to the first table event center, and the first table event center then sends the change event to the event center of the column being depended on via the second table event center; where the first table event center is the event center of the table to which the changed column belongs, and the second table event center is the event center of the table to which the dependent column belongs. For example, Figure 3 This is a schematic diagram of the change event push process provided in an embodiment of this application. For example... Figure 3As shown, when the content of cell 1 in row 1 of column A changes, a change event for column A is generated. Column event center A queries table A to find the dependent column that subscribes to this change event, which is column B. Therefore, it directly pushes the change event to column event center B. Column B, based on the change event received by column event center B, determines that the cell to be processed is cell 1 in row 1. Simultaneously, column event center A queries subscription information to confirm that other tables are subscribed to the corresponding change event. It then sends the change event to table event center A. Table event center A, as the event center of table A, manages the subscription information between table A and other tables. Table event center A, based on the subscription information, finds that table B is subscribed to the change event for column A in table A, and thus pushes the change event for table A to table event center B. Table event center B also manages the subscription information between table B and other tables. Table event center B, based on the subscription information, finds that column C is subscribed to the change event for column A in table A, and thus pushes the change event to column event center C. Column C, based on the change event received by column event center C, determines that the cell to be processed in column C is cell 1 in row 1. This embodiment manages cross-table subscription information through a table event center, so that the column event center does not need to care which column event center in the cross-table has subscribed to the change event. It only needs to confirm that there is a cross-table that has subscribed to its change event based on the subscription information, and then send the change event to the corresponding table event center. The table event center then pushes the change event across the table to the column event center of the dependent column. This simplifies the cross-table push operation and subscription management complexity of the column event center, thereby improving the efficiency of change event push.
[0034] After the change event is pushed from the column event center of the changed column to the column event center of the dependent column, the column event center of the dependent column forwards the received change event to the column update agent of the dependent column. The column update agent of the dependent column then processes the change event to determine the cell to be processed.
[0035] When determining cells to be processed based on change events, the dependent column can identify the cells that the content-changed cell depends on within each cell of the dependent column, based on the change event and the dependency information of the dependent column. These dependent cells are then designated as cells to be processed within the dependent column. The dependent cell is defined in the dependency information of the dependent column as having a dependency relationship with the content-changed cell; that is, the content of the dependent cell depends on the content of the content-changed cell for processing. For example, when the dependency information of the dependent column is set through the advanced function editor, which provides corresponding syntax for whole-column dependencies and row dependencies, the dependent cells of the content-changed cell can be determined based on the syntax of each dependent column in the dependency information, thus making these dependent cells the cells to be processed. For example, column B, as the dependent column, has the calculation formula column B = [@column A] + 100. When column A is the changing column, it sends the change event to column B. According to the syntax of [@column A], column B can determine that each row cell in itself has a dependency relationship with the same row cell in column A. According to the row identifier carried by the change event of column A, it can determine that the row cell corresponding to the row identifier is the dependent cell of the content change cell, and thus the row cell corresponding to the row identifier in column B is determined as the cell to be processed. For example, if column B is a dependent column, its calculation formula is: when the sum of [column A] is greater than 0, column B = [@column C] + 100; when the sum of [column A] is less than or equal to 0, column B = [@column D] + 50. When column A is the changing column, it sends a change event to column B. Based on the syntax of [column A] in the calculation formula, column B determines that each row of its cells has a dependency relationship with each cell in column A. Therefore, based on the row identifier carried by the change event of column A, it determines that all cells in column B are dependent cells of the content-changing cells, and thus determines all cells in column B as cells to be processed.
[0036] This embodiment utilizes the dependency information of the dependent column to accurately identify the dependent cells in the dependent column that have a dependency relationship with the content-changing cell, thereby determining the dependent cells as cells to be processed, avoiding invalid processing of cells in the dependent column that are unrelated to the content-changing cell, narrowing the processing scope of the table, and improving the table update efficiency.
[0037] Furthermore, cells in a dependent column that depend on cells whose content changes may not necessarily change accordingly. For example, if the calculation formula in column B is: when the sum of [column A] > 0, column B = [@column C] + 100; and when the sum of [column A] <= 0, column B = [@column D] + 50, if the sum of column A remains > 0 after the change, causing column B to still use the content of column C for calculation, then the content of column B will not change, and there is no need to designate it as a cell to be processed. Therefore, after identifying the dependent cells in the dependent column that depend on cells whose content changes, based on the content of the cells whose content changes and the dependency information of the dependent column, it can be determined whether the content of the dependent cells changes with the content of the cells whose content changes. If so, the dependent cells are designated as cells to be processed; otherwise, they are designated as cells not to be processed. For example, column B, as a dependent column, has the formula column B = [@column A] + 100. When column A is the changing column, it sends a change event to column B. Column B determines the cell in the corresponding row as the dependent cell of the content-changing cell in column A based on the row identifier carried by the change event. Moreover, the content of the dependent cell will change as the content of the content-changing cell in column A changes, thus identifying the dependent cell as the cell to be processed. As another example, when column B is a dependent column, its formula is: if the sum of [column A] > 0, column B = [@column C] + 100; if the sum of [column A] <= 0, column B = [@column D] + 50. When column A is the changing column, it sends a change event to column B. Column B determines all cells in column B as dependent cells of the content-changing cell in column A based on the calculation formula and the change event of column A (because any change in any cell in column A may change the processing procedure of all cells in column B). If the sum of column A after the content is changed is still greater than 0, and column B is still calculated based on the cell content of column C, and the cell content of column B will not change, then it is determined that all the cells that column B depends on are cells that have not been processed.
[0038] In summary, the dependency information of columns in a multidimensional table can be defined into two types: static dependency information and dynamic dependency information. Static dependency information defines a fixed and unchanging dependency relationship between the dependent and dependent columns; that is, the dependency relationship does not change with the content of the dependent column. For example, if the formula for column B is column B = column A + 100, it means that the content of column B's cells is obtained by adding 100 to the content of column A's cells. Regardless of changes in the content of column A, this calculation formula remains unaffected; therefore, this is static dependency information, where column B always depends on column A. Dynamic dependency information, on the other hand, defines a dynamic dependency relationship between the dependent and dependent columns; that is, the dependency relationship changes with the content of the dependent column. For example, the calculation formula for column B is: when the sum of [column A] is > 0, column B = [@column C] + 100; when the sum of [column A] is <= 0, column B = [@column D] + 50. This indicates that the final calculation formula used by column B is determined by the cell content of column A. This calculation formula is a dynamic dependency, meaning that when the sum of column A is > 0, column B depends on columns A and C; when the sum of column A is <= 0, column B depends on columns A and D.
[0039] In the above embodiments, if the dependency information of the dependent column is static dependency information, the dependent column can directly determine the dependent cell that depends on the content-changed cell corresponding to the row identifier as the cell to be processed based on the row identifier carried by the change event of the change column and its own dependency information. If the dependency information of the dependent column is dynamic dependency information, the dependent column can determine the dependent cell that depends on the content-changed cell based on the row identifier carried by the change event of the change column and its own dependency information. Then, based on the content of the content-changed cell or the cell content of the change column and the dependency information, it determines whether the dependent cell changes with the content of the content-changed cell. If so, the dependent cell is determined as the cell to be processed; otherwise, the dependent cell is determined as the cell to be unprocessed.
[0040] In this embodiment, only cells to be processed are marked as dirty and processed, while cells without processing are not marked as dirty. This embodiment determines dependent cells that do not change with the content of cells that change as cells with different content as cells without processing as cells without processing, thereby reducing the number of cells to be processed and improving the efficiency of table updates.
[0041] Furthermore, whether the dependent cell changes with the content of the cell whose content changes can be determined from two aspects: first, whether the content of the cell whose content changes participates in the final result processing of the dependent cell; and second, whether the content of the cell whose content changes alters the parameters involved in the final result processing of the dependent cell. If either of these conditions is met, the dependent cell is identified as a cell to be processed. Based on these two aspects, the columns involved in the dynamic dependency information of the dependent column can be divided into parameter columns and condition columns. The cell content of the parameter column is used to participate in the final result processing of the dependent column's cells, while the cell content of the condition column is used to filter the parameter columns involved in the final result processing of the dependent column's cells. The changing column, as one of the columns involved in the dynamic dependency information of the dependent column, is either a parameter column or a condition column. When the change column is a parameter column, the content of the cells in the condition column is used to determine whether the changed cells participate in the final result processing of the corresponding dependent cells in the dependent column. If so, the dependent cells are determined as cells to be processed; otherwise, they are determined as cells without processing. When the change column is a condition column, the content of the cells in the change column is used to determine whether the cells participating in the final result processing of the corresponding dependent cells have changed. If so, the dependent cells are determined as cells to be processed; otherwise, they are determined as cells without processing.
[0042] For example, column B, as a dependent column, has the following calculation formula: when the sum of [Column A] is > 0, column B = [@Column C] + 100; when the sum of [Column A] is <= 0, column B = [@Column D] + 50. Based on the calculation formula of column B, column A can be determined to be a condition column, while columns C and D are parameter columns. If column A is a changing column, and the content of any cell in column B depends on the content of the cell in column A that has changed, all cells in column B can be identified as dependent cells. The parameter column used to process the content of cells in column B is determined to be either column C or column D based on the content of the cells in column A after the change. If the parameter column of column B remains column C, it is determined that the content of cells in column B will not change, thus all dependent cells in column B are identified as cells without processing. If the parameter column of column B changes from column C to column D, it indicates that the cells involved in processing the content of each dependent cell in column B have changed, then all dependent cells in column B are identified as cells to be processed. If column C is the changed column, and cells in column B that are in the same row as cells in column C that have changed content depend on those cells, then those cells in column B that are in the same row as cells in column C can be identified as the dependent cells. Based on the content of cells in column A, determine whether the parameter column used to process the content of cells in column B is column C or column D. If the parameter column for column B is column C, then the dependent cells in column B are identified as cells to be processed. If the parameter column for column B is column D, since the content of cells in column D remains unchanged, the content of the dependent cells in column B will also remain unchanged; therefore, the dependent cells in column B are identified as cells not to be processed.
[0043] This embodiment utilizes the dynamic or static attributes of dependency information to accurately determine whether the content of the dependent cell changes with the content of the cell. When the content of the dependent cell changes with the content of the cell, the dependent cell is identified as a cell to be processed, thus avoiding processing dependent cells with unchanged content, further narrowing the processing scope of the table and improving the table update efficiency.
[0044] As shown above, there is a dependency relationship between the dependent cells of the dependent column and the cells whose content changes in the changing column. If the dependent cell does not change with the content of the changing cell, then the content of the cells in the dependent column will not change with the content of the changing column. In this case, the changing column does not need to send the change event to the dependent column to control the scope of the change event and thus reduce the update workload of the multidimensional table. Specifically, after identifying the changing column, based on the dependency information of each column, the dependent columns whose cell content changes with the content of the cells in the changing column are identified, and the change event is sent to the dependent columns.
[0045] For example, after identifying the changing column, the dependency information of each column in the multidimensional table can be queried, and columns that involve the changing column in the dependency information can be identified as candidate columns. If the dependency information of a candidate column is static, it can be determined that the cell content of the candidate column depends on the cell content of the changing column, thus identifying the candidate column as the column on which the changing column depends. For instance, if the calculation formula for column B is column B = [@column A] + 100, then when column A is the changing column, column B will be the column on which the changing column depends.
[0046] When the dependency information of a candidate column is dynamic, the columns involved in the dynamic dependency information can be divided into condition columns and parameter columns. If the changed column is a condition column, the parameter column used in the candidate column processing is determined based on the cell content of the changed column. If it changes, the candidate column is determined as the dependent column of the changed column; otherwise, it is not determined as the dependent column of the changed column. If the changed column is a parameter column, the parameter column used in the candidate column processing is determined based on the cell content of the condition column. If it does, the candidate column is determined as the dependent column of the changed column; otherwise, it is not determined as the dependent column of the changed column. For example, if the calculation formula of column B is: when the sum of [column A] > 0, column B = [@column C] + 100; when the sum of [column A] <= 0, column B = [@column D] + 50, then the calculation formula of column B involves column A and is a dynamic dependency, so column B is determined as a candidate column, column A is a condition column, and columns C and D are parameter columns. If column A is the changed column, then the parameter column used to process the cell content of column B is determined to be either column C or column D based on the changed cell content of column A. If the parameter column of column B remains column C, then the cell content of column B will not change, and column B will not be determined as a dependent column. If the parameter column of column B changes from column C to column D, it indicates that the cell content of column B may change, and column B will be determined as a dependent column. If column C is the changed column, then the parameter column used to process the cell content of column B is determined to be either column C or column D based on the cell content of column A. If the parameter column of column B is column C, then the cell content of column B may change with the cell content of column C, and column B will be determined as a dependent column. If the parameter column of column B is column D, then the cell content of column B will not change with the cell content of column C, and column B will not be determined as a dependent column. This embodiment uses the dependency information of each column in the table to accurately filter out dependent columns whose content may change due to the change in the content of the changed column from the candidate columns that are dependent on the changed column. Columns in the candidate columns that are not changed due to the change in the content of the changed column are removed, which further narrows the processing scope of the table and helps to improve the table update efficiency.
[0047] Furthermore, after filtering out the dependent columns that change with the content of the changed column, the dependent cells within those columns that have a dependency relationship with the content-changed cells in the changed column can be identified. The row identifier of the dependent cell is associated with the row identifier of the content-changed cell and recorded in a change event. This change event is then pushed to the dependent column, allowing it to directly determine the cell to be processed based on the row identifier of the dependent cell recorded in the change event. For example, if column B's calculation formula is column B = [@column A] + 100, and column A is the changed column, then column B is the dependent column. The row identifier of the content-changed cell determines the cell in the same row of column B as the dependent cell, and a change event is generated and sent to column B based on both the row identifier of the content-changed cell and the row identifier of the dependent cell. Similarly, if column B's calculation formula is: when the sum of [column A] > 0, column B = [@column C] + 100; when the sum of [column A] <= 0, column B = [@column D] + 50. When column A is the changed column and the parameter column of column B changes from column C to column D, each cell in column B can be determined as a dependent cell. Therefore, a change event is generated and sent to column B based on the row identifier of each cell in column B and the row identifier of the cell whose content has changed. When column C is the changed column and column C is the parameter column of column B, the row identifier of the cell whose content has changed in column C determines the cell in the same row of column B as the dependent cell. A change event is generated and sent to column B based on the row identifier of the cell whose content has changed and the row identifier of the dependent cell.
[0048] Optionally, after determining the corresponding dependent column and the dependent cell corresponding to the content change cell in the dependent column, a corresponding change event can be generated for each dependent cell of the dependent column. This change event only records the row identifier of each dependent cell in the dependent column and the row identifier of the corresponding content change cell, so that the dependent column can directly determine the cell to be processed by the row identifier of the dependent cell in the column change event, without having to filter cells that do not belong to itself, further improving the efficiency of the dependent column in responding to change events.
[0049] In this embodiment, after determining the dependent column, the dependent cells in the dependent column that have changed due to the content change of the changing column can also be determined. The row identifier of the dependent cell and the row identifier of the content-changed cell are used to generate a change event and send it to the dependent column, so that the dependent column can quickly determine the cell to be processed without having to re-determine the dependent cell based on the dependency information. This eliminates the judgment step of the dependent cell and improves the response speed of the change event of the dependent column.
[0050] Based on the above embodiments, if a dependent column has two or more dependent columns, and due to the temporal nature of change event propagation, the update process of the dependent column may be executed before the update process of the dependent columns, resulting in the dependent column having to perform an update process more than twice, affecting the table update efficiency. For example, if column B = [@column A] + [@column C], and + [@column C] = [@column A] + 100, then when column A is the changed column, the change event is pushed to columns B and C. After columns B and C respond to the change event simultaneously, the change event of column C will be pushed to column B again, requiring column B to respond to the change event again. Therefore, column B will perform an update process twice. To avoid a column repeatedly performing an update process, before executing the table update method in steps S110-S120, the processing order of each column is constrained according to the dependency relationship between each column. Then, each column is updated level by level according to the processing order of each column, so that the update process of a dependent column that depends on multiple dependent columns is later than the corresponding dependent column.
[0051] Specifically, after the dependent column receives a change event, it can determine whether the previous column of the dependent column has finished processing the corresponding change event according to the preset processing order of each column. The preset processing order is obtained by performing topological sorting on each column based on the dependency information of each column. If the previous column of the dependent column has finished processing the corresponding change event, the dependent column determines the cell to be processed according to the received change event.
[0052] Understandably, the processing order refers to the order in which each column's update process is executed. This can be achieved by determining the dependent columns of each column based on their dependency information, generating a topology structure based on the dependencies between each column and its dependent columns, and then performing a topological sort on the topology structure to obtain the processing order of each column. For example, Figure 4 This is a schematic diagram illustrating the topology and processing order provided in an embodiment of this application. For example... Figure 4 As shown, the dependency information of columns B and C involves column A, so column A can be determined as a dependent column of columns B and C. The dependency information of column D involves columns B and C, so columns B and C can be determined as dependent columns of column D. The dependency information of column E involves columns C and A, so columns A and C can be determined as dependent columns of column E. Having clarified the dependencies between columns A, B, C, D, and E, we can construct... Figure 4 The topology is shown. This topology is then sorted so that column A, which has no dependent columns, is placed first; columns B and C, which depend solely on column A, are placed second and third respectively; column D, which depends on both columns B and C, is placed fourth; and column E, which depends on both columns A and C, is placed fifth. Figure 4 The processing order is shown. The process of determining the processing order can be performed during the initialization of the multidimensional table or after changes to the column dependency information.
[0053] After receiving a change event, the dependent column can query whether the preceding column in the processing sequence has completed processing the corresponding change event to update the cell. For example... Figure 4 After receiving a change event, column E needs to check whether column D has finished processing the corresponding change event. If column D has finished processing the corresponding change event, column E can start processing the change event it received. If column D has not finished processing the corresponding change event, it needs to wait for column D to finish processing the corresponding change event.
[0054] In this embodiment, based on the aforementioned topology, the target column and other columns directly or indirectly dependent on the target column are identified as columns to be calculated, where the target column is the column whose content has changed. Then, according to the processing order of the topology, each column to be calculated undergoes dynamic scavenging and content updating. The process of dynamically scavenging and updating each column to be calculated is equivalent to executing steps S110-S120. After a content-changed cell is identified in a column to be calculated, a change event is generated and sent to the next column to be calculated specified by the processing order of the topology, thus sequentially propagating the column change event according to the processing order of the topology.
[0055] This embodiment determines the processing order of each column by the topological structure satisfied by the dependencies between each column. This strictly controls the execution order of the update process of each column according to the processing order, ensuring that the update process of the dependent column is executed after the update process of all dependent columns, avoiding repeated execution of the update process of the dependent column, and improving the update efficiency of the table.
[0056] It should be noted that setting the processing order can cause subsequent columns to wait for the preceding columns to finish processing their corresponding change events, even when there are no dependencies between them. This affects the efficiency of subsequent columns in processing change events and reduces the table's update speed. To address this, the processing order can be split into multiple chains, placing columns with dependencies into the same processing chain. The order of columns within each chain is then used to determine whether a change event can be processed at any given time. For example, Figure 4 The topology can generate two links: one is column A → column C → column B → column D, and the other is column A → column C → column E. Column D can process its received change event only by waiting for column B to finish processing its corresponding change event, and column E can process its received change event only by waiting for column C to finish processing its corresponding change event. Columns D and E can even process their corresponding change events in parallel, which effectively improves the processing efficiency of change events.
[0057] Building upon the above embodiments, if the dependencies between some columns in a multidimensional table form circular dependencies, it can lead to a deadlock between the cells in the corresponding column and the cells they depend on. For example, if column A depends on column B, and column B depends on column A, the content of the cells in the corresponding column cannot be processed correctly. To address this, before determining the processing order of each column in the multidimensional table, it is possible to determine whether there are columns forming circular dependencies based on the topological structure between the columns. These columns are then marked as unprocessable nodes to avoid invalid processing of unprocessable nodes, thereby improving table processing efficiency and conserving table processing resources. The remaining columns not marked as unprocessable nodes can be marked as nodes to be processed, and the processing order of these nodes can be determined. This ensures that subsequent table updates follow the processing order of the nodes to be processed, preventing duplicate updates and further optimizing table processing efficiency.
[0058] The process of filtering invalid processing nodes and generating a processing order for nodes to be processed is as follows: Based on the dependency information of each column in the table, multiple unprocessable nodes and multiple nodes to be processed are identified. Unprocessable nodes are either cyclically dependent nodes or depend on cyclically dependent nodes. A topological sort is then performed on the multiple nodes to be processed to determine their processing order. Unprocessable nodes are column nodes in the multidimensional table whose cell content cannot be processed, and cyclically dependent nodes are column nodes that satisfy cyclic dependencies.
[0059] For example, the dependent columns of each column can be determined based on the dependency information of each column. A directed dependency topology is generated based on the dependency relationships between each column and its dependent columns. Cyclic dependency nodes forming cyclic dependencies are identified in the topology. These cyclic dependency nodes and the column nodes that depend on them are designated as unprocessable nodes. The remaining column nodes are then designated as nodes to be processed, and a topological sort is performed on these nodes to obtain the processing order. Figure 5 This is a schematic diagram of a directed dependency topology provided in an embodiment of this application. For example... Figure 5 As shown, 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. A circular dependency relationship exists between column nodes D, F, and C. This dependency creates a cycle, preventing the proper processing of cell content. Therefore, column nodes D, F, and C are identified as unprocessable nodes. Since column node E depends on column node F, it is also identified as an unprocessable node. The remaining column nodes A and B are nodes to be processed. The processing order for these nodes is determined as column node A → column node B.
[0060] For nodes that cannot be processed, their content will not be updated during subsequent table updates to avoid erroneous processing that could affect the accuracy of the table. In other words, during subsequent table updates, only the cell content of nodes awaiting processing will be updated, and the update process will be ordered according to the processing order to prevent nodes awaiting processing from undergoing repeated update processes. This embodiment identifies nodes with circular dependencies and column nodes that depend on these circular dependencies as nodes that cannot be processed. This avoids updating cells of nodes with unprocessable circular dependencies during table updates, thus improving table processing efficiency and conserving table processing resources.
[0061] Furthermore, the circular dependencies between circularly dependent nodes may be pseudo-circular dependencies. Pseudo-circular dependencies refer to a situation where the computational references of cells in the columns forming a circular dependency do not form a closed loop, and there is no true circular reference conflict in the cell's computation process. In contrast to pseudo-circular dependencies, when the computational references of cells in a circularly dependent node form a closed loop, the corresponding result cannot be processed due to a circular reference conflict. This type of circular dependency between columns can be defined as a true circular dependency. Therefore, in the process of filtering invalid and unprocessed nodes from the columns of a multidimensional table, multiple candidate nodes forming circular dependencies can be selected based on the dependency information of each column. Nodes not dependent on candidate nodes are identified as unprocessed nodes. If multiple candidate nodes have cells forming circular dependencies, these candidate nodes are identified as unprocessable nodes, and nodes dependent on candidate nodes are identified as unprocessable nodes. Alternatively, if multiple candidate nodes do not have cells forming circular dependencies, these candidate nodes are identified as unprocessed nodes, and nodes dependent on candidate nodes are identified as unprocessed nodes. Understandably, when circular references exist between cells in candidate nodes, the cell content cannot be processed correctly. This is because incorrect dependency information of the candidate nodes causes them to form true circular dependencies. Most of the cell content of the candidate nodes, as well as the cell content of column nodes that depend on them, cannot be processed correctly. Therefore, candidate nodes and their dependent column nodes can be marked as unprocessable nodes to avoid invalidating the cell content of unprocessable nodes during subsequent table updates, thus resolving table processing resource issues and improving efficiency. Conversely, when there are no circular references between cells in candidate nodes, the cell content can be processed correctly. This means that correct dependency information of the candidate nodes causes them to form false circular dependencies. All cell content of the candidate nodes, as well as the cell content of column nodes that depend on them, can be processed correctly. Therefore, candidate nodes and their dependent column nodes can be marked as pending nodes, allowing subsequent table updates to update the cell content of pending nodes and ensuring the accuracy of table updates.
[0062] refer to Figure 5 Based on the dependency information of each column, a [structure / structure] can be constructed. Figure 5The illustrated directed dependency topology identifies column nodes D, F, and C, which form a cyclic dependency, as candidate cyclic nodes. Column nodes A and B, which are not dependent on the candidate cyclic nodes, are identified as nodes to be processed. For column nodes D, F, and C, it is checked whether any cells within them form a cyclic dependency. If so, column nodes D, F, and C are determined to have a true cyclic dependency and their cell contents cannot be processed, thus classifying them as unprocessable nodes. Column node E, which depends on column node F, is also classified as an unprocessable node. If not, column nodes D, F, and C are determined to have a false cyclic dependency and their cell contents can be processed normally, thus classifying them as nodes to be processed, and column node E, which depends on column node F, is also classified as a node to be processed.
[0063] When detecting whether there are cells forming a cyclic dependency relationship among multiple candidate nodes, each cell of the multiple candidate nodes can be marked as a dirty cell. The initial dirty cell is then obtained from the current dirty cells. This initial dirty cell is stored in an empty computation stack. After storing the cell in the computation stack, the top cell of the stack is examined to determine its direct dependent cells. 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. If the direct dependent cell is not a dirty cell, the dirty attribute of the top cell is removed and it is deleted from the computation stack. A new top cell is then obtained from the computation stack, and its direct dependent cells are determined. If the direct dependent cell is a dirty cell and is stored in the computation stack, it is confirmed that multiple nodes have cells forming a cyclic dependency relationship. Understandably, when a directly dependent cell is not a dirty cell, it indicates that the top cell of the stack will not form a cyclic dependency with other dirty cells. This clears the dirty attribute of the top cell, filtering out processable cells that will not form cyclic dependencies, avoiding repeated cyclic dependency detection on processable cells and preventing detection errors, thus improving detection efficiency and accuracy. When a 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 contain cells that form cyclic dependencies.
[0064] This embodiment uses cell-level validation to check whether the cyclic dependencies between candidate nodes are false or true cyclic dependencies. It accurately filters out invalid processing nodes and unprocessed nodes in the multidimensional table, avoiding misidentification of unprocessed nodes as unprocessable nodes, which would cause omissions in table updates and ensure the reliability of table updates.
[0065] When a cyclic dependency between candidate nodes is a true cyclic dependency, and the candidate node and the column nodes that depend on it are identified as unprocessable nodes, a preset error code can be filled into each cell of the unprocessable node. This error code informs the user that the dependency information of the unprocessable node is incorrect, resulting in a true cyclic dependency, allowing the user to modify the dependency information of the unprocessable node based on the error code. For example, a multidimensional table can fill each cell of an unprocessable node with the error code "CIRCULAR" (even if some cells in the node have had their dirty attributes cleared and still have calculation results, the "CIRCULAR" error code will still be filled). This error code not only informs the user that the dependency information of the corresponding node is incorrect, but also reminds the user to modify the content of the cells without displayed error codes if they want to modify the table content.
[0066] When a user modifies the dependency information of a node that cannot be processed, the topology of directed dependencies among the column nodes is reorganized based on the new dependency information. If the topology determines that all column nodes are nodes to be processed, the nodes to be processed are topologically sorted to determine the processing order.
[0067] Of course, users can also retain the dependency information for nodes that cannot be processed, and prioritize modifying the cell content of the nodes to be processed in the multidimensional table. After modifying the cell content of the node to be processed, the node to be processed generates a change event based on the content change, pushes the change event to the dependent column, and the dependent column executes the corresponding cell content update operation according to the processing order of the nodes to be processed. If the user modifies the cell content of the column corresponding to the node that cannot be processed, but due to the unprocessable problem of the cell content of the node that cannot be processed, the cell content of the dependent column in the multidimensional table does not need to be modified based on the content change of that cell. Unless the column corresponding to the node that cannot be processed is a condition column, and modifying the cell content of that column would cause the column nodes that originally formed a true cycle dependency to become a directed acyclic dependency, then the cell content of the dependent column in the multidimensional table can be modified based on the content change of that cell. For example, the formula for column B is: when the sum of [column A] is > 0, column B = [@column C] + 100; when the sum of [column A] is <= 0, column B = [@column D] + 50. The formula for column C is: column C = [@column E] + [@column B]; and the formula for column D is: column D = [@column E]. Originally, the sum of column A > 0 caused a circular dependency between columns B and C, thus marking columns B and C as nodes that could not be processed. However, after modifying the content of a cell in column A, making the sum of column A <= 0, column B depends on column D, and column D depends on column E. These three columns have a directed acyclic dependency relationship and can therefore be marked as nodes to be processed. The processing order of all nodes to be processed is sorted, and then, starting with column A, subsequent columns to be processed are updated level by level according to this processing order, avoiding duplicate updates.
[0068] In specific application scenarios, during table initialization, the system determines whether any columns have unprocessable nodes based on their dependency information. If an unprocessable node exists, an error code is populated in the cell corresponding to that node to prompt the user whether to modify its dependency information. If the user refuses to modify the dependency information, the processing order is determined based on the remaining unprocessed nodes. Next, the system receives user requests to modify cells of unprocessed nodes, identifies the cells whose content has changed, designates the unprocessed node as the changed column, generates a change event, and pushes the change event to the corresponding dependent column. The dependent column checks whether the preceding sequence has processed its corresponding change event according to the processing order. If it has, the dependent column processes the received change event; otherwise, it waits for the preceding sequence to complete its processing. During this process, if a user request to modify the dependency information of any column node is received, the system re-evaluates whether the table has unprocessable nodes based on the modified dependency information. If not, the processing order is determined based on the dependency information of all column nodes; if so, an error code is populated in the cell corresponding to the unprocessable node to prompt the user whether to modify its dependency information.
[0069] As can be seen, the process of determining the processing order is triggered after table initialization, modification of dependency information, and modification of cell content in the condition column, which causes the true cyclic dependency structure to become a directed acyclic structure. This ensures that the processing order satisfies the constraints of the latest dependency information of the column nodes. Furthermore, after the dependency information is modified, the subscription information of the column event center for each column can be modified accordingly to ensure that change events for each column can be accurately pushed to the dependent columns.
[0070] From the above, it's clear that the update process of the dependent column must be executed after the update processes of all dependent columns. The change events received by the dependent column are pushed after the corresponding dependent column has completed its update process. When the dependent column receives a change event, it can confirm that the update process of its corresponding dependent column has been completed. Therefore, without setting a processing order, the dependent column can determine whether it has received change events from all dependent columns. If so, it confirms that all dependent columns have completed their update processes, and thus the dependent column can begin processing the change events received from all dependent columns. (Reference) Figure 4 Columns B and C are dependent columns of column D. When column D receives change events sent by column B and column C, it can confirm that columns B and C have completed their respective update processes. Then, column D begins to process the change events sent by columns B and C.
[0071] If the content of a dependent column remains unchanged, a change event without any row identifier can be generated and pushed to the dependent column. This allows the dependent column to confirm that the update process of the dependent column has been completed but its cell content has not been updated. Alternatively, when the changing column determines that the content of a dependent column does not change with the content of cells whose content has changed, a change event without any identifier can be sent to that dependent column. This allows the dependent column to confirm that the update process of the changed column has been completed but its updated content does not affect its own content. For example, if column B depends on the average or sum of column A, and some cells in column A change their content but the average or sum does not change, the cell content in column B will not change, so the identifier of the cells whose content has changed need not be sent to column B.
[0072] As can be seen from the above, the dependent column may receive multiple change events from multiple dependent columns at the same time, and multiple change events may point to the same cell to be processed. In order to avoid duplicate processing of the same cell to be processed, when the dependent column receives multiple change events, the corresponding cell to be processed can be determined according to the multiple change events; the cells to be processed corresponding to the multiple change events are deduplicated to obtain the cell to be processed of the dependent column.
[0073] For example, when a dependent column receives multiple change events from different dependent columns, the dependent cell for the corresponding content-changed cell is determined based on the row identifier of the content-changed cell carried by each change event and its own dependency information. When the content of the dependent cell changes along with the content of the content-changed cell, the dependent cell is treated as a cell to be processed. Then, the row identifiers of the cells to be processed corresponding to each change event are aggregated into a set. Duplicate row identifiers in the set are removed until only one remains. The row identifiers of the final set are then used as the row identifiers of the cells to be processed in the dependent column. The dependent column then iterates through the row identifiers of the final set to process the corresponding cell content to obtain the final processing result for each cell to be processed. In this embodiment, when multiple change events point to the same cell to be processed, deduplication ensures that the cell to be processed is processed only once, effectively reducing resource waste caused by repeated processing and improving table update efficiency.
[0074] After the cell to be processed is determined by the dependent column, the content of the dependent cells is obtained based on its own dependency information. The latest processing result of the cell to be processed is then determined based on the dependency information and the content of the dependent cells. For example, when the dependency information is a calculation formula, the content of the dependent cell is substituted into the formula to calculate the latest processing result of the cell to be processed. When the dependency information is instruction text, the content of the dependent cell and the instruction text are combined to construct an instruction word, which is then input into a preset large language model. The preset large language model outputs the latest processing result of the cell to be processed. Afterwards, the original content of the cell to be processed is compared with the latest processing result. If the original content of the cell to be processed differs from the latest processing result, it indicates that the content of the changed column has changed, causing the content of the cell to be processed to also change. In this case, the content of the cell to be processed is updated to the latest processing result to ensure accurate table updates. After the content of the cell to be processed is updated to the latest processing result, the dependent column recognizes the cell to be processed as the cell whose content has changed in this column and recognizes itself as the changed column. The changed column can generate a change event based on the row identifier of the cell whose content has changed in this column, and push the change event to the corresponding dependent column. In order to update the content of the cell to be processed in the dependent column column by column through the change event, the cell to be processed in the table is prevented from spreading to all cells of the dependent column, the processing scope of the table is strictly controlled, the amount of processing calculation of the table is reduced, and the update efficiency of the table is improved.
[0075] For example, Figure 6 This is a schematic diagram of the cell to be processed in the table provided in the embodiments of this application. For example... Figure 6 As shown, when column A is the change column, row 4 is the cell with content changes. Column A pushes the change event to column B. Each cell in column B is a dependent cell of the content-change cell, so each cell is identified as a cell to be processed. The cells to be processed are then processed to obtain the corresponding latest processing result. If only the original content of rows 2 and 5 in the cells to be processed differs from the latest processing result, then only the content of rows 2 and 5 is updated to the latest processing result and identified as content-change cells in column B. After generating the corresponding change event based on rows 2 and 5, column B pushes the change event to column C. Rows 2 and 5 in column C are dependent cells of the content-change cell, thus identifying rows 2 and 5 as cells to be processed. (Comparison) Figure 6 and Figure 1Traditional static dirty handling methods would cause every cell in column C to be treated as a cell to be processed. However, the processing method provided in this application embodiment only treats rows 2 and 5 in column C that are related to the content change cells in column B as cells to be processed, effectively reducing the number of cells to be processed. For subsequent dependent columns, the number of corresponding cells to be processed can also be further reduced, effectively controlling the processing scope of the table to the cells related to the content change cells, avoiding invalid processing of cells unrelated to the content change cells, reducing the processing and calculation workload of the table, and improving the table update efficiency.
[0076] Furthermore, during the processing of cells to be processed, cells can be marked as dirty to obtain dirty cells, and the latest processing result of the dirty cells can be determined. If the latest processing result of a dirty cell is the same as its own content, the dirty attribute of the dirty cell is removed; or, if the latest processing result of a dirty cell is different from its own content, the dirty attribute of the dirty cell is retained; the content of the remaining dirty cells is then changed to the corresponding latest processing result. (Reference) Figure 6 When column B, as the dependent column, receives a change event transmitted from column A, it determines all its cells as cells to be processed based on the row identifier of row 4 carried in the change event, thus marking all cells to be processed as dirty cells. Column B processes each dirty cell to obtain the corresponding latest processing result. If the latest processing result of a dirty cell is the same as the original content, the dirty attribute of the dirty cell is removed to indicate that the content of the dirty cell has not changed. If the latest processing result of a dirty cell is different from the original content, the dirty attribute of the dirty cell is retained to indicate that the content of the dirty cell has changed. Column B ultimately retains only rows 2 and 5 as dirty cells. After updating the content of rows 2 and 5 to the corresponding latest processing result, it generates a change event based on the row identifier of rows 2 and 5 and sends the change event to column C. Column C marks the corresponding cells of rows 2 and 5 as dirty cells based on the row identifier in the change event and processes the dirty cells. This embodiment marks cells as "dirty" to clearly identify whether their content has changed. When the content of a dirty cell changes, its "dirty" attribute is retained so that change events can be accurately generated based on cells with the "dirty" attribute. This strictly controls the processing scope of the table to cells whose content may have changed, avoiding invalid processing of unchanged cells. Moreover, only the remaining dirty cells are updated, avoiding invalid operations such as performing updates when the processing result has not changed, thus saving data writing resource consumption.
[0077] After the remaining dirty cells have their content updated and a change event is generated for the corresponding column, the dirty attribute of the dirty cell is canceled to prevent residual dirty attributes from affecting other processing in subsequent columns. Alternatively, after the table has been updated, the dirty attribute of all dirty cells in the table can be canceled to restore the table to its normal state.
[0078] When each column pre-subscribes to change events for its dependent columns, the changing column, after determining the cell whose content has changed, checks if any dependent columns have subscribed to its change event for that cell. If so, it generates a change event based on the row identifier of the cell and sends the event to the corresponding subscribed dependent column. If none of the columns have pre-subscribed to change events for their dependent columns, the changing column determines, based on the dependency information of each column, whether any other columns have dependent columns that change with the content-changing cell. If such columns exist, a change event is generated and sent to those dependent columns; otherwise, no change event is generated.
[0079] When the most recently changed column of a multidimensional table no longer generates change events, it indicates that all columns in the multidimensional table have completed their cell content updates, thus confirming that the multidimensional table update is complete. The user can then be notified that the update is finished. (Reference) Figure 6 If, after updating the contents of cells in rows 2 and 5, column C is confirmed to not have any columns in the multidimensional table that subscribe to the change events of rows 2 and 5 of column C, then column C will not generate a change event. Since column C is the latest changed column and it does not generate a change event, it can be confirmed that the update of the multidimensional table is complete.
[0080] In summary, the table update method provided in this application generates a corresponding change event when any column of the table changes, based on the content of the changed column, and records the row identifier of the cell whose content has changed. The change event is then sent to the dependent column of the changed column. The dependent column determines the cell to be processed based on the change event. If the latest processing result of the cell to be processed differs from its own content, the content of the cell to be processed is updated to the latest processing result. Through this technical means, a change event can be generated by the dependent column based on the content of the changed cell and sent to the dependent column. This allows the dependent column to determine the cell to be processed based on the row identifier carried in the change event, thereby confining the processing scope to the dependent cells of the cell whose content has changed. This avoids the entire column of the dependent column becoming cluttered and expanding the processing scope, effectively reducing the amount of cell processing and updating, reducing the operating resources required for table updates, and improving the response speed of the table system. Furthermore, tables are originally data structures composed of row records and are generally managed in a row-based manner. However, this application manages change events by column, essentially replacing row-based or cell-based management with column-based storage and maintenance. This ensures that any operation on cell data is maintained uniformly through the column, facilitating concurrent design for that column and reducing monitoring and processing costs by shifting from monitoring cell changes to monitoring column changes. For example, when multiple cells in the aforementioned column undergo changes, they can be uniformly maintained by that column. Change events are generated based on the content of the changed column, and can be sent to dependent columns either holistically or concurrently. Dependent columns can also concurrently perform dirty checking and processing based on change events, accelerating the efficiency of overall table dirty checking and processing. Furthermore, with column-based management, the table maintains relationships between columns and connects these dependencies through events. This enables the targeted propagation of change events to dependent columns, allowing them to quickly respond to change events and promptly update their corresponding dependent cells without waiting for the table to dirty check all cells before unified calculation and processing, further improving the response speed of the table system.
[0081] Based on the above embodiments, Figure 7 This is a schematic diagram of a table updating device provided in an embodiment of this application. (Reference) Figure 7 The table update device provided in this embodiment specifically includes: a change event generation module 21 and a cell change module 22.
[0082] Among them, the change event generation module 21 is configured to generate a corresponding change event based on the content of the changed column when any column of the table changes, and the change event record contains the row identifier of the changed cell; Cell change module 22 is configured to send change events to the dependent columns of the changed column. The dependent columns determine the cells to be processed based on the change events. If the latest processing result of the cell to be processed is different from its own content, the content of the cell to be processed is changed to the latest processing result.
[0083] Based on the above embodiments, the cell change module 22 includes: an event sending unit, configured to send change events from the column event center of the changed column to the column event center of the dependent column, wherein the column event center of the dependent column pre-subscribes to the change events of the changed column.
[0084] Based on the above embodiments, the event sending unit includes: an event sending subunit, configured to, in the case of a cross-table subscription of a change event of a changed column in the column event center of the dependent column, send the change event from the column event center of the changed column to a first table event center, and then send the change event from the first table event center to the column event center of the dependent column through a second table event center; wherein, the first table event center is the table event center of the table to which the changed column belongs, and the second table event center is the table event center of the table to which the dependent column belongs.
[0085] Based on the above embodiments, the cell change module 22 includes: a first cell determination unit, configured to determine the dependent cell of the content change cell in each cell of the dependent column according to the change event and the dependency information of the dependent column; and a second cell determination unit, configured to determine the dependent cell as the cell to be processed in the dependent column.
[0086] Based on the above embodiments, the cell change module 22 includes: a third cell determination unit, configured to determine the corresponding cell to be processed based on the multiple change events when the dependent column receives multiple change events; and a cell deduplication unit, configured to perform cell deduplication processing on the cells to be processed corresponding to the multiple change events to obtain the cells to be processed of the dependent column.
[0087] Based on the above embodiments, the cell modification module 22 includes: a first cell processing unit, configured to mark the cells to be processed as dirty cells to obtain dirty cells, and determine the latest processing result of the dirty cells; a cell attribute processing unit, configured to cancel the dirty attribute of the dirty cell if the latest processing result of the dirty cell is the same as its own content; or, if the latest processing result of the dirty cell is different from its own content, retain the dirty attribute of the dirty cell; and a cell modification unit, configured to change the content of the remaining dirty cells to the corresponding latest processing result.
[0088] Based on the above embodiments, the cell change module 22 includes: a sequence judgment unit, configured to determine whether the preceding column of the dependent column has finished processing the corresponding change event according to the preset processing order of each column; the processing order is obtained by performing topological sorting on each column based on the dependency information of each column; and a second cell processing unit, configured to determine the cell to be processed by the dependent column based on the received change event when the preceding column of the dependent column has finished processing the corresponding change event.
[0089] Based on the above embodiments, the table update device includes: a processing order determination module, configured to determine multiple unprocessable nodes and multiple pending nodes based on the dependency information of each column of the table, wherein the unprocessable nodes are loop-dependent nodes or depend on loop-dependent nodes; and to perform topological sorting on the multiple pending nodes to determine the processing order of the multiple pending nodes.
[0090] Based on the above embodiments, the processing order determination module includes: a first node determination unit, configured to filter out multiple candidate nodes that form a cyclic dependency relationship based on the dependency information of each column of the table, and determine nodes that do not depend on the candidate nodes as nodes to be processed; a second node determination unit, configured to determine multiple candidate nodes as unprocessable nodes and nodes that depend on the candidate nodes as unprocessable nodes when multiple candidate nodes have cells that form a cyclic dependency relationship; or, when multiple candidate nodes do not have cells that form a cyclic dependency relationship, determine multiple candidate nodes as nodes to be processed and nodes that depend on the candidate nodes as nodes to be processed.
[0091] Based on the above embodiments, the table updating device further includes an error code filling module, configured to fill each cell of the unprocessable node with a preset error code after determining multiple unprocessable nodes and multiple pending nodes.
[0092] The table update device provided in this application, as described above, generates a corresponding change event when any column of the table changes, based on the content of the changed column, and records the row identifier of the cell whose content has changed. The change event is then sent to the dependent column of the changed column. The dependent column determines the cell to be processed based on the change event. If the latest processing result of the cell to be processed differs from its own content, the content of the cell to be processed is updated to the latest processing result. Through this technical means, a change event can be generated by the dependent column based on the content-changed cell and sent to the dependent column. This allows the dependent column to determine the cell to be processed based on the row identifier carried in the change event, thereby confining the processing scope to the dependent cells of the content-changed cell. This avoids the entire column of the dependent column becoming cluttered and expanding the processing scope, effectively reducing the amount of cell processing and updating, reducing the operating resources required for table updates, and improving the response speed of the table system. Furthermore, tables are originally data structures composed of row records and are generally managed in a row-based manner. However, this application manages change events by column, essentially replacing row-based or cell-based management with column-based storage and maintenance. This ensures that any operation on cell data is maintained uniformly through the column, facilitating concurrent design for that column and reducing monitoring and processing costs by shifting from monitoring cell changes to monitoring column changes. For example, when multiple cells in the aforementioned column undergo changes, they can be uniformly maintained by that column. Change events are generated based on the content of the changed column, and can be sent to dependent columns either holistically or concurrently. Dependent columns can also concurrently perform dirty checking and processing based on change events, accelerating the efficiency of overall table dirty checking and processing. Furthermore, with column-based management, the table maintains relationships between columns and connects these dependencies through events. This enables the targeted propagation of change events to dependent columns, allowing them to quickly respond to change events and promptly update their corresponding dependent cells without waiting for the table to dirty check all cells before unified calculation and processing, further improving the response speed of the table system.
[0093] The table updating apparatus provided in this application embodiment can be used to execute the table updating method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0094] Figure 8 This is a schematic diagram of the structure of a table update device provided in an embodiment of this application, with reference to... Figure 8The table update 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 update device can be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the table update device can be connected via a bus or other means.
[0095] 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 update method in any embodiment of this application (e.g., the change event generation module 21 and cell change module 22 in the table update device). The memory 32 may primarily include a program storage area and a data storage area, wherein 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.
[0096] The communication device 33 is used for data transmission.
[0097] 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 implementing the table update method described above.
[0098] 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.
[0099] The table update device provided above can be used to execute the table update method provided in the above embodiments, and has corresponding functions and beneficial effects.
[0100] This application embodiment also provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform a table update method. The table update method includes: when any column of the table changes, generating a corresponding change event by changing the cell according to the content of the changed column, and recording the row identifier of the changed cell in the change event; sending the change event to the dependent column of the changed column, and having the dependent column determine the cell to be processed according to the change event; and changing the content of the cell to be processed to the latest processing result if the latest processing result of the cell to be processed is different from its own content.
[0101] 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.
[0102] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the table update method described above, but can also perform related operations in the table update method provided in any embodiment of this application.
[0103] The table updating apparatus, storage medium, and table updating device provided in the above embodiments can execute the table updating method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the table updating method provided in any embodiment of this application.
[0104] 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 updating method, characterized in that, include: When any column in the table changes, a corresponding change event is generated based on the content of the changed column and the change event records the row identifier of the cell whose content has changed. The change event is sent to the dependent column of the change column, and the dependent column determines the cell to be processed based on the change event. If the latest processing result of the cell to be processed is different from its own content, the content of the cell to be processed is changed to the latest processing result.
2. The table update method according to claim 1, characterized in that, Sending the change event to the dependent column of the change column includes: The change event is sent from the column event center of the changed column to the column event center of the dependent column, and the column event center of the dependent column pre-subscribes to the change events of the changed column.
3. The table updating method according to claim 2, characterized in that, The step of sending the change event from the column event center of the changed column to the column event center of the dependent column includes: In the case where the column event center of the dependent column subscribes to the change event of the changed column across tables, the column event center of the changed column sends the change event to the first table event center, and the first table event center sends the change event to the column event center of the dependent column through the second table event center; Wherein, the first table event center is the table event center of the table to which the changed column belongs, and the second table event center is the table event center of the table to which the dependent column belongs.
4. The table update method according to claim 1, characterized in that, The step of determining the cell to be processed by the dependent column based on the change event includes: Based on the change event and the dependency information of the dependent column, the dependent cell of the content change cell is determined in each cell of the dependent column. The dependent cell is determined as the cell to be processed in the dependent column.
5. The table update method according to claim 1, characterized in that, The step of determining the cell to be processed by the dependent column based on the change event includes: If the dependent column receives multiple change events, the corresponding cell to be processed is determined based on the multiple change events; The cells corresponding to the multiple change events are deduplicated to obtain the cells to be processed in the dependent column.
6. The table update method according to claim 1, characterized in that, The step of changing the content of the cell to be processed to the latest processing result when the latest processing result of the cell to be processed is different from its own content includes: The cells to be processed are marked as dirty to obtain dirty cells, and the latest processing result of the dirty cells is determined. If the latest processing result of the dirty cell is the same as its own content, cancel the dirty attribute of the dirty cell; or, if the latest processing result of the dirty cell is different from its own content, retain the dirty attribute of the dirty cell. Change the content of the remaining dirty cells to the corresponding latest processing result.
7. The table update method according to claim 1, characterized in that, The step of determining the cell to be processed by the dependent column based on the change event includes: The processing order of each column is determined to determine whether the corresponding change event of the column preceding the dependent column has been processed; the processing order is obtained by topological sorting each column based on the dependency information of each column. If the corresponding change event has been processed in the column preceding the column to which the column is depended, the column to which the column is depended determines the cell to be processed based on the received change event.
8. The table updating method according to claim 7, characterized in that, The process of determining the processing order includes: Based on the dependency information of each column of the table, multiple unprocessable nodes and multiple nodes to be processed are identified. The unprocessable nodes are either ring-dependent nodes or depend on the ring-dependent nodes. The processing order of the plurality of nodes to be processed is determined by performing topological sorting on the plurality of nodes to be processed.
9. The table updating method according to claim 8, characterized in that, The step of determining multiple unprocessable nodes and multiple pending nodes based on the dependency information of each column of the table includes: Based on the dependency information of each column of the table, multiple candidate nodes that form a loop dependency relationship are selected, and nodes that do not depend on the candidate nodes are identified as nodes to be processed. If multiple candidate nodes form a cycle dependency relationship within a cell, then the multiple candidate nodes are determined as unprocessable nodes, and the nodes that depend on the candidate nodes are also determined as unprocessable nodes; or, If none of the candidate nodes form a cyclic dependency, the candidate nodes are identified as nodes to be processed, and the nodes that depend on the candidate nodes are identified as nodes to be processed.
10. The table updating method according to claim 8, characterized in that, After identifying multiple unprocessable nodes and multiple pending nodes, the process further includes: Fill each cell of the unprocessable node with a preset error code.
11. A table updating device, characterized in that, include: The change event generation module is configured to generate a corresponding change event based on the content of the changed column when any column of the table changes. The change event records the row identifier of the cell whose content has changed. The cell change module is configured to send the change event to the dependent column of the changed column, and the dependent column determines the cell to be processed based on the change event. If the latest processing result of the cell to be processed is different from its own content, the content of the cell to be processed is changed to the latest processing result.
12. A form updating device, characterized in that, include: One or more processors; A memory that stores one or more programs that, when executed by one or more processors, cause the one or more processors to implement the table update 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 update method as described in any one of claims 1-10.