CN113420537B - Method, device, equipment and storage medium for processing electronic form data - Google Patents

Method, device, equipment and storage medium for processing electronic form data Download PDF

Info

Publication number
CN113420537B
CN113420537B CN202110691808.9A CN202110691808A CN113420537B CN 113420537 B CN113420537 B CN 113420537B CN 202110691808 A CN202110691808 A CN 202110691808A CN 113420537 B CN113420537 B CN 113420537B
Authority
CN
China
Prior art keywords
cell
cells
target cell
target
data
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
CN202110691808.9A
Other languages
Chinese (zh)
Other versions
CN113420537A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202110691808.9A priority Critical patent/CN113420537B/en
Publication of CN113420537A publication Critical patent/CN113420537A/en
Priority to PCT/CN2022/071484 priority patent/WO2022267457A1/en
Application granted granted Critical
Publication of CN113420537B publication Critical patent/CN113420537B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Abstract

The invention relates to the technical field of big data, and discloses a spreadsheet data processing method, device, equipment and storage medium, which are used for improving the data processing efficiency of a spreadsheet. The electronic form data processing method includes: judging whether reference dependency exists between the target cell and other cells according to the formula expression corresponding to the target cell; if the target cell and other cells do not have a reference dependency relationship, setting the label attribute of the cell as a direct calculation label; if the target cell and other cells have a reference dependency relationship, setting the label attribute of the cell as a dependency calculation label; and setting the cell label attribute as a dependency calculation label, and calculating a plurality of cells in batches according to the cell label attribute, the cell dependency list and the cell notification list to obtain target spreadsheet information. In addition, the invention also relates to a block chain technology, and the target electronic table information can be stored in the block chain node.

Description

