CN115658144B - Electronic form formula on-demand calculation method and device - Google Patents

Electronic form formula on-demand calculation method and device Download PDF

Info

Publication number
CN115658144B
CN115658144B CN202211575907.1A CN202211575907A CN115658144B CN 115658144 B CN115658144 B CN 115658144B CN 202211575907 A CN202211575907 A CN 202211575907A CN 115658144 B CN115658144 B CN 115658144B
Authority
CN
China
Prior art keywords
cell
value
cells
target cell
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211575907.1A
Other languages
Chinese (zh)
Other versions
CN115658144A (en
Inventor
翟晨辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Grape City Software Co ltd
Original Assignee
Xi'an Grape City Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Grape City Software Co ltd filed Critical Xi'an Grape City Software Co ltd
Priority to CN202211575907.1A priority Critical patent/CN115658144B/en
Publication of CN115658144A publication Critical patent/CN115658144A/en
Application granted granted Critical
Publication of CN115658144B publication Critical patent/CN115658144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses an on-demand calculation method and device for an electronic form formula, and belongs to the technical field of electronic form information processing. The method specifically comprises the following steps: creating a storage unit for each cell of the electronic form; the storage unit is used for storing the cache value, the state and the formula of the cell, and the state comprises state parameters: an effective parameter and an ineffective parameter; when the value of one cell is changed, the state parameters of the cell with the changed value and all the subsequent cells on the dependency chain are set as invalid parameters; when the value of the target cell is obtained, if the target cell has a formula and the state parameter is an invalid parameter, the updating step is executed. The method realizes the on-demand calculation of the cells in the electronic table, and avoids the problems of system blocking and repeated calculation caused by updating a large amount of data in the electronic table at one time.

Description

Electronic form formula on-demand calculation method and device
Technical Field
The present disclosure relates to the field of electronic form information processing technologies, and in particular, to an on-demand electronic form formula calculation method and apparatus.
Background
Spreadsheets are a type of computer program or component that can input and output, display data, and process data in electronic devices. Spreadsheets are typically composed of one or more worksheets, each worksheet being composed of a number of rows and columns that intersect to form cells, each cell being identified by its row and column number (also known as a cell address). Various types of information can be input and displayed in the cell, including: numerical values, characters, dates, images, links, mathematical formulas, objects and the like, and the association relationship among the cells can be established, so that the method is widely applied to the fields of intelligent office work, data management, statistics and the like.
The cells of the electronic form can be connected through a formula to realize mathematical operation. When a value in one cell changes, other cells that depend on it need to be recalculated. In the prior art, when the value of one cell is changed, the values in all cells having a dependency relationship with the cell are automatically updated once, but when the number of cells relying on the cell is very large, a large number of cells are time-consuming to calculate, and meanwhile, the burden of a processor is increased, obvious clamping occurs, and the user experience is affected. On the other hand, the updated cell data cannot be used completely, so that a method for updating all cells at one time can increase a lot of unnecessary computation, even the situation of repeated computation can occur, unnecessary processing time and processing cost are increased, and the waste of computing resources is caused.
Disclosure of Invention
According to the method and the device for calculating the spreadsheet formula according to the need, the problems that after the median value of the cell is changed, the cell depending on the median value is updated all at once, a large amount of data calculation increases the burden of a processor, a large amount of data in the temporarily unused cell is updated, unnecessary processing time and processing cost are increased, and the waste of calculation resources is caused are solved. According to the embodiment of the application, the cell calculation on demand in the electronic form is realized, only the data or the cell in the acquired cell appears in the visible area during interface refreshing, the cell can be calculated, unnecessary cell calculation is reduced, system blocking is avoided, and user experience is improved.
In a first aspect, an embodiment of the present application provides a method for on-demand calculation of a spreadsheet formula, including: creating a storage unit for each cell of the electronic form; the storage unit is used for storing the cache value, the state and the formula of the cell, and the state comprises state parameters: an effective parameter and an ineffective parameter; when the value of one cell is changed, setting the state parameters of the cell with the changed value and all the subsequent cells on the dependency chain as the invalid parameters; when the value of the target cell is obtained, if the formula exists in the target cell and the state parameter is the invalid parameter, an updating step is executed; the updating step comprises the following steps: determining a dependent cell of the target cell, and updating the target cell according to the dependent cell of the target cell and the storage unit; changing the updated state parameters of the target cells into the valid parameters.
With reference to the first aspect, in a first possible implementation manner, the electronic table further includes a valuation function and a valuation function; the assignment function is used for changing the value in the cell, and the value function is used for obtaining the value in the cell.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the obtaining the value of the target cell includes obtaining, by the value taking function, the value or a visible area when the target cell appears in the refresh interface.
With reference to the first aspect, in a third possible implementation manner, the buffer value is used to store a latest update result of the cell.
With reference to the first aspect, in a fourth possible implementation manner, the updating the target cell according to the dependent cell and the storage unit of the target cell includes: calculating the target cell according to the formula of the target cell and the dependent cell thereof by using a calculation engine; and storing the calculation result into the cache value of the target cell and returning the calculation result to the target cell.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner, the updating the target cell according to the dependent cell and the storage unit of the target cell further includes: if the dependent cells have a dependent relationship, updating the dependent cells until the state parameters of all the precursor cells of the target cells on the dependent chain are the effective parameters.
In a second aspect, embodiments of the present application provide a spreadsheet formula on-demand computing device comprising: a storage unit creating module for creating a storage unit for each cell of the electronic form; the storage unit is used for storing the cache value, the state and the formula of the cell, and the state comprises state parameters: an effective parameter and an ineffective parameter; a modification parameter module, configured to set, when a value of one of the cells changes, the state parameters of the cell with the changed value and all the subsequent cells on the dependency chain thereof as the invalid parameters; the updating module is used for executing an updating step when the value of the target cell is acquired, if the formula exists in the target cell and the state parameter is the invalid parameter; the updating step comprises the following steps: determining a dependent cell of the target cell, and updating the target cell according to the dependent cell of the target cell and the storage unit; changing the updated state parameters of the target cells into the valid parameters.
With reference to the second aspect, in a first possible implementation manner, the electronic table further includes a valuation function and a valuation function; the assignment function is used for changing the value in the cell, and the value function is used for obtaining the value in the cell.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the obtaining the value of the target cell includes obtaining, by the valued function, the value or a visible area when the target cell appears in the refresh interface.
With reference to the second aspect, in a third possible implementation manner, the buffer value is used to store a latest update result of the cell.
With reference to the second aspect, in a fourth possible implementation manner, the updating the target cell according to the dependent cell and the storage unit of the target cell includes: calculating the target cell according to the formula of the target cell and the dependent cell thereof by using a calculation engine; and storing the calculation result into the cache value of the target cell and returning the calculation result to the target cell.
With reference to the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner, the updating the target cell according to the dependent cell and the storage unit of the target cell further includes: if the dependent cells have a dependent relationship, updating the dependent cells until the state parameters of all the precursor cells of the target cells on the dependent chain are the effective parameters.
In a third aspect, embodiments of the present application provide an apparatus, including: a processor; a memory for storing processor-executable instructions; the processor, when executing the executable instructions, implements a method as described in the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a non-transitory computer readable storage medium comprising instructions for storing a computer program or instructions which, when executed, cause a method as described in the first aspect or any one of the possible implementations of the first aspect to be implemented.
One or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
according to the method and the device for calculating the electronic form formula according to the need, the storage unit is built for each cell in the electronic form, when data in the electronic form is changed, only the state parameters of the cells on the dependency chain are changed, whether the cells are updated or not is judged, the cells which are not used currently are postponed to update, only the data in the cells which are used currently are updated, system blocking caused by updating a large amount of data at one time is avoided, meanwhile, repeated calculation of the built cell storage unit can be avoided, the electronic form calculation according to the need is realized by combining the built cell storage unit with postponed updating, the problem that the system blocking is caused by excessive calculation amount caused by updating all cells with dependency relations at one time is effectively solved, the calculation performance can be improved, and unnecessary processing time and processing cost are reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the embodiments of the present application or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for on-demand calculation of spreadsheet formulas provided by embodiments of the present application;
FIG. 2 is a schematic diagram of an update step according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating steps for updating target sheets and cells according to an embodiment of the present disclosure;
FIG. 4 is a method roadmap of the spreadsheet formula on-demand calculation method provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a spreadsheet formula on-demand computing device provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a dependency relationship of a spreadsheet according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Some of the techniques involved in the embodiments of the present application are described below to aid understanding, and they should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, for the sake of clarity and conciseness, descriptions of well-known functions and constructions are omitted in the following description.
The spreadsheet creates a relationship between cells through a formula, and after a change in the value in one cell, the other cells that depend on it need to be recalculated. In the embodiment of the present application, all cells that depend on a cell are referred to as successor cells, and all cells that are depended on by the cell are referred to as predecessor cells. As shown in fig. 6, B1 has the formula: =a1+2, C1 has the formula: =b1×2, D1 has the formula: =e1×2. We can get such a dependency: b1 depends on A1, C1 depends on B1, D1 depends on E1. From the above dependency relationship, it can be determined that there are two dependency chains: c1- > B1- > A1 and D1- > E1. In the dependency chain C1- > B1- > A1, cell C1 is a subsequent cell to cell B1, and cell A1 is a precursor cell to cell B1. When the value in cell A1 changes, the subsequent cells B1 and C1 on the dependency chain need to be recalculated; when the value in the cell B1 changes, only the subsequent cell C1 needs to be recalculated, and the precursor cell A1 does not need to be calculated; when the value in cell E1 changes, the subsequent cell D1 on the dependency chain needs to be recalculated. Wherein, the foregoing C1- > B1- > A1 and D1- > E1 are an expression form of the dependency chain in the embodiments of the present application, where "- >" is used to indicate a unidirectional dependency relationship between cells, and "< -" may also be used to identify a unidirectional dependent relationship between cells, and a person skilled in the art may use other various forms when describing the dependency chain, and is not used to specifically limit the protection scope of the embodiments of the present application.
On the other hand, the cell with no formula in the electronic table can modify its value, and the other cells which rely on the formula to calculate the value are actually formulas, but the calculation result of the formulas is displayed in the cell, and the cell with the formula can modify the formula and change the formula to a specific value, but after changing the formula to the specific value, the cell will lose all the precursor cells. Wherein the values in the cells may be text, boolean types, or others in addition to formulas and values. In the electronic table shown in fig. 6, the formulas are not present in the cells A1 and E1, so that the values in the cells can be directly modified, and when the interface is refreshed or acquired, the values in the cells B1, C1 and D1 are obtained according to the formulas, so that when the interface is refreshed or the values of the cells are acquired, the cells with the formulas need to be judged whether to be updated, and further whether to update the values in the cells is determined.
Fig. 1 is a flowchart of a method for on-demand calculation of a spreadsheet formula provided in an embodiment of the present application, including steps 101 to 103. Wherein fig. 1 is only one execution order shown in the embodiments of the present application, and does not represent the only execution order of the on-demand calculation method of the spreadsheet formula, and the steps shown in fig. 1 may be executed in parallel or upside down in case that the final result can be achieved.
Step 101: creating a storage unit for each cell of the electronic form; the storage unit is used for storing the cache value, the state and the formula of the cell, and the state comprises state parameters: an active parameter and an inactive parameter. The method comprises the following steps:
in this embodiment of the present application, three storage units are set for each cell, and Value, status, and Formula are stored respectively, that is, the cache Value, the state, and the Formula are stored respectively, the state includes two state parameters, that is, an effective parameter and an ineffective parameter, the effective parameter is used to represent the effective state, the ineffective parameter is used to represent the ineffective state, the effective parameter is Valid, and the ineffective parameter is Dirty. The cache value of the cell is used to store the last updated result of the cell. The electronic table also comprises an assignment function and a value function; the valuation function is used to change the value in the cell and the valuation function is used to obtain the value in the cell. In the embodiment of the application, the valuation function uses SetValue (), the valuation function uses GetValue (), the cells are not calculated and updated when the valuation function SetValue (object value) is used, and only when the value is acquired by using GetValue (), the judgment of whether the cells need to be calculated or not is started, and the calculation is initiated. Even if the value in a cell is changed for numerous times, the cell depending on the cell is not updated immediately along with the change of the cell, and the cell is judged to be updated once only when the cell is acquired, so that the system efficiency can be greatly improved, and multiple times of calculation are avoided. In the embodiment of the present application, value, status, formula, valid, dirty, setValue () and GetValue () are only examples, and are not limited to the embodiment of the present application, and those skilled in the art should understand that they are named and may be modified according to practical situations.
Step 102: when the value of one of the cells changes, the state parameters of the cell with the changed value and all the subsequent cells on the dependency chain are set as invalid parameters. Specifically, when the value in one cell is changed, the dependency chain of the cell with the changed value is determined, the state parameters of the cell and all the subsequent cells on the dependency chain are changed into invalid parameters, only the cells with invalid state parameters on the dependency chain are updated in the later updating process, and other irrelevant cells or cells with valid state parameters do not need to be calculated. In the embodiment of the application, the cell without the formula is empty in the storage unit established for the cell, and the formula is represented by null. On the other hand, there are various ways of confirming the dependency chain and establishing the dependency chain in the prior art, which are not specifically described herein, and in the embodiment of the present application, the accurate dependency relationship is obtained only according to the dependency chain, and further, the data update is performed by using the dependency chain, and the establishment method and the confirmation method of the dependency chain are not limited.
Step 103: when the value of the target cell is obtained, if the target cell has a formula and the state parameter is an invalid parameter, the updating step is executed. In step 403 to step 405 in fig. 4, the target cell is first determined when the value in the target cell is obtained, and the calculating step is performed only when the target cell has a formula and the state parameter is an invalid parameter. If the target cell does not have a formula or the state parameter is a valid parameter, the value can be directly obtained. The updating step is shown in fig. 2, and includes steps 201 to 202, specifically as follows:
step 201: and determining the dependent cell of the target cell, and updating the target cell according to the dependent cell and the storage cell of the target cell. The updating of the target cell according to the dependent cell and the storage unit of the target cell is shown in fig. 3, and includes steps 301 to 302, specifically as follows:
step 301: the calculation engine is used to calculate the target cell from its formulas and its dependent cells. And calling a calculation engine to calculate the target cell according to the formula of the target cell and the values in the dependent cells. As shown in steps 407 to 410 in fig. 4, when the value in the first dependency cell is obtained, it is further required to determine whether the second dependency cell exists in the first dependency cell of the target cell, and if the second dependency cell does not exist in the first dependency cell, the value in the first dependency cell is directly returned and substituted into the formula for calculation; if the first dependent cell has a second dependent cell, the first dependent cell is judged and calculated according to the updating steps 403 to 410 of the target cell, and if the second dependent cell has a third dependent cell, the second dependent cell is used as the first dependent cell to perform iterative calculation until values in all precursor cells of the target cell are calculated. The computing engine is in a working state in a default state, but a user can control the computing engine to stop working according to a preset API, so that in order to ensure that the step can be executed correctly when the computing engine is used, a step of judging whether the computing engine works or not can be added according to actual conditions by a person skilled in the art, and the method still belongs to the protection scope of the invention.
Step 302: and storing the calculation result into the cache value of the target cell and returning the calculation result to the target cell. Specifically, the calculation result calculated by the calculation engine in step 201 is stored in the cache value of the target cell, and then the calculation result is returned to the target cell.
Step 202: changing the updated state parameters of the target cells into effective parameters. Specifically, when a cell whose state parameter is an invalid parameter is updated, the state parameter of the cell needs to be changed into the valid parameter. In step 301, if the dependent cell of the current target cell still has a dependent cell, the values in all the precursor cells need to be calculated iteratively, and the state parameters of the dependent cells after each calculation are changed into valid parameters until the state parameters of all the precursor cells on the dependency chain are valid parameters. In the embodiment of the application, as long as the state parameter of the cell is an effective parameter, calculation and updating of the cell are not needed when the value judgment is carried out, but the cache value is returned to the value function, so that unnecessary repeated calculation is avoided.
Wherein step 103 obtaining the value of the target cell includes obtaining the value of the target cell by a valued function or a visible area when the refresh interface appears. Specifically, in this embodiment of the present application, by deferring calculation, that is, after a value in a cell is changed by a valuation function, all subsequent cells of the cells with changed values are not updated immediately, and when the cell is obtained by the valuation function, whether the cell needs to be updated for calculation is judged according to an established storage unit, where the cells obtained by the valuation function are target cells, and the target cells include a single cell obtained by the valuation function or a cell in which the valuation function in a visible area is simultaneously valued when the interface is refreshed. When the value in one cell is changed, the system sends an asynchronous message for refreshing the interface, and a large amount of updating calculation is caused when the interface is refreshed, but the data in the whole electronic form is very large, and a user only can see dozens of cells in the current visual area, so that the value taking function only can acquire the value in one cell in the current visual area when the interface is refreshed, the cells in the visual area are updated only, other cells can delay calculation, and the value is acquired again when the cell appears in the visual area of the interface for updating calculation, so that a large amount of cell updating is delayed, and only dozens of cells in the visual area are calculated each time, thereby effectively reducing the calculation workload of each updating of the system.
It should be noted that the dependency chain mentioned in the update calculation in the embodiment of the present application is not necessarily an entire complete dependency chain, but includes a section of the dependency chain on the entire dependency chain. Specifically, in step 102, the state parameters of the cell with the changed value and all the subsequent cells on the dependency chain are set as invalid parameters, where the dependency chain is the entire complete dependency chain, and in other steps of performing update calculation, the dependency chain is the section of the dependency chain from the cell with the changed value to the target cell with the acquired value. For example, if there is a dependency chain F1- > E1- > D1- > C1- > B1- > A1, after changing the value in the cell A1, the state parameters of all the cells on the dependency chain need to be modified to invalid parameters, and when the value in the cell D1 is acquired, the determined dependency chain is the segment of the dependency chain from the precursor cell A1 of the cell D1 to the cell D1. Those skilled in the art will recognize the difference in execution between the two based on the on-demand computing methodology of the present application embodiment.
Although the present application provides method operational steps as described in the examples or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive labor. The order of steps recited in the present embodiment is only one way of performing the steps in a plurality of steps, and does not represent a unique order of execution. When implemented by an actual device or client product, the method of the present embodiment or the accompanying drawings may be performed sequentially or in parallel (e.g., in a parallel processor or a multithreaded environment).
As shown in FIG. 5, embodiments of the present application also provide a spreadsheet formula on-demand computing device 500. The device comprises: a create storage unit module 501, a modify parameters module 502, and an update module 503.
The create storage unit module 501 is configured to create a storage unit for each cell of the electronic form; the storage unit is used for storing the cache value, the state and the formula of the cell, and the state comprises state parameters: an active parameter and an inactive parameter. The storage unit creating module 501 is specifically configured to set three storage units for each cell, and store the cache value, the state and the formula respectively. The state comprises two state parameters, namely an effective parameter and an ineffective parameter, wherein the effective parameter is used for representing the effective state, and the ineffective parameter is used for representing the ineffective state. The cache value of the cell is used to store the last updated result of the cell. The electronic table also comprises an assignment function and a value function; the valuation function is used to change the value in the cell and the valuation function is used to obtain the value in the cell. In the embodiment of the application, the SetValue () is used as the assignment function, the GetValue () is used as the value-taking function, the cell is not calculated and updated when the assignment function SetValue (object value) is used, and only when the GetValue () is used to obtain the value, the judgment of whether the cell needs to be calculated or not is started, so that the calculation can be initiated.
The modification parameter module 502 is configured to set, when a value of one of the cells is changed, the state parameters of the cell with the changed value and all subsequent cells in the dependency chain thereof as the invalid parameters. The modification parameter module 502 is specifically configured to, when changing a value in a cell, determine a dependency chain of the cell with the changed value, set a state parameter of the cell and all subsequent cells on the dependency chain as an invalid parameter, and update only the subsequent cells on the dependency chain in a later update process, where no calculation is required for other cells with no change in irrelevant or state parameters.
The updating module 503 is configured to execute an updating step when the value of the target cell is obtained, if the formula exists in the target cell and the state parameter is the invalid parameter; the updating step comprises the following steps: determining a dependent cell of the target cell, and updating the target cell according to the dependent cell of the target cell and the storage unit; changing the updated state parameters of the target cells into the valid parameters. The updating module 503 is specifically configured to determine the target cell according to the storage unit when the value in the target cell is obtained, and perform the updating step only when the target cell has a formula and the state parameter is an invalid parameter. Updating the target cell by the dependent cell and the storage unit of the target cell in the updating module 503 is specifically configured to calculate the target cell by using a calculation engine according to the formula of the target cell and the dependent cell thereof; and storing the calculation result into the cache value of the target cell and returning the calculation result to the target cell. Specifically, according to the determined dependency chain of the target cell, determining the dependency cell of the target cell, and calling a calculation engine to calculate the target cell according to the formula of the target cell and the value in the dependency cell. And storing the calculation result into the cache value of the target cell, returning the calculation result to the target cell, and changing the state parameter of the target cell into an invalid parameter. If the dependent cells of the current target cell still have the dependent cells, the values in all the precursor cells need to be calculated in an iterative manner, and the state parameters of the dependent cells after each calculation are changed into effective parameters until the state parameters of all the precursor cells on the dependent chain are effective parameters. In the embodiment of the application, as long as the state parameter of the cell is an effective parameter, calculation and updating of the cell are not needed when the value judgment is carried out, but the cache value is returned to the value function, so that unnecessary repeated calculation is avoided.
The storage medium includes, but is not limited to, a random access Memory (hereinafter referred to as RAM), a Read-Only Memory (hereinafter referred to as ROM), a Cache Memory (hereinafter referred to as Cache), a Hard disk (hereinafter referred to as HDD), or a Memory card (hereinafter referred to as Memory card). The memory may be used to store computer program instructions.
The apparatus or module set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. For convenience of description, the above devices are described as being functionally divided into various modules, respectively. The functions of the various modules may be implemented in the same piece or pieces of software and/or hardware when implementing the present application. Of course, a module that implements a certain function may be implemented by a plurality of sub-modules or a combination of sub-units.
The methods, apparatus or modules described herein may be implemented in computer readable program code means and in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (english: application Specific Integrated Circuit; abbreviated: ASIC), programmable logic controllers and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller can be regarded as a hardware component, and means for implementing various functions included therein can also be regarded as a structure within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The embodiment of the application also provides equipment, which comprises: a processor; a memory for storing processor-executable instructions; the processor, when executing the executable instructions, implements a method as described in embodiments of the present application.
The embodiments also provide a non-transitory computer readable storage medium having stored thereon a computer program or instructions which, when executed, cause a method as described in the embodiments of the present application to be implemented.
In addition, each functional module in the embodiments of the present invention may be integrated into one processing module, each module may exist alone, or two or more modules may be integrated into one module.
The storage medium includes, but is not limited to, a random access Memory (hereinafter referred to as RAM), a Read-Only Memory (hereinafter referred to as ROM), a Cache Memory (hereinafter referred to as Cache), a Hard disk (hereinafter referred to as HDD), or a Memory card (hereinafter referred to as Memory card). The memory may be used to store computer program instructions.
From the description of the embodiments above, it will be apparent to those skilled in the art that the present application may be implemented in software plus necessary hardware. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, or may be embodied in the implementation of data migration. The computer software product may be stored on a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., comprising instructions for causing a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to perform the methods described in various embodiments or portions of embodiments herein.
In this specification, each embodiment is described in a progressive manner, and the same or similar parts of each embodiment are referred to each other, and each embodiment is mainly described as a difference from other embodiments. All or portions of the present application can be used in a number of general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the present application; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced with equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions.

Claims (8)

1. A method for on-demand calculation of a spreadsheet formula comprising:
creating a storage unit for each cell of the electronic form; the storage unit is used for storing the cache value, the state and the formula of the cell, and the state comprises state parameters: an effective parameter and an ineffective parameter;
when the value of one cell is changed, setting the state parameters of the cell with the changed value and all the subsequent cells on the dependency chain as the invalid parameters;
when the value of the target cell is obtained, if the formula exists in the target cell and the state parameter is the invalid parameter, an updating step is executed; the updating step comprises the following steps: determining a dependent cell of the target cell, and updating the target cell according to the dependent cell of the target cell and the storage unit; changing the updated state parameters of the target cells into the effective parameters; if the dependent cells have a dependent relationship, updating the dependent cells until the state parameters of all precursor cells of the target cells on the dependency chain are the effective parameters.
2. The method of claim 1, wherein the spreadsheet further comprises a valuation function and a valuation function;
the assignment function is used for changing the value in the cell, and the value function is used for obtaining the value in the cell.
3. The method of claim 2, wherein the obtaining the value of the target cell comprises the target cell being obtained by the valued function or a visible region occurring at a refresh interface.
4. The method of claim 1, wherein the cache value is used to store a last updated result of a cell.
5. The method of claim 1, wherein the updating the target cell from the dependent cell and the storage unit of the target cell comprises:
calculating the target cell according to the formula of the target cell and the dependent cell thereof by using a calculation engine;
and storing the calculation result into the cache value of the target cell and returning the calculation result to the target cell.
6. A spreadsheet formula on-demand computing device, comprising:
a storage unit creating module for creating a storage unit for each cell of the electronic form; the storage unit is used for storing the cache value, the state and the formula of the cell, and the state comprises state parameters: an effective parameter and an ineffective parameter;
a modification parameter module, configured to set, when a value of one of the cells changes, the state parameters of the cell with the changed value and all the subsequent cells on the dependency chain thereof as the invalid parameters;
the updating module is used for executing an updating step when the value of the target cell is acquired, if the formula exists in the target cell and the state parameter is the invalid parameter; the updating step comprises the following steps: determining a dependent cell of the target cell, and updating the target cell according to the dependent cell of the target cell and the storage unit; changing the updated state parameters of the target cells into the effective parameters; if the dependent cells have a dependent relationship, updating the dependent cells until the state parameters of all precursor cells of the target cells on the dependency chain are the effective parameters.
7. An apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
the processor, when executing the executable instructions, implements the method of any one of claims 1 to 5.
8. A non-transitory computer readable storage medium comprising instructions for storing a computer program or instructions which, when executed, cause the method of any one of claims 1 to 5 to be implemented.
CN202211575907.1A 2022-12-09 2022-12-09 Electronic form formula on-demand calculation method and device Active CN115658144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211575907.1A CN115658144B (en) 2022-12-09 2022-12-09 Electronic form formula on-demand calculation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211575907.1A CN115658144B (en) 2022-12-09 2022-12-09 Electronic form formula on-demand calculation method and device

Publications (2)

Publication Number Publication Date
CN115658144A CN115658144A (en) 2023-01-31
CN115658144B true CN115658144B (en) 2023-05-02

Family

ID=85020095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211575907.1A Active CN115658144B (en) 2022-12-09 2022-12-09 Electronic form formula on-demand calculation method and device

Country Status (1)

Country Link
CN (1) CN115658144B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102939585A (en) * 2010-06-15 2013-02-20 微软公司 Creating text functions from a spreadsheet
CN110008447A (en) * 2019-03-26 2019-07-12 湖南华美信息系统有限公司 The processing method and processing device of electrical form

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090228776A1 (en) * 2008-03-05 2009-09-10 Microsoft Corporation Dynamic formulas for spreadsheet cells
CN108268564B (en) * 2017-01-04 2020-08-14 珠海金山办公软件有限公司 Asynchronous calculation method and device for network function in spreadsheet
CN107766314B (en) * 2017-10-20 2021-07-09 网易(杭州)网络有限公司 Data processing method and device for electronic forms
CN112819309A (en) * 2021-01-25 2021-05-18 江西五十铃汽车有限公司 Employee performance scoring and payroll calculation system based on EXCEL software
CN112905090A (en) * 2021-02-08 2021-06-04 北京字跳网络技术有限公司 Spreadsheet processing method, device, terminal and storage medium
CN113420537B (en) * 2021-06-22 2023-01-31 平安科技(深圳)有限公司 Method, device, equipment and storage medium for processing electronic form data
CN114281823B (en) * 2021-12-17 2023-08-29 北京百度网讯科技有限公司 Form processing method, device, equipment, storage medium and product

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102939585A (en) * 2010-06-15 2013-02-20 微软公司 Creating text functions from a spreadsheet
CN110008447A (en) * 2019-03-26 2019-07-12 湖南华美信息系统有限公司 The processing method and processing device of electrical form

Also Published As

Publication number Publication date
CN115658144A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
US11568129B2 (en) Spreadsheet recalculation algorithm for directed acyclic graph processing
US20210248469A1 (en) Method and apparatus for scheduling deep learning reasoning engines, device, and medium
CN111625546B (en) Data writing method, device, equipment and medium
US20210049087A1 (en) Data monitoring methods, apparatuses, electronic devices, and computer readable storage media
US20160077874A1 (en) Method and System for Efficient Execution of Ordered and Unordered Tasks in Multi-Threaded and Networked Computing
CN108573348B (en) Financial index distributed computing method and system
CN113364877A (en) Data processing method, device, electronic equipment and medium
CN112905314A (en) Asynchronous processing method and device, electronic equipment, storage medium and road side equipment
CN115658144B (en) Electronic form formula on-demand calculation method and device
CN112948081B (en) Method, device, equipment and storage medium for processing tasks in delayed mode
CN116243978A (en) Data protocol method, device, medium and training system in distributed training
CN114721876A (en) Data backup method, device and medium
CN112817992B (en) Method, apparatus, electronic device and readable storage medium for executing change task
CN111857604A (en) Method, apparatus, device and medium for quickly reconstructing packet management mapping reverse lookup table
CN113360736B (en) Internet data capturing method and device
CN116244324B (en) Task data relation mining method and device, electronic equipment and storage medium
CN109409993A (en) Quotation acquisition methods, device, computer installation and the storage medium of computer resource
CN114327271B (en) Lifecycle management method, apparatus, device and storage medium
US20240111819A1 (en) Crawl Algorithm
CN115757452A (en) Blocking method, device, equipment and storage medium
CN117743467A (en) Agent node replacement method, device, equipment and storage medium
CN116302371A (en) Transaction visibility judging method, device, equipment and storage medium
CN115309568A (en) Method, device, equipment and medium for realizing multi-process file sharing
CN115033823A (en) Method, apparatus, device, medium and product for processing data
CN110879774A (en) Network element performance data warning method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant