Formula editing method and system based on dynamic visual interaction, and readable storage medium
By using a formula editing method that parses and calculates locally on the client side, combined with two-way binding and state switching in the business model layer, the response latency and integration problems of traditional report table controls are solved, achieving a highly efficient user experience and improved system performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YONYOU NETWORK TECH CO LTD
- Filing Date
- 2026-01-27
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional report and table controls suffer from high response latency, poor concurrency capabilities, and high development costs in formula processing. They also provide a poor user experience, especially in scenarios involving batch editing and strong formula correlation. Furthermore, they are difficult to integrate deeply with system business logic and lack sufficient access control and data consistency management.
The system receives user input through a front-end table interaction layer, parses and calculates it locally on the client side using a formula engine, performs two-way binding with the business model layer, and listens for user operation events to switch states, supporting dynamic switching between editing and browsing states, thus reducing reliance on backend calculations.
It improves user operation response efficiency, supports batch processing, enhances system performance and integration capabilities, reduces interface development and maintenance work, and meets complex business needs.
Smart Images

Figure CN122154636A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a formula editing method and system based on dynamic visual interaction, and a readable storage medium. Background Technology
[0002] In traditional report and table controls, formula processing typically relies on backend calculations and write-back, resulting in high response latency, poor concurrency, and high development costs. This is especially problematic in scenarios involving batch editing and strong formula interrelationships, leading to a poor user experience and high system resource consumption. While Excel offers powerful local formula calculation capabilities, efficiently handling data dependencies and logical operations, it lacks data model support for integration into business systems, making deep integration with system business logic difficult. Furthermore, it exhibits significant shortcomings in system-level functionalities such as access control and data consistency management. Summary of the Invention
[0003] This application aims to solve or improve the aforementioned technical problems.
[0004] Therefore, the primary objective of this application is to provide a formula editing method based on dynamic visual interaction.
[0005] The second objective of this application is to provide a formula editing system based on dynamic visual interaction.
[0006] The third objective of this application is to provide a formula editing system based on dynamic visual interaction.
[0007] The fourth objective of this application is to provide a readable storage medium.
[0008] To achieve the primary objective of this application, the technical solution of the first aspect of this application provides a formula editing method based on dynamic visual interaction, comprising: receiving user input through a front-end table interaction layer, wherein the user input includes one or a combination of the following: cell editing, formula input, or data display; parsing and calculating the user input locally on the client through a formula engine to obtain the calculation result, and returning the calculation result to the front-end table interaction layer for real-time display; bidirectionally binding the table data input by the user with the business model through a business model layer; and listening to user operation events and controlling the dynamic switching of the formula between editing state and browsing state according to the event type.
[0009] According to the formula editing method based on dynamic visual interaction provided in this application, user input is first received through the front-end table interaction layer. Then, the formula engine parses and calculates the user input locally on the client side, obtains the calculation result, and returns the result to the front-end table interaction layer for real-time display. Next, the business model layer bidirectionally binds the user-input table data with the business model. Finally, by listening to user operation events, the formula dynamically switches between editing and browsing states based on the event type. In essence, the front-end table interaction layer provides an Excel-like user interface, supporting operations such as cell editing, formula input, and data display. The formula engine is a core calculation component independent of table controls, capable of converting various business formulas into unified executable calculation logic, supporting real-time calculation, and eliminating dependence on back-end calculations. The business model layer decouples table data from business logic through a data model, realizing model-based table behavior-driven operation and providing a complete data binding, logic control, state management, and consistency guarantee mechanism. The client performs formula conversion and calculation locally by returning formulas and standardized data from the server. It supports switching between edit and browse modes, formula status control, and batch processing, thereby improving user experience and system performance. The front-end formula calculation engine reduces dependence on back-end services and improves user operation response efficiency. It supports switching between edit and browse modes to meet complex business needs. The business model layer enables two-way binding between tables and business models, enhancing system integration capabilities. The front-end handles formula logic uniformly, reducing interface development and maintenance work.
[0010] In some technical solutions, optionally, the formula editing method based on dynamic visual interaction also includes: responding to the user's batch data operation instructions, identifying the cell range affected by the batch operation, and batch calling the formula engine to uniformly update and calculate the formulas within the cell range.
[0011] In this technical solution, the formula editing method based on dynamic visual interaction also includes responding to users' batch data operation commands, identifying the cell range affected by the batch operation, and batch calling the formula engine to uniformly update and calculate the formulas within the cell range. When users perform operations such as batch pasting and cell filling, the system identifies the affected cell range and batch calls the formula calculation engine to update, which avoids triggering the interface for each cell individually, thus improving performance and response speed.
[0012] In some technical solutions, optionally, the user-input table data is bidirectionally bound to the business model through the business model layer, including: triggering table updates when the model data changes, and updating the model state of the business model when the table data changes.
[0013] In this technical solution, user-input table data is bidirectionally bound to the business model through a business model layer. This includes triggering table updates when model data changes, and updating the business model's state when table data changes. By decoupling table data from business logic through the data model, model-based table behavior is achieved, enhancing system integration capabilities.
[0014] In some technical solutions, the business model layer is optionally used to provide data binding, logic control, state management, and data consistency assurance mechanisms.
[0015] In this technical solution, the business model layer is also used to provide data binding, logic control, state management and data consistency guarantee mechanisms.
[0016] In some technical solutions, optionally, user operation events are monitored, and the formula is dynamically switched between editing and browsing states according to the event type. This includes: determining whether the user has entered the editing state by monitoring the pre-editing event; if the calculation formulas in the editing and browsing states are inconsistent, the formula in the editing state is written by calling the formula modification event in the monitoring event; and when switching back to the browsing state, the formula returned from the query list is reread to display the calculation result in the browsing state.
[0017] In this technical solution, user operation events are monitored, and the formula is dynamically switched between editing and browsing states based on the event type. This includes determining whether the user has entered the editing state by monitoring the pre-editing event. If the calculation formulas in the editing and browsing states are inconsistent, the formula in the editing state is written by calling the relevant event in the monitoring event. When switching back to the browsing state, the formula returned from the query list is reread to display the calculation result in the browsing state, thus meeting complex business needs.
[0018] In some technical solutions, optionally, user operation events are listened to, and the formula is dynamically switched between editing and browsing states according to the event type. It also includes: operating the formula through extended scripts.
[0019] This technical solution listens for user operation events and dynamically switches formulas between editing and browsing states based on the event type. It also includes manipulating formulas via extended scripts. By supporting business groups to manipulate formulas at different times through extended scripts, such as clearing or re-executing formulas, it can meet diverse business needs.
[0020] In some technical solutions, the formula engine may optionally include a formula parser and a calculator, which are used to convert various business formulas input by the user into unified executable calculation logic.
[0021] In this technical solution, the formula engine includes a formula parser and a calculator. The formula parser and calculator are used to convert various business formulas input by users into unified executable calculation logic, supporting real-time calculation and eliminating the dependence on backend calculation.
[0022] To achieve the second objective of this application, the technical solution of the second aspect of this application provides a formula editing system based on dynamic visual interaction, comprising: a receiving module, used to receive user input through a front-end table interaction layer, wherein the user input includes one or a combination of the following: cell editing, formula input, or data display; a calculation module, used to parse and calculate the user input locally on the client through a formula engine, obtain the calculation result, and return the calculation result to the front-end table interaction layer for real-time display; a binding module, used to bidirectionally bind the table data input by the user to the business model through a business model layer; and a switching module, used to listen for user operation events and control the dynamic switching of the formula between editing state and browsing state according to the event type.
[0023] The formula editing system based on dynamic visual interaction provided in this application includes a receiving module, a calculation module, a binding module, and a switching module. The receiving module receives user input through a front-end table interaction layer. User input includes one or a combination of the following: cell editing, formula input, or data display. The calculation module parses and calculates the user input locally on the client side using a formula engine, obtains the calculation result, and returns the result to the front-end table interaction layer for real-time display. The binding module bidirectionally binds the user-input table data to the business model through a business model layer. The switching module listens for user operation events and dynamically switches the formula between editing and browsing states based on the event type. The front-end table interaction layer provides an Excel-like user interface, supporting operations such as cell editing, formula input, and data display. The formula engine is a core calculation component independent of table controls, capable of converting various business formulas into unified executable calculation logic, supporting real-time calculation, and eliminating dependence on back-end calculations. The business model layer decouples table data from business logic through a data model, realizing model-based table behavior-driven operation and providing a complete data binding, logic control, state management, and consistency guarantee mechanism. The client performs formula conversion and calculation locally by returning formulas and standardized data from the server. It supports switching between edit and browse modes, formula status control, and batch processing, thereby improving user experience and system performance. The front-end formula calculation engine reduces dependence on back-end services and improves user operation response efficiency. It supports switching between edit and browse modes to meet complex business needs. The business model layer enables two-way binding between tables and business models, enhancing system integration capabilities. The front-end handles formula logic uniformly, reducing interface development and maintenance work.
[0024] To achieve the third objective of this application, the technical solution of the third aspect of this application provides a formula editing system based on dynamic visual interaction, including: a memory and a processor, wherein the memory stores a program or instructions that can be run on the processor, and when the processor executes the program or instructions, it implements the formula editing method based on dynamic visual interaction of any one of the technical solutions of the first aspect, and thus has the technical effects of any one of the technical solutions of the first aspect, which will not be elaborated here.
[0025] To achieve the fourth objective of this application, the technical solution of the fourth aspect of this application provides a readable storage medium storing a program or instructions thereon. When the program or instructions are executed by a processor, they implement the steps of the formula editing method based on dynamic visual interaction of any one of the technical solutions of the first aspect, and thus have the technical effects of any one of the technical solutions of the first aspect, which will not be repeated here.
[0026] Additional aspects and advantages of this application will become apparent in the following description or may be learned by practice of this application. Attached Figure Description
[0027] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0028] Figure 1 This is a flowchart illustrating the steps of a formula editing method based on dynamic visual interaction according to an embodiment of this application;
[0029] Figure 2 This is a flowchart illustrating the steps of a formula editing method based on dynamic visual interaction according to an embodiment of this application;
[0030] Figure 3 This is a flowchart illustrating the steps of a formula editing method based on dynamic visual interaction according to an embodiment of this application;
[0031] Figure 4 This is a flowchart illustrating the steps of a formula editing method based on dynamic visual interaction according to an embodiment of this application;
[0032] Figure 5 This is a flowchart illustrating the steps of a formula editing method based on dynamic visual interaction according to an embodiment of this application;
[0033] Figure 6 This is a schematic block diagram of the structure of a formula editing system based on dynamic visual interaction according to an embodiment of this application;
[0034] Figure 7 This is a schematic block diagram of the structure of a formula editing system based on dynamic visual interaction according to an embodiment of this application;
[0035] Figure 8 This is a schematic diagram of a formula editing method based on dynamic visual interaction according to an embodiment of this application;
[0036] Figure 9 This is a flowchart illustrating a formula editing method based on dynamic visual interaction according to an embodiment of this application;
[0037] Figure 10 This is a schematic diagram illustrating the core structure of a front-end table formula based on dynamic visual interaction, according to another embodiment of this application.
[0038] Figure 11 This is a flowchart illustrating another embodiment of the formula editing method based on dynamic visual interaction according to this application.
[0039] Figure label:
[0040] 10: Formula editing system based on dynamic visual interaction; 110: Receiving module; 120: Calculation module; 130: Binding module; 140: Switching module; 20: Formula editing system based on dynamic visual interaction; 300: Memory; 400: Processor. Detailed Implementation
[0041] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0042] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.
[0043] The following reference Figures 1 to 11 This application describes a formula editing method and system based on dynamic visual interaction, as well as a readable storage medium, according to some embodiments of this application.
[0044] like Figure 1 As shown, an embodiment of the first aspect of this application provides a formula editing method based on dynamic visual interaction, including the following steps:
[0045] Step S102: Receive user input through the front-end table interaction layer. User input includes one or a combination of the following: cell editing, formula input, or data display.
[0046] Step S104: The formula engine parses and calculates the user input locally on the client side to obtain the calculation result, and then returns the calculation result to the front-end table interaction layer for real-time display.
[0047] Step S106: Bind the user-input table data to the business model through the business model layer;
[0048] Step S108: Listen for user operation events and control the formula to dynamically switch between editing and browsing states based on the event type.
[0049] According to the formula editing method based on dynamic visual interaction provided in this embodiment, user input is first received through the front-end table interaction layer. Then, the formula engine parses and calculates the user input locally on the client side, obtains the calculation result, and returns the result to the front-end table interaction layer for real-time display. Next, the business model layer bidirectionally binds the user-input table data with the business model. Finally, by listening to user operation events, the formula dynamically switches between editing and browsing states based on the event type. In essence, the front-end table interaction layer provides an Excel-like user interface, supporting operations such as cell editing, formula input, and data display. The formula engine is a core calculation component independent of table controls, capable of converting various business formulas into unified executable calculation logic, supporting real-time calculation, and eliminating dependence on back-end calculations. The business model layer decouples table data from business logic through a data model, realizing model-based table behavior-driven operation and providing a complete data binding, logic control, state management, and consistency guarantee mechanism. The client performs formula conversion and calculation locally by returning formulas and standardized data from the server. It supports switching between edit and browse modes, formula status control, and batch processing, thereby improving user experience and system performance. The front-end formula calculation engine reduces dependence on back-end services and improves user operation response efficiency. It supports switching between edit and browse modes to meet complex business needs. The business model layer enables two-way binding between tables and business models, enhancing system integration capabilities. The front-end handles formula logic uniformly, reducing interface development and maintenance work.
[0050] like Figure 2 As shown, the formula editing method based on dynamic visual interaction according to an embodiment of this application further includes the following steps:
[0051] Step S202: Respond to the user's batch data operation command, identify the cell range affected by the batch operation, and batch call the formula engine to uniformly update and calculate the formulas within the cell range.
[0052] In this embodiment, the formula editing method based on dynamic visual interaction also includes responding to the user's batch data operation commands, identifying the cell range affected by the batch operation, and batch calling the formula engine to uniformly update and calculate the formulas within the cell range. When the user performs batch pasting, cell filling, or other operations, the system identifies the affected cell range and batch calls the formula calculation engine to update, which avoids triggering the interface for each cell individually, thus improving performance and response speed.
[0053] like Figure 3 As shown, according to an embodiment of the formula editing method based on dynamic visual interaction proposed in this application, the user-inputted table data is bidirectionally bound to the business model through the business model layer, specifically including the following steps:
[0054] Step S302: When the model data changes, trigger a table update; when the table data changes, update the model status of the business model.
[0055] In this embodiment, the user-input table data is bidirectionally bound to the business model through the business model layer. This includes triggering table updates when model data changes, and updating the model state of the business model when table data changes. By decoupling table data from business logic through the data model, model-based table behavior is achieved, enhancing system integration capabilities.
[0056] In some embodiments, the business model layer may optionally also be used to provide data binding, logic control, state management, and data consistency assurance mechanisms.
[0057] like Figure 4 As shown, according to an embodiment of the formula editing method based on dynamic visual interaction proposed in this application, the method listens for user operation events and controls the dynamic switching of the formula between editing and browsing states according to the event type, including the following steps:
[0058] Step S402: Determine whether the user has entered the editing state by listening to the pre-editing event. If the calculation formulas in the editing state and the browsing state are inconsistent, write the formula in the editing state by calling the formula modification event in the listening event. When switching back to the browsing state, reread the formula returned from the query list and display the calculation result in the browsing state.
[0059] In this embodiment, user operation events are monitored, and the formula is dynamically switched between editing and browsing states based on the event type. This includes determining whether the user has entered the editing state by monitoring the pre-editing event. If the calculation formulas in the editing and browsing states are inconsistent, the formula in the editing state is written by calling the formula modification event in the monitoring event. When switching back to the browsing state, the formula returned from the query list is reread to display the calculation result in the browsing state, thus meeting complex business needs.
[0060] like Figure 5 As shown, according to an embodiment of the formula editing method based on dynamic visual interaction proposed in this application, the method listens for user operation events and controls the dynamic switching of the formula between editing and browsing states according to the event type, and further includes the following steps:
[0061] Step S502: Operate the formula by extending the script.
[0062] In this embodiment, user operation events are monitored, and the formula is dynamically switched between editing and browsing states based on the event type. It also includes manipulating formulas via extended scripts. By supporting business groups to manipulate formulas at different times via extended scripts, such as clearing or re-executing formulas, different business needs can be met.
[0063] In some embodiments, the formula engine may optionally include a formula parser and a calculator, which are used to convert various business formulas input by the user into unified executable calculation logic.
[0064] like Figure 6 As shown, an embodiment of the second aspect of this application provides a formula editing system 10 based on dynamic visual interaction, including: a receiving module 110, used to receive user input through a front-end table interaction layer, the user input including one or a combination of the following: cell editing, formula input, or data display; a calculation module 120, used to parse and calculate the user input locally on the client through a formula engine, obtain the calculation result, and return the calculation result to the front-end table interaction layer for real-time display; a binding module 130, used to bidirectionally bind the table data input by the user to the business model through a business model layer; and a switching module 140, used to listen to user operation events and control the dynamic switching of the formula between the editing state and the browsing state according to the event type.
[0065] The formula editing system 10 based on dynamic visual interaction provided in this embodiment includes a receiving module 110, a calculation module 120, a binding module 130, and a switching module 140. The receiving module 110 receives user input through a front-end table interaction layer. User input includes one or a combination of the following: cell editing, formula input, or data display. The calculation module 120 parses and calculates the user input locally on the client side using a formula engine, obtains the calculation result, and returns the result to the front-end table interaction layer for real-time display. The binding module 130 binds the user-input table data to the business model through a business model layer. The switching module 140 listens for user operation events and dynamically switches the formula between editing and browsing states based on the event type. The front-end table interaction layer provides an Excel-like user interface, supporting operations such as cell editing, formula input, and data display. The formula engine is a core calculation component independent of table controls, capable of converting various business formulas into unified executable calculation logic, supporting real-time calculation, and eliminating dependence on back-end calculations. The business model layer decouples tabular data from business logic through a data model, enabling model-driven tabular behavior and providing robust data binding, logic control, state management, and consistency assurance mechanisms. The server returns formulas and standardized data, allowing the client to perform formula conversion and calculation locally. It supports switching between edit and view modes, formula state control, and batch processing, thereby improving user experience and system performance. The front-end formula calculation engine reduces dependence on back-end services, improving user operation response efficiency. It also supports switching between edit and view formula modes to meet complex business needs. The business model layer achieves two-way binding between tables and business models, enhancing system integration capabilities. The front-end handles formula logic uniformly, reducing interface development and maintenance work.
[0066] like Figure 7 As shown, an embodiment of the third aspect of this application provides a formula editing system 20 based on dynamic visual interaction, including: a memory 300 and a processor 400, wherein the memory 300 stores a program or instructions that can be executed on the processor 400, and when the processor 400 executes the program or instructions, it implements the steps of the formula editing method based on dynamic visual interaction of any one of the embodiments of the first aspect, and thus has the technical effects of any embodiment of the first aspect, which will not be repeated here.
[0067] An embodiment of the fourth aspect of this application provides a readable storage medium storing a program or instructions thereon. When the program or instructions are executed by a processor, they implement the steps of the formula editing method based on dynamic visual interaction in any of the embodiments of the first aspect, and thus have the technical effects of any of the embodiments of the first aspect described above, which will not be repeated here.
[0068] like Figures 8 to 11As shown, according to a specific embodiment of the formula editing method based on dynamic visual interaction provided in this application, an innovative front-end table processing architecture is proposed, which includes three core components:
[0069] Front-end table interaction layer: Provides an Excel-like user interface that supports operations such as cell editing, formula input, and data display;
[0070] Formula Engine: A core calculation component independent of table controls, including a formula parser and calculator. It can convert various business formulas into unified executable calculation logic, supports real-time calculation, and eliminates dependence on backend calculations.
[0071] Business Model Layer: By decoupling tabular data from business logic through data models, it enables model-based tabular behavior-driven operations and provides a complete data binding, logic control, state management, and consistency guarantee mechanism.
[0072] This embodiment provides a formula editing method based on dynamic visual interaction, aiming to solve problems in traditional spreadsheet systems such as formula reliance on the backend, slow response, frequent API calls, and poor frontend rendering performance. By having the server return formulas and standardized data, the client performs formula conversion and calculation locally, supporting switching between edit and browse modes, formula status control, and batch processing, thereby improving user experience and system performance.
[0073] Its overall architecture design is as follows Figure 8 As shown.
[0074] The core capabilities of the front-end table interaction layer (user interaction entry point) are: Excel-like interface, cell editing, formula input interaction, and real-time data display.
[0075] The core components of the formula engine (core calculation) are: formula parser (parses business formulas) and calculator (executes calculation logic).
[0076] Core capabilities of the business model layer (data & logic processing): decoupling of tabular data, binding of business logic, data state management, and ensuring data consistency.
[0077] The traditional formula calculation process in a spreadsheet is as follows: User makes a modification; an API request is triggered to transmit the modification information; the backend retrieves the information; it determines whether the formula has been triggered and the value has changed; if so, it returns the modified value; it writes back the data and updates the entire spreadsheet; if not, it updates the modified cell value.
[0078] Formula conversion:
[0079] The formula engine parses formulas, returns them along with the data when querying the list, converts them into Excel-like formulas, writes them into the corresponding locations, performs real-time calculations when editing cells, and avoids frequent calls to background services; when saving, it updates the changed values to the model in batches.
[0080] Formula conversion such as Figure 9 As shown, step S602: Configure the plan scope formula; step S604: Replace the dimension id in the formula with the key in the recordList; step S606: Replace the dimension, indicator, and time frame with the corresponding level according to the view type; step S608: Parse the formula; step S610: Query the demand plan; step S612: Obtain the calculation scope configuration formula; step S614: Convert the formula into a front-end table control formula; step S616: Write it to the corresponding position in the table. Here, RecordList is a collection of objects containing multiple Record objects.
[0081] Core components such as Figure 10 As shown.
[0082] Status control module:
[0083] This system binds tabular data to the business model, automatically updating the table when the model data changes; conversely, it updates the model state synchronously when the table data is modified (e.g., formula results change), achieving two-way binding. It detects whether the user has entered edit mode by listening for pre-edit events. If the calculation formulas in edit mode and browsing mode are inconsistent, the edit mode formula can be written by calling the relevant formula modification event in the listener. When switching back to browsing mode, the formula returned from the query list will be reread to display the browsing mode calculation result. It also supports business groups manipulating formulas at different times via extended scripts (clearing formulas, re-executing formulas) to meet different business needs.
[0084] State change logic as follows Figure 11 As shown:
[0085] Step S702: The front-end table control parses and renders the list formulas after batch writing.
[0086] Step S704: Click Edit;
[0087] Step S706: Determine whether to use the browsing state formula. If yes, proceed to step S708; otherwise, proceed to step S714.
[0088] Step S708: The domain passes the edit-state formula through the extended script;
[0089] Step S710: Read the edited formulas, re-enter the formulas in batches for calculation, and render the page;
[0090] Step S712: Modify the data according to the formula in edit mode;
[0091] Step S714: Change from browse mode to edit mode; the modified data is still calculated according to the default formula.
[0092] Step S716: Save the updated data to the model and change the view state from edit state to view state.
[0093] Batch processing and automatic formula updates:
[0094] In this embodiment, when users perform batch pasting, cell filling, and other operations, the system identifies the affected cell range and calls the formula calculation engine in batches to update (front-end calculation), avoiding triggering the interface for each cell individually, thus improving performance and response speed.
[0095] This embodiment has been used in business scenarios such as supply chain demand planning and sales forecasting workbench, supply chain planning workbench, and production scheduling workbench in the manufacturing field.
[0096] In summary, the beneficial effects of the embodiments of this application are as follows:
[0097] 1. Fast response speed: The front-end formula calculation engine reduces dependence on back-end services and improves the efficiency of user operation response.
[0098] 2. Supports batch processing: Batch identification of affected cells and unified calculation significantly improves performance.
[0099] 3. Flexible state control: Supports switching between edit and browse states for formulas, meeting complex business needs.
[0100] 4. Strong model linkage: The system achieves two-way binding between tables and business models through layer-by-layer model integration, enhancing system integration capabilities.
[0101] 5. Low development and maintenance costs: The front end handles formula logic uniformly, reducing interface development and maintenance work.
[0102] In this application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance; the term "multiple" refers to two or more unless otherwise expressly defined. The terms "install," "connect," "link," and "fix" should be interpreted broadly. For example, "connect" can mean a fixed connection, a detachable connection, or an integral connection; "link" can mean a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0103] In the description of this application, it should be understood that the terms "upper", "lower", "front", "rear", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or module referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0104] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0105] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A formula editing method based on dynamic visual interaction, characterized in that, include: The user input is received through the front-end table interaction layer. The user input includes one or a combination of the following: cell editing, formula input, or data display. The formula engine parses and calculates the user input locally on the client side to obtain the calculation result, and then returns the calculation result to the front-end table interaction layer for real-time display. The business model layer enables two-way binding between the user-input form data and the business model. Listen for user action events and dynamically switch the formula between editing and browsing modes based on the event type.
2. The formula editing method based on dynamic visual interaction according to claim 1, characterized in that, Also includes: In response to the user's batch data operation command, the system identifies the cell range affected by the batch operation and calls the formula engine in batches to uniformly update and calculate the formulas within the cell range.
3. The formula editing method based on dynamic visual interaction according to claim 1, characterized in that, The step of bidirectionally binding user-input table data with the business model through the business model layer includes: When the model data changes, a table update is triggered. When the table data changes, the model state of the business model is updated.
4. The formula editing method based on dynamic visual interaction according to claim 3, characterized in that, The business model layer is also used to provide data binding, logic control, state management and data consistency guarantee mechanisms.
5. The formula editing method based on dynamic visual interaction according to claim 1, characterized in that, The process of listening to user operation events and dynamically switching between editing and browsing states based on the event type includes: By listening to the pre-edit event, it is determined whether the user has entered the editing state. If the calculation formulas in the editing state and the browsing state are inconsistent, the formula modification event is called in the listening event to write the formula in the editing state. When switching back to the browsing state, the formula returned by the query list is reread to display the calculation result in the browsing state.
6. The formula editing method based on dynamic visual interaction according to claim 5, characterized in that, The method of listening to user operation events and dynamically switching between editing and browsing states based on event type also includes: Formulas can be manipulated by extending scripts.
7. The formula editing method based on dynamic visual interaction according to any one of claims 1 to 6, characterized in that, The formula engine includes a formula parser and a calculator, which are used to convert various business formulas input by the user into unified executable calculation logic.
8. A formula editing system based on dynamic visual interaction, characterized in that, include: The receiving module is used to receive user input through the front-end table interaction layer. The user input includes one or a combination of the following: cell editing, formula input, or data display. The calculation module is used to parse and calculate the user input locally on the client through the formula engine, obtain the calculation result, and return the calculation result to the front-end table interaction layer for real-time display. The binding module is used to two-way bind user-input table data to the business model through the business model layer; The switching module is used to listen for user operation events and control the dynamic switching between editing and browsing modes of the formula based on the event type.
9. A formula editing system based on dynamic visual interaction, characterized in that, include: A memory (300) and a processor (400), wherein the memory (300) stores a program or instructions executable on the processor (400), and the processor (400) executes the program or instructions to implement the steps of the formula editing method based on dynamic visual interaction as described in any one of claims 1 to 7.
10. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or the instructions are executed by the processor, they implement the steps of the formula editing method based on dynamic visual interaction as described in any one of claims 1 to 7.