Method, device, equipment and storage medium for processing electronic form data
Technical Field
The invention relates to the field of data reports of big data technology, in particular to a method, a device, equipment and a storage medium for processing spreadsheet data.
Background
The data table processing refers to a process of analyzing the formula expression in the spreadsheet, integrating data in other data tables, and calculating the formula expression to obtain a result. Formulaic expressions typically include numbers, references to other cell data, and some commonly used functional operations and four arithmetic operations.
Since the formula expression has references to other cells, a multi-level dependency situation may occur. For example, the calculation of one of the formula expressions depends on the result of the formula expression of another cell, which depends on more formula expressions of other cells.
Most of the existing processing methods use a recursive mode, which essentially records the currently calculated cells by using a stack, and recursively calculates the dependent cells when the dependence is encountered until the result is obtained. The method is simple and direct, but the depth cannot be controlled in the calculation process, the debugging is difficult, and the memory and data processing resources are greatly consumed due to a recursive calling mode.
Disclosure of Invention
The invention provides a spreadsheet data processing method, device, equipment and storage medium, which are used for improving the calculation efficiency and data processing efficiency of formula expressions in spreadsheets.
To achieve the above object, a first aspect of the present invention provides a method for processing electronic form data, comprising: receiving a data table calculation request, and acquiring initial spreadsheet information according to the data table calculation request, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical type data or formula type data; obtaining a formula expression corresponding to a target cell from the plurality of cells, and judging whether reference dependency exists between the target cell and other cells according to the formula expression corresponding to the target cell, wherein the other cells are cells except the target cell in the plurality of cells; if the target cell and other cells have a reference dependency relationship, setting the cell label attribute corresponding to the target cell as a dependency calculation label, and performing data updating processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to the other cells; if the target cell and other cells do not have a reference dependency relationship, setting the cell label attribute corresponding to the target cell as a direct calculation label; and calculating the plurality of cells in batches according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cells, and generating and storing target spreadsheet information until all cells are calculated.
Optionally, in a first implementation manner of the first aspect of the present invention, the receiving a data table calculation request, and obtaining initial spreadsheet information according to the data table calculation request, where the initial spreadsheet information includes a plurality of cells, and each cell is used to store text type data, numeric type data, or formula type data, includes: receiving a data table calculation request, and performing parameter analysis on the data table calculation request to obtain a parameter analysis result; performing parameter verification processing on the parameter analysis result to obtain a verification result; when the verification result is that verification passes, extracting a form identifier from the parameter analysis result, and inquiring a preset data table according to the form identifier to obtain electronic form path information; and reading initial spreadsheet information from a preset file directory according to the spreadsheet path information, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical value type data or formula type data.
Optionally, in a second implementation manner of the first aspect of the present invention, the obtaining a formula expression corresponding to a target cell from the multiple cells, and determining whether there is a reference dependency relationship between the target cell and another cell according to the formula expression corresponding to the target cell, where the other cell is a cell other than the target cell in the multiple cells, includes: traversing and reading each cell in the initial spreadsheet information to obtain cell content corresponding to each cell; when the cell content corresponding to each cell meets a preset screening condition, acquiring a formula expression corresponding to a target cell; performing semantic analysis processing on the formula expression corresponding to the target cell through a preset syntax analysis tool to obtain an analysis result; judging whether cell names corresponding to other cells exist in the analysis result based on a preset cell configuration information table, wherein the other cells are cells except the target cell in the plurality of cells; if the cell names corresponding to other cells exist in the analysis result, determining that a reference dependency relationship exists between the target cell and the other cells; and if the cell names corresponding to other cells do not exist in the analysis result, determining that the reference dependency relationship does not exist between the target cell and the other cells.
Optionally, in a third implementation manner of the first aspect of the present invention, if there is a reference dependency relationship between the target cell and another cell, the setting the cell label attribute corresponding to the target cell as a dependency computation label, and performing data update processing on the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cell includes: if the target cell and other cells have a citation dependency relationship, setting the cell label attribute corresponding to the target cell as a dependency calculation label, and respectively reading the cell name corresponding to the target cell and the cell names corresponding to the other cells according to the position information corresponding to the target cell and the position information corresponding to the other cells; and adding the cell names corresponding to the other cells into the cell dependency list corresponding to the target cell, and adding the cell names corresponding to the target cell into the cell notification list corresponding to the other cells.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the performing batch calculation on the multiple cells according to the cell tag attribute corresponding to the target cell, the cell dependency list corresponding to the target cell, and the cell notification list corresponding to the other cells until all cells are calculated, and generating and storing target spreadsheet information includes: reading each cell one by one to obtain cell content corresponding to the target cell; when the cell content corresponding to the target cell is the text type data or the numerical value type data, setting the cell label attribute corresponding to the target cell as a calculated numerical value data label; when the cell content corresponding to the target cell is the formula type data and the cell label attribute corresponding to the target cell is the direct calculation label, calculating and updating the cell content corresponding to the target cell according to the formula expression corresponding to the target cell, and setting the cell label attribute corresponding to the target cell as a calculated numerical data label; when the cell content corresponding to the target cell is the formula type data and the cell label attribute corresponding to the target cell is the dependency calculation label, obtaining cell contents corresponding to all dependent cells according to a cell dependency list corresponding to the target cell, wherein all dependent cells comprise other cells; and calculating the plurality of cells in batches according to the cell contents corresponding to all the dependent cells and the cell notification list corresponding to the other cells respectively, and generating and storing target spreadsheet information until all the cells are calculated.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the performing batch calculation on the multiple cells according to the cell contents corresponding to all the dependent cells and the cell notification list corresponding to the other cells, until all the cells are calculated, generating and storing target spreadsheet information includes: when the cell content corresponding to any dependent cell is not the formula type data, stopping calculating the target cell, and continuing to perform data calculation processing on the cell adjacent to the target cell; when the cell contents corresponding to all the dependent cells are numerical data, calculating the formula expression corresponding to the target cell based on the cell contents corresponding to all the dependent cells to obtain a first calculation result, and setting the cell label attribute corresponding to the target cell as a calculated numerical data label; reading a plurality of cited cells from the cell notification list corresponding to the other cells, and sequentially notifying the cited cells so that the cited cells perform formula calculation according to the first calculation result to obtain a second calculation result; and setting the cell label attribute corresponding to each quoted cell as a calculated numerical data label according to the second calculation result until all cells are calculated, obtaining target spreadsheet information, and updating the target spreadsheet information to a preset database.
Optionally, in a sixth implementation manner of the first aspect of the present invention, after the batch-calculating the plurality of cells according to the cell tag attribute corresponding to the target cell, the cell dependency list corresponding to the target cell, and the cell notification list corresponding to the other cells, and until all cells are calculated, generating and storing target spreadsheet information, the method for processing spreadsheet data further includes: receiving a data verification request, performing data verification processing on the target electronic form information according to the data verification request to obtain a data verification result, and judging whether the data verification result is successful; and if the data verification result is successful, pushing the target electronic form information to a target terminal in a preset notification mode.
A second aspect of the present invention provides a spreadsheet data processing apparatus comprising: the acquisition module is used for receiving a data table calculation request and acquiring initial spreadsheet information according to the data table calculation request, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical value type data or formula type data; the judging module is used for acquiring a formula expression corresponding to a target cell from the plurality of cells, and judging whether a citation dependency relationship exists between the target cell and other cells according to the formula expression corresponding to the target cell, wherein the other cells are cells except the target cell in the plurality of cells; the processing module is used for setting the cell label attribute corresponding to the target cell as a dependency calculation label if the target cell and other cells have a reference dependency relationship, and performing data updating processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to the other cells; the setting module is used for setting the cell label attribute corresponding to the target cell as a direct calculation label if the reference dependency relationship does not exist between the target cell and other cells; and the generating module is used for calculating the plurality of cells in batches according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cells until all cells are calculated, and generating and storing target spreadsheet information.
Optionally, in a first implementation manner of the second aspect of the present invention, the obtaining module is specifically configured to: receiving a data table calculation request, and performing parameter analysis on the data table calculation request to obtain a parameter analysis result; performing parameter verification processing on the parameter analysis result to obtain a verification result; when the verification result is that verification passes, extracting a form identifier from the parameter analysis result, and inquiring a preset data table according to the form identifier to obtain electronic form path information; and reading initial spreadsheet information from a preset file directory according to the spreadsheet path information, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical value type data or formula type data.
Optionally, in a second implementation manner of the second aspect of the present invention, the determining module is specifically configured to: traversing and reading each cell in the initial spreadsheet information to obtain cell content corresponding to each cell; when the cell content corresponding to each cell meets a preset screening condition, acquiring a formula expression corresponding to a target cell; performing semantic analysis processing on the formula expression corresponding to the target cell through a preset syntax analysis tool to obtain an analysis result; judging whether cell names corresponding to other cells exist in the analysis result based on a preset cell configuration information table, wherein the other cells are cells except the target cell in the plurality of cells; if the cell names corresponding to other cells exist in the analysis result, determining that a reference dependency relationship exists between the target cell and the other cells; and if the cell names corresponding to other cells do not exist in the analysis result, determining that the reference dependency relationship does not exist between the target cell and the other cells.
Optionally, in a third implementation manner of the second aspect of the present invention, the processing module is specifically configured to: if the target cell and other cells have a citation dependency relationship, setting the cell label attribute corresponding to the target cell as a dependency calculation label, and respectively reading the cell name corresponding to the target cell and the cell names corresponding to the other cells according to the position information corresponding to the target cell and the position information corresponding to the other cells; and adding the cell names corresponding to the other cells into the cell dependency list corresponding to the target cell, and adding the cell names corresponding to the target cell into the cell notification list corresponding to the other cells.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the generating module includes: the reading unit is used for reading each cell one by one to obtain the cell content corresponding to the target cell; the setting unit is used for setting the cell label attribute corresponding to the target cell as a calculated numerical value data label when the cell content corresponding to the target cell is the text type data or the numerical value type data; the updating unit is used for calculating and updating the cell content corresponding to the target cell according to the formula expression corresponding to the target cell and setting the cell label attribute corresponding to the target cell as a calculated numerical data label when the cell content corresponding to the target cell is the formula type data and the cell label attribute corresponding to the target cell is the direct calculation label; an obtaining unit, configured to obtain, when the cell content corresponding to the target cell is the formula type data and the cell tag attribute corresponding to the target cell is the dependency computation tag, cell contents corresponding to all dependent cells respectively according to a cell dependency list corresponding to the target cell, where all dependent cells include the other cells; and the generating unit is used for calculating the plurality of cells in batches according to the cell contents corresponding to all the dependent cells and the cell notification list corresponding to the other cells, and generating and storing target spreadsheet information until all the cells are calculated.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the generating unit is specifically configured to: when the cell content corresponding to any dependent cell is not the formula type data, stopping calculating the target cell, and continuing to perform data calculation processing on the cell adjacent to the target cell; when the cell contents corresponding to all the dependent cells are numerical data, calculating the formula expression corresponding to the target cell based on the cell contents corresponding to all the dependent cells to obtain a first calculation result, and setting the cell label attribute corresponding to the target cell as a calculated numerical data label; reading a plurality of cited cells from the cell notification list corresponding to the other cells, and sequentially notifying the cited cells so that the cited cells perform formula calculation according to the first calculation result to obtain a second calculation result; and setting the cell label attribute corresponding to each quoted cell as a calculated numerical data label according to the second calculation result until all cells are calculated, obtaining target spreadsheet information, and updating the target spreadsheet information to a preset database.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the electronic form data processing apparatus further includes: the verification module is used for receiving a data verification request, performing data verification processing on the target electronic form information according to the data verification request to obtain a data verification result, and judging whether the data verification result is successful; and the pushing module is used for pushing the target electronic form information to a target terminal in a preset notification mode if the data verification result is that the data verification is successful.
A third aspect of the present invention provides a spreadsheet data processing apparatus comprising: a memory and at least one processor, the memory having instructions stored therein; the at least one processor calls the instructions in the memory to cause the electronic form data processing apparatus to execute the above-described electronic form data processing method.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the above-described electronic forms data processing method.
In the technical scheme provided by the invention, a data table calculation request is received, and initial electronic table information is obtained according to the data table calculation request, wherein the initial electronic table information comprises a plurality of cells, and each cell is used for storing text type data, numerical value type data or formula type data; obtaining a formula expression corresponding to a target cell from the plurality of cells, and judging whether reference dependency exists between the target cell and other cells according to the formula expression corresponding to the target cell, wherein the other cells are cells except the target cell in the plurality of cells; if the target cell and other cells have a reference dependency relationship, setting the cell label attribute corresponding to the target cell as a dependency calculation label, and performing data updating processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to the other cells; if the target cell does not have a reference dependency relationship with other cells, setting the cell label attribute corresponding to the target cell as a direct calculation label; and calculating the plurality of cells in batches according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cells until all cells are calculated, and generating and storing target spreadsheet information. In the embodiment of the invention, the cell label attribute corresponding to the target cell is marked according to the reference dependency relationship between the target cell and other cells, and the data updating processing is carried out on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells; and calculating a plurality of cells in batches according to the cell label attribute, the cell dependency list and the cell notification list to obtain target spreadsheet information, so that the calculation efficiency of formula expressions in the spreadsheet is improved, and debugging and process tracking of calculation results of the spreadsheet are facilitated.
Drawings
Fig. 1 is a schematic diagram of an embodiment of a method for processing spreadsheet data according to the embodiment of the present invention;
fig. 2 is a schematic diagram of another embodiment of the method for processing electronic form data according to the embodiment of the present invention;
fig. 3 is a schematic diagram of an embodiment of the electronic form data processing apparatus according to the embodiment of the present invention;
fig. 4 is a schematic diagram of another embodiment of the electronic form data processing apparatus according to the embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of the electronic form data processing apparatus in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a spreadsheet data processing method, device, equipment and storage medium, which are used for improving the calculation efficiency of formula expressions in spreadsheets and facilitating spreadsheet calculation result debugging and process tracking.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of an embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a method for processing spreadsheet data according to an embodiment of the present invention includes:
101. receiving a data table calculation request, and acquiring initial spreadsheet information according to the data table calculation request, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical type data or formula type data.
The initial spreadsheet information is generally composed of row and column descriptions and comprises a plurality of cells, the plurality of cells comprise a target cell and other cells, each cell is used for storing text type data, numerical type data or formula type data, the target cell is used for indicating the cell storing the formula type data, and the number of the target cell is at least one. For example, the cell content corresponding to the cell C (target cell) may be a fixed numerical type data V, or may be a formula type data F. When the cell content corresponding to the cell C (target cell) is a formula (i.e., formula type data), the server determines whether the formula depends on other cells, and forms the dependent cells into a dependency list D.
Specifically, the server receives a data table calculation request, performs parameter analysis on the data table calculation request to obtain a table identifier, and queries a preset data table according to the table identifier to obtain electronic table path information; the server reads initial electronic form information from a preset file directory according to the electronic form path information, the initial electronic form information comprises a plurality of cells, each cell has a corresponding unique code, and the unique code corresponding to each cell is an identification value which is preset according to a preset row-column position relationship.
It is to be understood that the executing subject of the present invention may be the electronic form data processing apparatus, and may also be a terminal or a server, and is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
102. And acquiring a formula expression corresponding to the target cell from the multiple cells, and judging whether citation dependency exists between the target cell and other cells according to the formula expression corresponding to the target cell, wherein the other cells are cells except the target cell in the multiple cells.
Specifically, the server scans each cell in the initial spreadsheet information one by one according to a preset sequence, and reads a formula expression corresponding to a target cell according to formula type data; the server analyzes the formula expression corresponding to the target cell through a preset syntax analysis tool to obtain an analysis result, wherein the analysis result comprises a numerical value, a variable, an operator and a connector, and the server judges whether cell names corresponding to other cells exist in the analysis result, and the other cells are cells except the target cell in the multiple cells; when the cell names corresponding to other cells exist in the analysis result, the server determines that reference dependency exists between the target cell and the other cells, and the server continues to execute step 103; when the cell names corresponding to other cells do not exist in the analysis result, the server determines that reference dependency does not exist between the target cell and other cells, and the server continues to execute step 104.
103. And if the target cell and other cells have a reference dependency relationship, setting the cell label attribute corresponding to the target cell as a dependency calculation label, and performing data updating processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells.
The dependent computation tag may be tag _1, or may be another character string, and is not limited herein. The cell dependency list corresponding to the target cell is used to indicate that the cell content corresponding to the current cell (i.e. the target cell) is formula type data, and the formula type data depends on the cell content corresponding to other cells, and the depended other cells are combined into a list. The cell notification list corresponding to other cells is used for indicating that the current cell value changes, or obtaining a calculation result, and the cell list needs to be notified. For example, the target cell C1 and the other cells C2 have a reference dependency relationship, that is, the formula expression F1 corresponding to the target cell C1 needs to reference the values of the other cells C2, and then the server adds the other cells C2 to the dependent cell list D1 of the target cell C1. At the same time, the server adds the target cell C1 to the cell notification list N2 corresponding to the other cell C2. The plurality of cells includes a target cell and other cells.
104. And if the reference dependency relationship does not exist between the target cell and other cells, setting the cell label attribute corresponding to the target cell as a direct calculation label.
That is, the formula expression (belonging to formula type data) of the target cell C1 has no reference dependency relationship to other cells, and the server marks this target cell as a direct calculation cell (direct calculation tag). Further, after the server sets the cell label attribute, the server may calculate the formula expression corresponding to the target cell according to the operation relationship among the numerical value, the variable, the operator and the connector to obtain the operation result, and update the operation result to the cell content corresponding to the target cell, where the type of the operation result is numerical shape data. The direct calculation tag may be tag _2 or another character string, and is not limited herein.
105. And calculating the plurality of cells in batches according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells until all cells are calculated, and generating and storing target spreadsheet information.
Each cell in the target spreadsheet information is used for storing text data and numerical values, and does not contain formula expressions. The server calculates the numerical values of the single cells one by one on the basis of the completion of the scanning process. Specifically, if the server has calculated the obtained value V for the current cell (target cell), that is, the cell tag attribute corresponding to the current cell is the direct calculation tag, the server skips the current cell. If the current cell has no reference dependency relationship with other cells (that is, the corresponding cell dependency list is null value), the server may directly calculate and obtain the value V corresponding to the current cell. If the current cell has a reference dependency relationship with other cells (that is, the corresponding cell dependency list is not null), the server sequentially detects whether each cell in the cell dependency list corresponding to the target cell has completed the calculation. If any dependent cell does not complete the calculation, the server skips the calculation of the current cell. And if all the dependent cells are calculated, the server calculates the value V of the current cell according to the value of the dependent cells. If the current cell is not skipped and the calculation result is a numerical value, the server detects a notification list N of the current cell (the target cell and other cells both comprise a cell dependency list and a cell notification list corresponding to the target cell and other cells), sequentially notifies the cells of the cell notification list to perform calculation, and generates and stores target spreadsheet information until the calculation of all the cells is completed. Further, the server stores the target spreadsheet information in a blockchain database, which is not limited herein.
In the embodiment of the invention, the cell label attribute corresponding to the target cell is marked according to the reference dependency relationship between the target cell and other cells, and the data updating processing is carried out on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells; and calculating a plurality of cells in batches according to the cell label attribute, the cell dependency list and the cell notification list to obtain target spreadsheet information, so that the calculation efficiency of formula expressions in the spreadsheet is improved, and debugging and process tracking of calculation results of the spreadsheet are facilitated.
Referring to fig. 2, another embodiment of the method for processing spreadsheet data according to the embodiment of the present invention includes:
201. receiving a data table calculation request, and acquiring initial spreadsheet information according to the data table calculation request, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical type data or formula type data.
It should be noted that the initial spreadsheet information may originate from the preset spreadsheet data table or from the preset spreadsheet file. Optionally, the server receives the data table calculation request, and performs parameter analysis on the data table calculation request to obtain a parameter analysis result; the server performs parameter verification processing on the parameter analysis result to obtain a verification result, for example, the server performs null value and abnormal data type filtering and screening on the parameter analysis result; when the verification result is that verification passes, the server extracts the form identification from the parameter analysis result, and inquires a preset data table according to the form identification to obtain the path information of the electronic form; the server reads initial electronic form information from a preset file directory according to the electronic form path information, wherein the initial electronic form information comprises a plurality of cells, and each cell is used for storing text type data, numerical value type data or formula type data. The spreadsheet path information has a one-to-one correspondence with the initial spreadsheet information.
202. And obtaining a formula expression corresponding to the target cell from the multiple cells, and judging whether reference dependency exists between the target cell and other cells according to the formula expression corresponding to the target cell, wherein the other cells are cells except the target cell in the multiple cells.
It can be understood that the server scans the plurality of cells in sequence and obtains the target cell for storing the formula expression from the plurality of cells, the number of the target cells may be 1, or may be multiple, and the specific details are not limited herein. Optionally, the server reads each cell in the initial spreadsheet information in a traversing manner to obtain cell content corresponding to each cell; when the cell content corresponding to each cell meets a preset screening condition, the server acquires a formula expression corresponding to a target cell; the server carries out semantic analysis processing on the formula expression corresponding to the target cell through a preset syntax analysis tool to obtain an analysis result; the server judges whether cell names corresponding to other cells exist in the analysis result or not based on a preset cell configuration information table, wherein the other cells are cells except the target cell in the multiple cells; if the cell names corresponding to other cells exist in the analysis result, the server determines that a citation dependency relationship exists between the target cell and the other cells, and the server executes step 203; if the cell name corresponding to the other cell does not exist in the analysis result, the server determines that there is no reference dependency relationship between the target cell and the other cell, and the server executes step 204.
It should be noted that the preset filtering condition is used to indicate whether the cell content corresponding to each cell is formula type data, instead of text type data or numerical type data. The preset grammar analysis tool may be a java analysis tool, or may be other formula analysis tools, and is not limited herein. Further, the server performs character full matching on the analysis result and a preset cell configuration information table to obtain a matching result; when the matching result is not a null value, the server determines that the cell names corresponding to other cells exist in the analysis result, and the matching result is used for indicating that the cell names corresponding to other cells exist in a preset cell configuration information table; and when the matching result is a null value, the server determines that the cell names corresponding to other cells do not exist in the analysis result.
203. And if the target cell and other cells have a citation dependency relationship, setting the cell label attribute corresponding to the target cell as a dependency calculation label, and performing data updating processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells.
The cell dependency list is used to indicate that the formula expression corresponding to the target cell depends on the cell contents corresponding to other cells, and is a list D formed by the dependent cells. The cell notification list is used for indicating a cell list N which needs to be notified when the numerical values of other cells change or calculation results are acquired.
Optionally, if there is a reference dependency relationship between the target cell and another cell, the server sets the cell tag attribute corresponding to the target cell as a dependency computation tag, and respectively reads the cell name corresponding to the target cell and the cell names corresponding to the other cells according to the location information corresponding to the target cell and the location information corresponding to the other cells; and the server adds the cell names corresponding to other cells to the cell dependency list corresponding to the target cell and adds the cell names corresponding to the target cell to the cell notification list corresponding to other cells.
204. And if the reference dependency relationship does not exist between the target cell and other cells, setting the cell label attribute corresponding to the target cell as a direct calculation label.
The specific implementation of step 204 is similar to that of step 104, and is not limited herein.
205. And calculating the plurality of cells in batches according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells until all cells are calculated, and generating and storing target spreadsheet information.
Wherein each cell in the target spreadsheet information is used to store text type data and value type data, and does not contain formula type data (i.e., formula expressions). The server calculates the numerical values of the single cells one by one on the basis of the completion of the scanning process. Optionally, the server reads each cell one by one to obtain cell content corresponding to the target cell; when the cell content corresponding to the target cell is text type data or numerical value type data, the server sets the cell label attribute corresponding to the target cell as a calculated numerical value data label; when the cell content corresponding to the target cell is formula type data and the cell label attribute corresponding to the target cell is a direct calculation label, the server calculates and updates the target cell according to a formula expression corresponding to the target cell, the server sets the cell label attribute corresponding to the target cell to be a calculated numerical data label, that is, the target cell does not have dependence on other cells, the cell dependence list corresponding to the target cell is a null value, the server can directly calculate according to the formula expression corresponding to the target cell to obtain a numerical value V and update the numerical value V to the target cell, and the server updates the cell label attribute corresponding to the target cell from the direct calculation label to the calculated numerical label; when the cell content corresponding to the target cell is formula type data and the cell label attribute corresponding to the target cell is a dependency calculation label, the server acquires cell contents corresponding to all dependency cells respectively according to a cell dependency list corresponding to the target cell, wherein all dependency cells comprise other cells; and the server calculates the plurality of cells in batches according to the cell contents respectively corresponding to all the dependent cells and the cell notification list corresponding to other cells until all the cells are calculated, and generates and stores target spreadsheet information.
Further, when the content of the cell corresponding to any one dependent cell is not formula type data, the server stops calculating the target cell and continues to perform data calculation processing on the cell adjacent to the target cell; when the cell contents corresponding to all the dependent cells are numerical type data, the server calculates the formula expression corresponding to the target cell based on the cell contents corresponding to all the dependent cells to obtain a first calculation result, sets the cell label attribute corresponding to the target cell as a calculated numerical data label, and when the target cell has a dependency relationship with other cells (that is, the cell dependency list is not a null value), the server sequentially detects whether each cell in the cell dependency list has been calculated. If any of the dependent cells do not complete the calculation, the server skips the calculation of the current cell (i.e., the target cell). If all the dependent cells are calculated, the server calculates the value V (namely, a first calculation result) of the current cell according to the values respectively corresponding to all the dependent cells; the server reads the multiple quoted cells from the cell notification list corresponding to other cells, and sequentially notifies the multiple quoted cells, so that the multiple quoted cells perform formula calculation according to the first calculation result to obtain a second calculation result; and the server sets the cell label attribute corresponding to each quoted cell as a calculated numerical data label according to the second calculation result, obtains target spreadsheet information until all cells are calculated, and updates the target spreadsheet information to a preset database. That is, if the target cell is not skipped and the calculation results in a numerical value, the server detects the notification list N of the current cell, sequentially calculates each cell in the notification list N for calculation, and generates and stores the target spreadsheet information until the calculation of all cells is completed.
206. And receiving a data verification request, performing data verification processing on the target electronic form information according to the data verification request to obtain a data verification result, and judging whether the data verification result is successful.
Specifically, the server receives the data verification request, analyzes the data verification request to obtain an electronic form identifier, and obtains a cell label attribute corresponding to a target cell, a cell dependency list corresponding to the target cell and a cell notification list corresponding to other cells according to the electronic form identifier, the server performs reverse calculation processing on numerical value type data corresponding to each cell on the target electronic form information according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells to obtain check electronic form information, and performs row and column data comparison on the check electronic form information and the target electronic form information to obtain a data verification result; when the data verification result is the preset target value, the server determines that the data verification result is successful, and the server continues to execute the step 207, so that the verification efficiency of the electronic form is improved; when the data verification result is not the preset target value, the server determines that the data verification result is verification failure, and the server re-executes step 201 to step 205. Further, the server records the position information of the cells failed in verification. The server generates a cell relation network topological graph according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to other cells, and displays the cell relation network topological graph in the terminal, so that spreadsheet calculation result debugging and process tracking are facilitated.
207. And if the data verification result is that the verification is successful, pushing the target electronic form information to the target terminal in a preset notification mode.
The preset notification mode may be a message pushing mode or a mail mode, or may be an information online publishing mode, and is not limited herein. Specifically, if the data verification result is that the verification is successful, the server writes the target electronic form information into a preset message queue, and the server pushes the target electronic form information to the target terminal through the preset message queue and a preset notification mode. So that the target terminal analyzes, processes or draws and displays the target spreadsheet information, which is not limited herein.
In the embodiment of the invention, the cell label attribute corresponding to the target cell is marked according to the reference dependency relationship between the target cell and other cells, and the data updating processing is carried out on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells; and calculating a plurality of cells in batches according to the cell label attribute, the cell dependency list and the cell notification list to obtain target spreadsheet information, so that the calculation efficiency of formula expressions in the spreadsheet is improved, and debugging and process tracking of calculation results of the spreadsheet are facilitated.
Having described the method for processing electronic form data according to the embodiment of the present invention, referring to fig. 3, the electronic form data processing apparatus according to the embodiment of the present invention is described below, and an embodiment of the electronic form data processing apparatus according to the embodiment of the present invention includes:
an obtaining module 301, configured to receive a data table calculation request, and obtain initial spreadsheet information according to the data table calculation request, where the initial spreadsheet information includes multiple cells, and each cell is used to store text type data, numerical type data, or formula type data;
the judging module 302 is configured to obtain a formula expression corresponding to the target cell from the multiple cells, and judge whether a reference dependency relationship exists between the target cell and another cell according to the formula expression corresponding to the target cell, where the other cell is a cell other than the target cell in the multiple cells;
the processing module 303 is configured to, if there is a reference dependency relationship between the target cell and another cell, set the cell tag attribute corresponding to the target cell as a dependency computation tag, and perform data update processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells;
the setting module 304 is configured to set a cell label attribute corresponding to the target cell as a direct computation label if there is no reference dependency between the target cell and another cell;
the generating module 305 is configured to perform batch calculation on multiple cells according to the cell tag attribute corresponding to the target cell, the cell dependency list corresponding to the target cell, and the cell notification list corresponding to other cells, and generate and store target spreadsheet information until all cells are calculated.
Further, the target spreadsheet information is stored in the block chain database, which is not limited herein.
In the embodiment of the invention, the cell label attribute corresponding to the target cell is marked according to the reference dependency relationship between the target cell and other cells, and the data updating processing is carried out on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells; and calculating a plurality of cells in batches according to the cell label attribute, the cell dependency list and the cell notification list to obtain target spreadsheet information, so that the calculation efficiency of formula expressions in the spreadsheet is improved, and debugging and process tracking of calculation results of the spreadsheet are facilitated.
Referring to fig. 4, another embodiment of the electronic form data processing apparatus according to the embodiment of the present invention includes:
an obtaining module 301, configured to receive a data table calculation request, and obtain initial spreadsheet information according to the data table calculation request, where the initial spreadsheet information includes multiple cells, and each cell is used to store text type data, numerical type data, or formula type data;
the judging module 302 is configured to obtain a formula expression corresponding to the target cell from the multiple cells, and judge whether a reference dependency relationship exists between the target cell and another cell according to the formula expression corresponding to the target cell, where the other cell is a cell other than the target cell in the multiple cells;
the processing module 303 is configured to, if there is a reference dependency relationship between the target cell and another cell, set the cell tag attribute corresponding to the target cell as a dependency computation tag, and perform data update processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells;
the setting module 304 is configured to set a cell label attribute corresponding to the target cell as a direct computation label if there is no citation dependency between the target cell and another cell;
the generating module 305 is configured to perform batch calculation on multiple cells according to the cell tag attribute corresponding to the target cell, the cell dependency list corresponding to the target cell, and the cell notification list corresponding to other cells, and generate and store target spreadsheet information until all cells are calculated.
Optionally, the obtaining module 301 may be further specifically configured to:
receiving a data table calculation request, and performing parameter analysis on the data table calculation request to obtain a parameter analysis result;
performing parameter verification processing on the parameter analysis result to obtain a verification result;
when the verification result is that verification passes, extracting a form identifier from the parameter analysis result, and inquiring a preset data table according to the form identifier to obtain electronic form path information;
reading initial spreadsheet information from a preset file directory according to the spreadsheet path information, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical value type data or formula type data.
Optionally, the determining module 302 may be further specifically configured to:
traversing and reading each cell in the initial spreadsheet information to obtain cell content corresponding to each cell;
when the cell content corresponding to each cell meets a preset screening condition, acquiring a formula expression corresponding to a target cell;
performing semantic analysis processing on a formula expression corresponding to the target cell through a preset syntax analysis tool to obtain an analysis result;
judging whether cell names corresponding to other cells exist in the analysis result based on a preset cell configuration information table, wherein the other cells are cells except the target cell in the plurality of cells;
if the cell names corresponding to other cells exist in the analysis result, determining that reference dependency exists between the target cell and the other cells;
and if the cell names corresponding to other cells do not exist in the analysis result, determining that reference dependency relationship does not exist between the target cell and other cells.
Optionally, the processing module 304 may be further specifically configured to:
if the target cell and other cells have a reference dependency relationship, setting the cell label attribute corresponding to the target cell as a dependency calculation label, and respectively reading the cell name corresponding to the target cell and the cell names corresponding to other cells according to the position information corresponding to the target cell and the position information corresponding to other cells;
and adding the cell names corresponding to other cells into the cell dependency list corresponding to the target cell, and adding the cell names corresponding to the target cell into the cell notification list corresponding to other cells.
Optionally, the generating module 305 may further include:
the reading unit 3051 is configured to read each cell one by one, so as to obtain cell contents corresponding to the target cell;
the setting unit 3052, configured to set, when the cell content corresponding to the target cell is text type data or numerical type data, the cell label attribute corresponding to the target cell to be a calculated numerical data label;
the updating unit 3053, configured to, when the cell content corresponding to the target cell is formula type data and the cell label attribute corresponding to the target cell is a direct calculation label, calculate and update the cell content corresponding to the target cell according to the formula expression corresponding to the target cell, and set the cell label attribute corresponding to the target cell as a calculated numerical data label;
the obtaining unit 3054, configured to, when the cell content corresponding to the target cell is formula type data and the cell label attribute corresponding to the target cell is a dependency calculation label, obtain cell contents corresponding to all dependency cells respectively according to a cell dependency list corresponding to the target cell, where all dependency cells include other cells;
the generating unit 3055 is configured to perform batch calculation on the multiple cells according to the cell contents corresponding to all the dependent cells and the cell notification lists corresponding to other cells, and generate and store the target spreadsheet information until the calculation of all the cells is completed.
Optionally, the generating unit 3055 may be further specifically configured to:
when the cell content corresponding to any dependent cell is not formula type data, stopping calculating the target cell, and continuing to perform data calculation processing on the cell adjacent to the target cell;
when the cell contents corresponding to all the dependent cells are numerical data, calculating the formula expression corresponding to the target cell based on the cell contents corresponding to all the dependent cells to obtain a first calculation result, and setting the cell label attribute corresponding to the target cell as a calculated numerical data label;
reading a plurality of quoted cells from the cell notification list corresponding to other cells, and sequentially notifying the plurality of quoted cells so that the plurality of quoted cells perform formula calculation according to the first calculation result to obtain a second calculation result;
and setting the cell label attribute corresponding to each quoted cell as a calculated numerical data label according to the second calculation result until all cells are calculated, obtaining target spreadsheet information, and updating the target spreadsheet information to a preset database.
Optionally, the electronic form data processing apparatus may further include:
the verification module 306 is configured to receive the data verification request, perform data verification processing on the target electronic form information according to the data verification request to obtain a data verification result, and determine whether the data verification result is successful;
and a pushing module 307, configured to push the target electronic form information to the target terminal in a preset notification manner if the data verification result is that the verification is successful.
In the embodiment of the invention, the cell label attribute corresponding to the target cell is marked according to the reference dependency relationship between the target cell and other cells, and the data updating processing is carried out on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells; and calculating a plurality of cells in batches according to the cell label attribute, the cell dependency list and the cell notification list to obtain target spreadsheet information, so that the calculation efficiency of formula expressions in the spreadsheet is improved, and debugging and process tracking of calculation results of the spreadsheet are facilitated.
The above fig. 3 and 4 describe in detail the electronic form data processing apparatus in the embodiment of the present invention from the viewpoint of modularization, and the following describes in detail the electronic form data processing device in the embodiment of the present invention from the viewpoint of hardware processing.
Fig. 5 is a schematic structural diagram of an electronic form data processing apparatus 500 according to an embodiment of the present invention, which may have relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored in the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations for the electronic form data processing apparatus 500. Still further, the processor 510 may be arranged to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the electronic forms data processing apparatus 500.
The spreadsheet data processing apparatus 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows Server, mac OS X, unix, linux, freeBSD, etc. Those skilled in the art will appreciate that the structure of the spreadsheet data processing device shown in FIG. 5 does not constitute a limitation of the spreadsheet data processing device, and may include more or fewer components than those shown, or some of the components may be combined, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions that, when executed on a computer, cause the computer to execute the steps of the method for processing electronic form data.
The present invention also provides an electronic forms data processing apparatus comprising a memory and a processor, the memory having stored therein instructions which, when executed by the processor, cause the processor to carry out the steps of the electronic forms data processing method in the above-described embodiments.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for processing electronic form data, comprising:
receiving a data table calculation request, and acquiring initial spreadsheet information according to the data table calculation request, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical type data or formula type data;
obtaining a formula expression corresponding to a target cell from the multiple cells, and judging whether citation dependency exists between the target cell and other cells according to the formula expression corresponding to the target cell, wherein the other cells are cells except the target cell in the multiple cells;
if the target cell and other cells have a citation dependency relationship, setting the attribute of the cell label corresponding to the target cell as a dependency calculation label, and performing data updating processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to the other cells, where the cell notification lists corresponding to the other cells are used for indicating that the target cell value changes or the cell list notified after the calculation result is obtained;
if the target cell does not have a reference dependency relationship with other cells, setting the cell label attribute corresponding to the target cell as a direct calculation label;
calculating the plurality of cells in batches according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cells, and generating and storing target spreadsheet information until all cells are calculated;
the batch calculation of the plurality of cells according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cells until the calculation of all the cells is completed, and the generation and storage of the target spreadsheet information includes:
reading each cell one by one to obtain cell content corresponding to the target cell;
when the cell content corresponding to the target cell is the text type data or the numerical value type data, setting the cell label attribute corresponding to the target cell as a calculated numerical value data label;
when the cell content corresponding to the target cell is the formula type data and the cell label attribute corresponding to the target cell is the direct calculation label, calculating and updating the cell content corresponding to the target cell according to the formula expression corresponding to the target cell, and setting the cell label attribute corresponding to the target cell as a calculated numerical data label;
when the cell content corresponding to the target cell is the formula type data and the cell label attribute corresponding to the target cell is the dependency calculation label, obtaining cell contents corresponding to all dependent cells according to a cell dependency list corresponding to the target cell, wherein all dependent cells comprise other cells;
and calculating the plurality of cells in batches according to the cell contents corresponding to all the dependent cells and the cell notification list corresponding to the other cells respectively, and generating and storing target spreadsheet information until all the cells are calculated.
2. A spreadsheet data processing method according to claim 1, wherein said receiving a data table calculation request, obtaining initial spreadsheet information according to said data table calculation request, said initial spreadsheet information comprising a plurality of cells, each cell for storing text type data, numeric type data or formula type data, comprises:
receiving a data table calculation request, and performing parameter analysis on the data table calculation request to obtain a parameter analysis result;
performing parameter verification processing on the parameter analysis result to obtain a verification result;
when the verification result is that verification passes, extracting a form identifier from the parameter analysis result, and inquiring a preset data table according to the form identifier to obtain electronic form path information;
and reading initial spreadsheet information from a preset file directory according to the spreadsheet path information, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical value type data or formula type data.
3. A spreadsheet data processing method according to claim 1, wherein said obtaining a formula expression corresponding to a target cell from the plurality of cells, and judging whether there is a reference dependency between the target cell and another cell according to the formula expression corresponding to the target cell, the other cell being a cell other than the target cell among the plurality of cells, comprises:
traversing and reading each cell in the initial spreadsheet information to obtain cell content corresponding to each cell;
when the cell content corresponding to each cell meets a preset screening condition, acquiring a formula expression corresponding to a target cell;
carrying out semantic analysis processing on the formula expression corresponding to the target cell through a preset syntax analysis tool to obtain an analysis result;
judging whether cell names corresponding to other cells exist in the analysis result based on a preset cell configuration information table, wherein the other cells are cells except the target cell in the plurality of cells;
if the cell names corresponding to other cells exist in the analysis result, determining that a reference dependency relationship exists between the target cell and the other cells;
and if the cell names corresponding to other cells do not exist in the analysis result, determining that the reference dependency relationship does not exist between the target cell and the other cells.
4. A spreadsheet data processing method according to claim 1, wherein if there is a reference dependency between the target cell and another cell, setting the cell label attribute corresponding to the target cell as a dependency computation label, and performing data update processing on the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cell, includes:
if the target cell and other cells have a reference dependency relationship, setting the cell label attribute corresponding to the target cell as a dependency calculation label, and respectively reading the cell name corresponding to the target cell and the cell names corresponding to the other cells according to the position information corresponding to the target cell and the position information corresponding to the other cells;
and adding the cell names corresponding to the other cells into the cell dependency list corresponding to the target cell, and adding the cell names corresponding to the target cell into the cell notification list corresponding to the other cells.
5. A spreadsheet data processing method according to claim 1, wherein said batch-calculating the plurality of cells according to the cell contents corresponding to each of the all dependent cells and the cell notification list corresponding to the other cells until all the cell calculations are completed, and generating and storing target spreadsheet information, comprises:
when the content of the cell corresponding to any dependent cell is not the formula type data, stopping calculating the target cell, and continuing data calculation processing on the cell adjacent to the target cell;
when the cell contents corresponding to all the dependent cells are numerical data, calculating the formula expression corresponding to the target cell based on the cell contents corresponding to all the dependent cells to obtain a first calculation result, and setting the cell label attribute corresponding to the target cell as a calculated numerical data label;
reading a plurality of cited cells from the cell notification list corresponding to the other cells, and sequentially notifying the cited cells so that the cited cells perform formula calculation according to the first calculation result to obtain a second calculation result;
and setting the cell label attribute corresponding to each quoted cell as a calculated numerical data label according to the second calculation result until all cells are calculated, obtaining target spreadsheet information, and updating the target spreadsheet information to a preset database.
6. A spreadsheet data processing method according to any one of claims 1-5, wherein after said batch calculating the plurality of cells according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cells until all cell calculations are completed, generating and storing target spreadsheet information, the spreadsheet data processing method further comprises:
receiving a data verification request, performing data verification processing on the target electronic form information according to the data verification request to obtain a data verification result, and judging whether the data verification result is successful;
and if the data verification result is successful, pushing the target electronic form information to a target terminal in a preset notification mode.
7. A electronic form data processing apparatus characterized by comprising:
the acquisition module is used for receiving a data table calculation request and acquiring initial spreadsheet information according to the data table calculation request, wherein the initial spreadsheet information comprises a plurality of cells, and each cell is used for storing text type data, numerical value type data or formula type data;
the judging module is used for acquiring a formula expression corresponding to a target cell from the plurality of cells, and judging whether a citation dependency relationship exists between the target cell and other cells according to the formula expression corresponding to the target cell, wherein the other cells are cells except the target cell in the plurality of cells;
the processing module is used for setting the attribute of the cell label corresponding to the target cell as a dependency calculation label if a citation dependency relationship exists between the target cell and other cells, and performing data updating processing on the cell dependency list corresponding to the target cell and the cell notification lists corresponding to other cells, wherein the cell notification lists corresponding to other cells are used for indicating that the target cell number value changes or the cell list notified after the calculation result is obtained;
the setting module is used for setting the cell label attribute corresponding to the target cell as a direct calculation label if the reference dependency relationship does not exist between the target cell and other cells;
the generating module is used for calculating the plurality of cells in batches according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cells until all cells are calculated, and generating and storing target spreadsheet information;
the batch calculation of the plurality of cells according to the cell label attribute corresponding to the target cell, the cell dependency list corresponding to the target cell and the cell notification list corresponding to the other cells until the calculation of all the cells is completed, and the generation and storage of the target spreadsheet information includes:
reading each cell one by one to obtain cell content corresponding to the target cell;
when the cell content corresponding to the target cell is the text type data or the numerical value type data, setting the cell label attribute corresponding to the target cell as a calculated numerical value data label;
when the cell content corresponding to the target cell is the formula type data and the cell label attribute corresponding to the target cell is the direct calculation label, calculating and updating the cell content corresponding to the target cell according to the formula expression corresponding to the target cell, and setting the cell label attribute corresponding to the target cell as a calculated numerical data label;
when the cell content corresponding to the target cell is the formula type data and the cell label attribute corresponding to the target cell is the dependency calculation label, obtaining cell contents corresponding to all dependent cells according to a cell dependency list corresponding to the target cell, wherein all dependent cells comprise other cells;
and calculating the plurality of cells in batches according to the cell contents corresponding to all the dependent cells and the cell notification list corresponding to the other cells respectively, and generating and storing target spreadsheet information until all the cells are calculated.
8. A electronic form data processing apparatus characterized by comprising: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the electronic spreadsheet data processing device to perform the electronic spreadsheet data processing method of any one of claims 1-6.
9. A computer-readable storage medium having stored thereon instructions, which when executed by a processor, implement the method of processing electronic form data according to any one of claims 1 to 6.
CN202110691808.9A 2021-06-22 2021-06-22 Method, device, equipment and storage medium for processing electronic form data Active CN113420537B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110691808.9A CN113420537B (en) 2021-06-22 2021-06-22 Method, device, equipment and storage medium for processing electronic form data
PCT/CN2022/071484 WO2022267457A1 (en) 2021-06-22 2022-01-12 Method, apparatus, and device for processing spreadsheet data, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110691808.9A CN113420537B (en) 2021-06-22 2021-06-22 Method, device, equipment and storage medium for processing electronic form data

Publications (2)

Publication Number Publication Date
CN113420537A CN113420537A (en) 2021-09-21
CN113420537B true CN113420537B (en) 2023-01-31

Family

ID=77789895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110691808.9A Active CN113420537B (en) 2021-06-22 2021-06-22 Method, device, equipment and storage medium for processing electronic form data

Country Status (2)

Country Link
CN (1) CN113420537B (en)
WO (1) WO2022267457A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420537B (en) * 2021-06-22 2023-01-31 平安科技(深圳)有限公司 Method, device, equipment and storage medium for processing electronic form data
CN115310407B (en) * 2022-09-19 2023-09-08 长沙丹渥智能科技有限公司 Excel model analysis method and system
CN115544443B (en) * 2022-12-01 2023-03-21 西安葡萄城软件有限公司 Method and device for calculating asynchronous formula in spreadsheet
CN115658144B (en) * 2022-12-09 2023-05-02 西安葡萄城软件有限公司 Electronic form formula on-demand calculation method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201916801D0 (en) * 2019-11-19 2020-01-01 Ibm Identifying data relationships from a spreadsheet

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205524A1 (en) * 2001-08-15 2004-10-14 F1F9 Spreadsheet data processing system
US8032821B2 (en) * 2006-05-08 2011-10-04 Microsoft Corporation Multi-thread spreadsheet processing with dependency levels
US9703767B2 (en) * 2012-11-29 2017-07-11 Business Objects Software Limited Spreadsheet cell dependency management
EP3411800A1 (en) * 2016-02-01 2018-12-12 Microsoft Technology Licensing, LLC Parameterizing and working with math equations in a spreadsheet application
CN109492031A (en) * 2018-09-13 2019-03-19 广州虎牙信息科技有限公司 Display methods, server and the computer storage medium of list data
CN110263121B (en) * 2019-05-07 2023-12-19 平安科技(深圳)有限公司 Table data processing method, apparatus, electronic apparatus and computer readable storage medium
CN110738027B (en) * 2019-10-15 2023-07-14 深圳逻辑汇科技有限公司 Computer-implemented method, apparatus, and storage medium for generating spreadsheet formulas
CN110728124B (en) * 2019-10-15 2021-01-08 深圳逻辑汇科技有限公司 Method, apparatus, device and storage medium for visualizing electronic forms
CN111400380A (en) * 2020-02-22 2020-07-10 中国平安财产保险股份有限公司 Method for checking table data, electronic device and storage medium
CN113420537B (en) * 2021-06-22 2023-01-31 平安科技(深圳)有限公司 Method, device, equipment and storage medium for processing electronic form data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201916801D0 (en) * 2019-11-19 2020-01-01 Ibm Identifying data relationships from a spreadsheet

Also Published As

Publication number Publication date
CN113420537A (en) 2021-09-21
WO2022267457A1 (en) 2022-12-29

Similar Documents

Publication Publication Date Title
CN113420537B (en) Method, device, equipment and storage medium for processing electronic form data
CN110502546B (en) Data processing method and device
CN108563768B (en) Data conversion method, device, equipment and storage medium for different data models
CN111723313A (en) Page jump processing method, device, equipment and storage medium
CN107016019B (en) Database index creation method and device
CN106250319A (en) Static code scanning result treating method and apparatus
EP2862101A1 (en) Method and a consistency checker for finding data inconsistencies in a data repository
CN113986880A (en) Database adaptation method, device, equipment and storage medium of business system
CN114911830A (en) Index caching method, device, equipment and storage medium based on time sequence database
CN114238474A (en) Data processing method, device and equipment based on drainage system and storage medium
CN112529543A (en) Method, device and equipment for verifying mutual exclusion relationship of workflow and storage medium
CN115130043B (en) Database-based data processing method, device, equipment and storage medium
CN116340424A (en) Method, device, equipment and storage medium for separately storing report data
CN110955562A (en) Data recovery method, system, equipment and readable storage medium
CN115689656A (en) Advertisement putting method, device, equipment and storage medium based on Internet of things
CN114676126A (en) Database-based data verification method, device, equipment and storage medium
CN113869780A (en) Risk factor based grade calculation method, device, equipment and storage medium
CN111159006B (en) Automatic testing method and device
CN103761247B (en) A kind of processing method and processing device of error file
CN112087323A (en) Alarm correlation analysis method, device, equipment and readable storage medium
CN115168661B (en) Native graph data processing method, device, equipment and storage medium
CN115271889B (en) Intelligent label automatic linkage generation method, device, equipment and storage medium
CN111930586B (en) Method, device and equipment for acquiring data and computer readable medium
CN116361860B (en) Information storage and verification method, device, equipment and storage medium
CN114153830B (en) Data verification method and device, computer storage medium and electronic equipment

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40056716

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant