CN110738037B - Method, apparatus, device and storage medium for automatically generating electronic form - Google Patents

Method, apparatus, device and storage medium for automatically generating electronic form Download PDF

Info

Publication number
CN110738037B
CN110738037B CN201910978565.XA CN201910978565A CN110738037B CN 110738037 B CN110738037 B CN 110738037B CN 201910978565 A CN201910978565 A CN 201910978565A CN 110738037 B CN110738037 B CN 110738037B
Authority
CN
China
Prior art keywords
node
nodes
spreadsheet
hierarchy
component
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
CN201910978565.XA
Other languages
Chinese (zh)
Other versions
CN110738037A (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.)
Shenzhen Logitech Co ltd
Original Assignee
Shenzhen Logitech 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 Shenzhen Logitech Co ltd filed Critical Shenzhen Logitech Co ltd
Priority to CN201910978565.XA priority Critical patent/CN110738037B/en
Publication of CN110738037A publication Critical patent/CN110738037A/en
Priority to PCT/CN2020/089642 priority patent/WO2021073077A1/en
Application granted granted Critical
Publication of CN110738037B publication Critical patent/CN110738037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Abstract

The present disclosure relates to a method, apparatus, device, and storage medium for automatically generating a spreadsheet. One embodiment relates to a computer-implemented method for automatically generating a spreadsheet, the method comprising: obtaining a hierarchy for a spreadsheet, wherein the hierarchy comprises one or more levels having a plurality of nodes, wherein each level has at least one node and has a corresponding level type, each node corresponding to one or more cells in the spreadsheet, wherein the hierarchy further comprises membership between the plurality of nodes; obtaining metadata for each of the plurality of nodes; obtaining raw data for a spreadsheet; and generating the spreadsheet based at least on the hierarchical structure for the spreadsheet, the metadata, and the raw data.

Description

Method, apparatus, device and storage medium for automatically generating electronic form
Technical Field
The present disclosure relates to a method, apparatus, device, and storage medium for automatically generating a spreadsheet.
Background
In many areas of industry, it is often necessary to edit complex spreadsheets. For example, during a financial analysis, a financial analyst typically needs to build a spreadsheet model for the financial analysis to calculate the intrinsic value of the financial asset. A spreadsheet model is a spreadsheet that may include values, text, formulas, etc. to calculate the value of a variable or variables. Spreadsheets for financial analysis typically include tens of pages, thousands of rows, and tens of thousands of cells, and there are complex inter-computational relationships between cells, where most cells are computed from other cells. Existing approaches for generating spreadsheets are either prone to error and difficult to understand and debug, or are less flexible. Accordingly, there is a need for an improved method, apparatus, device, and storage medium for automatically generating spreadsheets.
Disclosure of Invention
One embodiment of the present disclosure is directed to a computer-implemented method for automatically generating a spreadsheet, the method comprising: obtaining a hierarchy for a spreadsheet, wherein the hierarchy comprises one or more levels having a plurality of nodes, wherein each level has at least one node and has a corresponding level type, each node corresponding to one or more cells in the spreadsheet, wherein the hierarchy further comprises membership between the plurality of nodes; obtaining metadata for each of the plurality of nodes; obtaining raw data for a spreadsheet; and generating the spreadsheet based at least on the hierarchical structure for the spreadsheet, the metadata, and the raw data.
Another embodiment of the present disclosure is directed to an apparatus for automatically generating a spreadsheet, the apparatus comprising: an editor configured to obtain a hierarchy for a spreadsheet, wherein the hierarchy comprises one or more levels having a plurality of nodes, wherein each level has at least one node and has a corresponding level type, each node corresponding to one or more cells in the spreadsheet, wherein the hierarchy further comprises membership between the plurality of nodes, and the editor is further configured to obtain metadata for each of the plurality of nodes; a data panel configured to obtain raw data for a spreadsheet; a spreadsheet generation module configured to generate a spreadsheet based at least on the hierarchical structure, the metadata, and the raw data for the spreadsheet.
Another embodiment of the present disclosure is directed to an apparatus for automatically generating a spreadsheet, the apparatus comprising: at least one processor; and at least one storage device storing instructions that, when executed by at least one processor, cause the at least one processor to perform the above-described method.
Yet another embodiment of the present disclosure is directed to a non-transitory computer-readable storage medium having stored thereon instructions that, when executed by a processor, cause the above-described method to be performed.
Yet another embodiment of the present disclosure is directed to an apparatus for automatically generating a spreadsheet comprising means for performing the steps of the above-described method.
Other features and advantages of the present disclosure will become apparent from the following description with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain, without limitation, the principles of the disclosure. In the drawings, like numbering is used to indicate like items.
Fig. 1A is a block diagram of an exemplary apparatus for automatically generating a spreadsheet according to some embodiments of the present disclosure.
FIG. 1B is a flow diagram illustrating an exemplary method for automatically generating a spreadsheet according to some embodiments of the present disclosure.
FIG. 2A is a block diagram of an exemplary graphical user editor for obtaining a hierarchical structure of a spreadsheet according to some embodiments of the present disclosure.
Fig. 2B is a flow diagram illustrating an exemplary method for obtaining a hierarchical structure of a spreadsheet according to some embodiments of the present disclosure.
FIG. 3A is an exemplary hierarchy corresponding to one page of a spreadsheet according to some embodiments of the present disclosure.
FIG. 3B is a structure of one of the exemplary spreadsheets, according to some embodiments of the present disclosure.
Fig. 3C is an exemplary component for specifying a table, according to some embodiments of the present disclosure.
Fig. 4A-4C illustrate an exemplary graphical user editor, according to some embodiments of the present disclosure.
Fig. 4D-4F illustrate exemplary graphical user interfaces displayed on an apparatus for automatically generating a spreadsheet according to some embodiments of the present disclosure.
Fig. 5A, 5B, and 5D are schematic diagrams illustrating an exemplary spreadsheet hierarchy and dependencies between nodes, according to some embodiments of the present disclosure.
Fig. 5C is a schematic diagram illustrating a method of translating computational relationships between high-level nodes into computational relationships between low-level nodes according to some embodiments of the present disclosure.
Fig. 5E is a visual representation of dependencies between nodes in an exemplary spreadsheet hierarchy according to some embodiments of the present disclosure.
Fig. 6 is a flow diagram illustrating an exemplary method for establishing dependencies between nodes, according to some embodiments of the present disclosure.
Fig. 7 is a schematic diagram illustrating nodes in an exemplary spreadsheet hierarchy according to some embodiments of the present disclosure.
Fig. 8A is a block diagram of an exemplary data panel, according to some embodiments of the present disclosure.
Fig. 8B is a graphical user interface of an exemplary data panel, according to some embodiments of the present disclosure.
Fig. 9A and 9B are flowcharts illustrating exemplary methods for generating a spreadsheet according to some embodiments of the present disclosure.
FIG. 10 is a block diagram of an exemplary spreadsheet generation module according to some embodiments of the present disclosure.
11A-11D illustrate exemplary displayed spreadsheets, according to some embodiments of the present disclosure.
11E and 11F illustrate exemplary adjustments to the position of a table in a displayed spreadsheet according to some embodiments of the present disclosure.
FIG. 12 is a flow chart illustrating an exemplary method for updating a generated spreadsheet according to some embodiments of the present disclosure.
FIG. 13 is a flow diagram illustrating an exemplary method for modifying a spreadsheet according to some embodiments of the present disclosure.
FIG. 14 illustrates an exemplary graphical user editor, according to some embodiments of the disclosure.
FIG. 15 illustrates an exemplary displayed spreadsheet according to some embodiments of the present disclosure.
FIG. 16 is a flow diagram illustrating an exemplary method of obtaining a hierarchical structure for a spreadsheet according to some embodiments of the present disclosure.
Fig. 17 illustrates an exemplary format setting component in accordance with some embodiments of the present disclosure.
FIG. 18 illustrates a general hardware environment in which the present disclosure may be applied, according to some embodiments of the present disclosure.
Detailed Description
In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the described exemplary embodiments. It will be apparent, however, to one skilled in the art, that the described embodiments may be practiced without some or all of these specific details. In the described exemplary embodiments, well-known structures or processing steps have not been described in detail in order to avoid unnecessarily obscuring the concepts of the present disclosure.
The blocks within each block diagram shown below may be implemented by hardware, software, firmware, or any combination thereof to implement the principles of the present disclosure. It will be appreciated by those skilled in the art that the blocks described in each block diagram can be combined or divided into sub-blocks to implement the principles of the disclosure.
The steps of the methods presented in this disclosure are intended to be illustrative. In some embodiments, the method may be accomplished with one or more additional steps not described and/or without one or more of the steps discussed. Further, the order in which the steps of the method are shown and described is not intended to be limiting.
As described above, existing approaches for generating spreadsheets are either prone to error and difficult to understand and debug, or are less flexible. In particular, existing general spreadsheet editing software (such as Microsoft Excel, Google Sheets, etc.) allows users to edit spreadsheets in what you see is what you get, and users can write various types of content, including text, values, formulas, etc., directly into the spreadsheet. However, generating a spreadsheet model using general purpose spreadsheet software is very error prone, and the generated spreadsheet model is difficult to debug, reuse, and understand or modify by others than the model builder. Furthermore, generating a spreadsheet model using common spreadsheet software typically requires the user to manually enter the contents of each cell, and often repeatedly and alternately enter text, numbers, or formulas, which is time consuming and labor intensive, and requires the user to master many advanced spreadsheet editing skills, especially when generating more complex spreadsheet models.
Other industry software (such as FactSet and Bloomberg) may provide some commonly used spreadsheet model templates that a user may edit to build a spreadsheet model. Such approaches all require abstracting a template of the spreadsheet model that is generic enough so that the template can be adapted to a sufficient number of situations. However, in reality, such a sufficiently versatile template is difficult to exist. For example, it is difficult to abstract an estimate model template that is applicable to both real estate industry stocks and computer industry stocks. Thus, such an approach is less flexible than general spreadsheet software and is difficult to cover the diverse needs for spreadsheet models that may arise in real-world applications. For example, for constructing a financial model, there are very limited cases where a common template can be applied, in addition to some very simple models. Most of the time, financial analysts are still using common spreadsheet editing software to build financial models.
Embodiments of the present application may allow a user and/or application, etc. to generate a spreadsheet by providing the hierarchical structure, metadata, and raw data of the spreadsheet, respectively. By separating the hierarchical structure of the electronic form from the original data, the electronic form is generated by the embodiment of the application in a more intuitive, convenient and fast way, is easy to understand and debug, is easy to reuse, and has the characteristics of flexibility and automation.
Apparatus and methods for automatically generating a spreadsheet according to some embodiments of the present disclosure are described below in conjunction with fig. 1A and 1B.
Fig. 1A is a block diagram of an exemplary apparatus 100A for automatically generating a spreadsheet according to some embodiments of the present disclosure. As shown in FIG. 1A, apparatus 100A may include an editor 110, a data panel 120, and a spreadsheet generation module 130. The apparatus 100A may also include a spreadsheet preview module 140, a hierarchy map builder 150, and a hierarchy map memory 160, which are shown with dashed boxes to indicate that they are optional. Further, although fig. 1A illustrates the above six units, this is only a schematic structure of an apparatus for automatically generating a spreadsheet, and the apparatus 100A for automatically generating a spreadsheet may further include more, less, or different units than those illustrated, or may include a combination unit of any of the above six units.
The editor 110 may be configured to obtain a hierarchy for a spreadsheet. According to one embodiment, a hierarchy for a spreadsheet may include one or more levels having a plurality of nodes, where each level has at least one node and has a corresponding level type (e.g., workbook, page, section, table, block, row, column, section, cell, etc.), each node corresponding to one or more cells in the spreadsheet, where the hierarchy also includes membership between the plurality of nodes (e.g., a table node may have several hierarchy type row children, that is, the hierarchy type row children are affiliated with the hierarchy type table node). According to one embodiment, node a is a child of, or is affiliated with, node B if and only if the cell or cells corresponding to node a are contained within the cell or cells corresponding to node B.
According to one embodiment, the editor 110 may comprise a graphical user interface editor, wherein the graphical user interface editor comprises components for specifying different levels of nodes (e.g., components for adding and/or modifying row nodes, components for adding and/or modifying table nodes, etc.), and wherein the graphical user interface editor may be further configured to: the method includes receiving input for a component specifying nodes of different hierarchies, and generating a hierarchy based on the input. For example, in response to receiving input for a component for adding a row node, the graphical user interface editor can add the corresponding row node in the hierarchy, and so on. According to one embodiment, different types of syntax elements in a component for specifying different levels of nodes may be represented in different display formats (e.g., colors, fonts, font sizes, etc.) in a graphical user interface editor to facilitate understanding and debugging by a user. According to one embodiment, the editor 110 includes a text editor that may be configured to receive user input text code and parse the text code to generate a hierarchical structure. The text code may be written in a domain specific language for the application scenario, or in any suitable programming language existing (e.g., C, C + +, C #, Java, python, etc.), or that may be developed in the future. Graphical user interface editors and text editors according to embodiments of the present disclosure are described in further detail below. It should be understood that the implementation of the editor 110 is not limited thereto, and the functions of the editor 110 may be implemented in any other suitable manner, for example, the hierarchy for the spreadsheet may be obtained from the natural language input by the user based on natural language processing, or the hierarchy for the spreadsheet may be obtained based on a tree structure drawn by the user to represent the hierarchy and other information about the nodes input, and so on.
According to one embodiment, the hierarchy type for one or more levels of the spreadsheet includes one or more of: workbook, page, section, table, block, row, column, section, and cell. In one embodiment, the components for specifying nodes of different hierarchies include one or more of: a component for specifying a page, a component for specifying a title, a component for specifying a section, a component for specifying a table, a component for specifying a data header, a component for specifying a table body, a component for specifying a row, a component for specifying a column, a component for specifying a block, a component for specifying a section, and a component for specifying a cell. Wherein the header corresponds to one or more cells describing the names of the columns in the table above the table in the spreadsheet, and the descriptive information (called stub) at the intersection position of the upper left corner of the table, and the body of the table is the part of the table except the header.
The editor 110 may also be configured to obtain metadata for each of a plurality of nodes of the hierarchy. According to one embodiment, obtaining metadata for each of the plurality of nodes includes obtaining semantic information describing a particular meaning of the node. According to one embodiment, the semantic information may include one or more of a name, a title, a label, and an annotation. The label may be a short term similar to a name describing a node (called an alias label) or may specify additional characteristics of the node (called an attribute label). Headnotes are descriptive text for a node, typically long, and may be displayed in a particular location of the spreadsheet (such as the end of each page) or in the form of "headnotes" in the general spreadsheet editor software in the generated spreadsheet. For example, semantic information for a workbook may be the name of the workbook and/or the text describing the entire workbook (title or annotation), semantic information for a page may be the name of the page and/or the text describing the entire page (title or annotation), semantic information for a section may be the text describing the section (title or annotation), semantic information for a table may be the name, label, or annotation of the table, semantic information for a row or column may be the name of the row or column, a tag, or an annotation, the semantic information of a block may be the name of the block and/or the tag or annotation applicable to all rows or columns of the block, and the semantic information of a cell may be the row name/tag of the cell and the column name/tag of the cell and the annotation of the cell.
According to one embodiment, the editor 110 can further include a modifier component that can be configured to obtain information specifying a format of one or more first cells corresponding to each node of the plurality of nodes. According to one embodiment, the information specifying the format of the one or more first cells includes a format type (e.g., a first format type, a second format type, etc.), and wherein the one or more first cells are formatted in a format corresponding to the format type (e.g., font size, background color, font color, boldface, underline, indentation, etc.). According to one embodiment, the format corresponding to the format type may be set by: the method includes displaying predefined text, receiving a user setting of a format of the predefined text, and setting a format corresponding to the format type based on the user setting of the format of the predefined text. In this way, the user can be allowed to set the format corresponding to the format type in an intuitive manner. In embodiments where the editor 110 is a graphical user interface editor, the graphical user interface editor may also include a modifier component that may be used to specify a format type of one or more cells corresponding to a node in the hierarchy.
According to one embodiment, the editor 110 may further include a label component that may be configured to obtain an alias label or attribute label for each node, where the alias label may specify an alias (e.g., number, symbol, text, etc.) of one or more cells corresponding to the node and the attribute label may specify additional characteristics (e.g., computational priority, numerical units, etc.) of the one or more cells corresponding to the node. Alias tags help users understand, distinguish, and reference different nodes having the same name, and the use of attribute tags allows for more fine-grained control over the process of generating spreadsheets. Alias tags and attribute tags are used in the process of generating a spreadsheet, but are not typically displayed in the final generated spreadsheet.
According to some embodiments, in the case where the spreadsheet to be generated contains a calculation formula, it may also be necessary to obtain dependencies and/or calculation relationships between nodes in the hierarchy. According to one embodiment, the editor 110 can further include a dependency definition component configured to obtain a dependency between a first node and another one or more nodes of the plurality of nodes. It should be noted that each node in the hierarchy may have a dependency relationship with other nodes. For any two cells A and B in the spreadsheet, defining cell A depends on cell B and only if cell A is computed from at least cell B (or from cell B along with other cells). For nodes (e.g., row nodes) C and D in the hierarchy, it is defined that node C depends on node D if and only if at least one cell that node C contains depends, directly or indirectly, on at least one cell that node D contains. According to one embodiment, the editor 110 may further include a computational relationship definition component that may be configured to obtain a computational relationship between the first node and the another one or more nodes. For example, the computational relationship definition component may be configured to obtain a computational formula between the first node and the further one or more nodes, an operator or combination of operators of the computational formula, and/or the like. For example, for column nodes L1, L2, and L3, assuming that the user input L1 ═ L2+ L3, the dependency definition component can obtain the dependencies of these column nodes as: l1 relies on L2 and L3, and the computational relationship from which the computational relationship definition component can obtain these nodes is "+" or "L1 ═ L2+ L3".
According to one embodiment, the apparatus 100A may further include a hierarchy map builder 150 and a hierarchy map memory 160, wherein the hierarchy map builder 150 may be configured to build a hierarchy map for the spreadsheet based on the hierarchy type of the hierarchy in which each of the plurality of nodes in the hierarchy is acquired by the editor 110, the child nodes of the node, and the metadata of the node, and the hierarchy map memory 160 may be configured to store the hierarchy map. According to one embodiment, the hierarchical graph builder 150 may be configured to obtain a dependency relationship between a node corresponding to each of one or more first cells corresponding to a first node and a node corresponding to each of one or more second cells corresponding to another one or more nodes based on the dependency relationship between the first node and the another one or more nodes obtained by the dependency relationship definition component. According to one embodiment, the hierarchical graph builder 150 may be further configured to determine a calculated relationship between each of the one or more first cells and each of the one or more second cells based on the calculated relationship between the first node and the another one or more nodes. The method of establishing the dependency and calculation relationships between the nodes corresponding to the cells will be described further below.
In one embodiment, the hierarchy map builder 150 may also build the hierarchy map based on the nodes on which each node in the hierarchy depends. In one embodiment, the hierarchy map builder 150 may also build the hierarchy map based on the computed relationships between each of the plurality of nodes in the hierarchy and other nodes.
The data panel 120 may be configured to obtain raw data for a spreadsheet. According to one embodiment, the data panel 120 may include raw data acquisition components that may include one or more of the following components: an intelligent data extraction component configured to automatically identify raw data from a data file (e.g., an Excel file, a txt file, etc.); a database interface component configured to import raw data from a database; a retrieval interface component configured to retrieve raw data from an external data source (e.g., a search engine, an electronic publication, a blog, etc.); and a manual input receiving component configured to receive raw data input by a user. According to one embodiment, the data panel 120 may further include: a to-fill data detection component configured to detect node(s) of a plurality of nodes of a hierarchy that require input of raw data and a requirement for raw data in the node (e.g., three rows, each row requiring 5 raw data, etc.); and the data matching component is configured to match the original data acquired by the original data acquisition component with the node which needs to input the original data and is detected by the data to be filled detection component. Wherein the data matching can be automatic matching by the system or manually matching or filling by the user through a graphical user interface. The data panel 120 may also include an optional data population graphical user interface to present a raw data form for an electronic form to be populated, which the user may populate by way of human interaction. Wherein the raw data table may be generated by a translator in the spreadsheet generation module 130.
Spreadsheet generation module 130 may be configured to generate a spreadsheet based on at least the hierarchy and metadata for the spreadsheet obtained by editor 110 and the raw data obtained by data panel 120.
According to one embodiment, the spreadsheet generation module 130 may include a renderer, which may be configured to set the format of the one or more first cells (e.g., font size, background color, font color, bolding, underlining, indenting, etc.) in the spreadsheet according to the information for specifying the format of the one or more first cells. According to one embodiment, the renderer may be configured to automatically set the format of the one or more cells corresponding to each node of the plurality of nodes according to one or more of the hierarchy type of the hierarchy in which the node is located, the format information of the node, and the contents of the one or more cells corresponding to the node, which are acquired by the editor 110.
According to one embodiment, the spreadsheet generation module 130 may also include a translator. According to one embodiment, the translator may be configured to: for each node of a plurality of nodes in a hierarchy: determining, based on the hierarchical structure, a location of one or more cells in the spreadsheet that correspond to the node; and populating content (e.g., numbers, characters, text, etc.) of one or more cells corresponding to the node based on one or more of the raw data, the hierarchical type of the node, the metadata of the node, the node on which the node depends, and the computational relationship of the node. An Excel file or other spreadsheet file may be generated based on the results of the translator's processing, as well as a txt file or a portion of a web page or any other suitable format. The translator may be configured to: the spreadsheet formula for each of the one or more first cells is generated based at least on the calculated relationship between each of the one or more first cells and each of the one or more second cells determined by the hierarchical graph builder 150 based on the calculated relationship between the first node and the other one or more nodes. According to one embodiment, the translator may be configured to generate a table of raw data to be populated based on the hierarchical structure of the spreadsheet obtained by the editor 110, the node in the data panel 120 that requires input of raw data detected by the data to be populated detection component, and the requirement for raw data in the node, and present the table of raw data to be populated on a data population graphical user interface in the data panel 120 for human-computer interaction by a user. For example, where the spreadsheet does not contain the formula that needs to be calculated and the raw data obtained by the data panel 120 has given the data corresponding to each cell in the spreadsheet that needs to be populated with data, the translator can populate all of the contents of the spreadsheet based only on the raw data.
According to one embodiment, editor 110 may be further configured to receive an operation specifying a location of a table in a spreadsheet, and spreadsheet generation module 130 may be further configured to adjust the location of the table in the spreadsheet based on the operation. For example, referring to FIG. 11E, the operation may specify (e.g., via a graphical user interface editor or a text editor) that table B is 3 rows from table A, and spreadsheet generation module 130 may adjust table B to a position 3 rows from table A. For another example, referring to FIG. 11F, the operation may specify that Table B is located at the bottom right of Table A (e.g., via a graphical user interface editor or a text editor), and spreadsheet generation module 130 may adjust Table B to the bottom right position of Table A.
According to some embodiments, device 100A may also include a spreadsheet preview module 140. According to one embodiment, the spreadsheet preview module 140 may be configured to: the method may include causing the generated spreadsheet to be displayed (e.g., on a display), receiving a modification to the hierarchy, metadata, raw data, dependencies, or computational relationships, and updating the displayed spreadsheet based on the modification to the hierarchy, metadata, raw data, dependencies, or computational relationships. In embodiments where the editor 110 is a graphical user interface editor, the modification to the hierarchy may include a drag on a component used to specify a third node in the hierarchy; and wherein updating the displayed spreadsheet comprises adjusting the relative position of the one or more cells corresponding to the third node in the spreadsheet to coincide with the relative position of the dragged component for specifying the third node in the graphical user interface editor.
According to one embodiment, the spreadsheet preview module 140 may be configured to: the method further includes causing the generated spreadsheet to be displayed, receiving a modification to the displayed spreadsheet, and translating the modification to the spreadsheet into a modification to at least one of the hierarchy, the metadata, the raw data, the dependencies, and the computational relationships, and modifying at least one of the hierarchy, the metadata, the raw data, the nodes relied upon, or the computational relationships accordingly based on the modification using at least one of an editor and a data panel.
According to an embodiment, the apparatus 100A may further comprise an error detection module, which may be configured to: automatically detecting errors present in one or more of the hierarchy, metadata, raw data, dependencies, or computational relationships; and issuing (e.g., visual, audible, or tactile, etc.) a warning to alert of the error. By performing error detection and prompting, errors which may exist in the electronic form can be reduced, and debugging by a user is facilitated. According to one embodiment, the apparatus 100A may further comprise an intelligent suggestion module, wherein the intelligent suggestion module may be configured to: predicting one or more of a hierarchy, metadata, raw data, dependencies, computational relationships, and operations to be performed by a user to be acquired based on one or more of the hierarchy, metadata, raw data, dependencies, computational relationships, and operations that have been performed by the user that have been acquired; and providing intelligent suggestion results for one or more of the hierarchy to be obtained, the metadata, the raw data, the dependencies, the computational relationships, and the operations to be performed by the user. By providing the intelligent suggestion result, the user interaction can be facilitated, and the workload of the user can be reduced.
According to one embodiment, the device 100A may interact with a client 170. The apparatus 100A may be located in the same device as the client 170 or in a different device and communicatively coupled by a wired or wireless connection. The client 170 may be, for example, an electronic device used by a user, such as a laptop, cell phone, tablet, wearable device, etc., or may be an application running on a computing device, etc. Client 170 may provide input to one or more of editor 110, data panel 120, spreadsheet generation module 130, and spreadsheet preview module 140.
FIG. 1B is a flow diagram illustrating an exemplary method 100B for automatically generating a spreadsheet according to some embodiments of the present disclosure. Although FIG. 1B illustrates 4 steps of the method 100B, this is merely an exemplary flow of a method for automatically generating a spreadsheet, and the method 100B for automatically generating a spreadsheet may include more or less steps than those shown, or may include a combination of any of the four steps described above. Further, some of the steps in the method 100B may occur simultaneously or in a different order than that shown.
The method 100B begins at step S110, and step S110 may be performed by the editor 110 of fig. 1A. At step S110, a hierarchy for a spreadsheet is obtained, wherein the hierarchy comprises one or more levels having a plurality of nodes, wherein each level has at least one node and has a corresponding level type, each node corresponding to one or more cells in the spreadsheet, wherein the hierarchy further comprises membership between the plurality of nodes.
The method 100B proceeds to step S120, and step S120 may be performed by the editor 110 of fig. 1. At step S120, metadata for each of a plurality of nodes in the hierarchy is obtained.
The method 100B proceeds to step S130, and step S130 may be performed by the data panel 120 of FIG. 1. At step S130, raw data for a spreadsheet is obtained.
Method 100B proceeds to step S140, and step S140 may be performed by spreadsheet generation module 130 of FIG. 1. At step S140, a spreadsheet is generated based at least on the hierarchical structure, metadata, and raw data for the spreadsheet.
An exemplary embodiment according to the present disclosure will be described below in conjunction with fig. 2A-18.
Fig. 2A is a block diagram of an exemplary graphical user interface editor 200A for obtaining a hierarchical structure of a spreadsheet according to some embodiments of the present disclosure. The graphical user interface editor 200A may be one example of the editor 110 shown in fig. 1A. As shown in FIG. 2A, the graphical user interface editor 200A can include a component 210 for specifying nodes of different hierarchies, a dependency definition component 220, a computational relationship definition component 230, a modifier component 240, and a tag component 250. Although fig. 2A illustrates the above five units, this is merely a schematic structure of the graphical user interface editor 200A, and the graphical user interface editor 200A may also include more or less units than those shown, or may include a combination unit of any of the above five units.
The graphical user interface editor 200A can be configured to receive input for the component 210 for specifying nodes of different hierarchies and generate a hierarchy for a spreadsheet based on the input. The component 210 for specifying different levels of nodes can be used to add, modify, and/or delete different levels of nodes, which can correspond to one or more cells in a spreadsheet. According to one embodiment, the hierarchy type of one or more levels of the spreadsheet may include one or more of the following: workbook, page, section, table, block, row, column, section, and cell. It should be appreciated that the above hierarchy types are merely examples, and that any other suitable hierarchy type may also be defined for the hierarchy. According to embodiments of the present disclosure, a page may be composed of sections or tables, and each section may further include a section or table. In one embodiment, the components for specifying nodes of different hierarchies include one or more of: a component for specifying a page, a component for specifying a title, a component for specifying a section, a component for specifying a table, a component for specifying a data header, a component for specifying a table body, a component for specifying a row, a component for specifying a column, a component for specifying a block, a component for specifying a section, and a component for specifying a cell.
The components 210 for specifying nodes of different hierarchies may also include components for adding headings of different levels (e.g., the components for specifying a section may be components for adding headings), where the headings of different levels may divide the page into different sections or tables. As will be further described below with reference to fig. 3A. FIG. 3A is an exemplary hierarchy 300A corresponding to one page of a spreadsheet according to some embodiments of the present disclosure. In hierarchy 300A, title 1301 and title 2304 are first-level titles that divide this page into two sections: section 1 and section 2. Section 1 further contains a secondary title 1.1302 and a secondary title 1.2303 that divide section 1 into sections 1.1 and 1.2 (in this example, section 1.2 is empty since there is no table under secondary title 1.2), and sections 1.1 and 1.2 may also be referred to as subsections of section 1. Section 1.1 includes two tables, table 1.1.a 311 and table 1.1. B312, respectively. Similarly, section 2 further includes a secondary title 2.1305 and a secondary title 2.2308 that divide section 2 into section 2.1 and section 2.2. Section 2.1 in turn includes two tertiary headings 2.1.1306 and 2.1.2307, with table 2.1.2.a 314 under heading 2.1.2 constituting section 2.1.2, and section 2.2 including two tables 2.2.a 315 and 2.2. B316. As such, the hierarchy 300A corresponding to one page of the spreadsheet may be obtained, for example, by a component for specifying a title and a component for specifying a table.
According to one embodiment, further structure of the table nodes in hierarchy 300A may be obtained by one or more of a component for specifying a data header, a component for specifying a table body, a component for specifying a row, a component for specifying a column, a component for specifying a block, and a component for specifying a span. Wherein the header corresponds to one or more cells describing the names of the columns in the table above the table in the spreadsheet, and the descriptive information (called stub) at the intersection position of the upper left corner of the table, and the body of the table is the part of the table except the header. In a vertically arranged table (i.e., the difference between rows in the table is large, and the calculation relationship in the table is mainly the calculation relationship between different rows, see the electronic table 300B in fig. 3B), the header 331 describes the names 333 and stubs 334 of all columns (or column blocks) included in the table, the body 332 describes the names and contents of the rows in the table, and the header and the body may form a table. Fig. 3C is an exemplary component 300C for specifying a table according to some embodiments of the present disclosure. Specifically, the component 300C is a component that specifies a longitudinally arranged table, wherein all columns or column blocks contained in this table, and the calculation relationship between the respective columns or column blocks, and the stub 351 are defined in the component 350 for specifying a header; all rows or row blocks contained by this table, and the computational relationships between the individual rows or row blocks, are defined in the component 370 for specifying the table body. The table node corresponding to the component 300C for specifying the table includes 10 columns 352-; this table node includes 4 rows 371-. The components 210 for specifying different levels of nodes according to embodiments of the present disclosure are further described below in conjunction with fig. 4A-4C. According to one embodiment, in the component for specifying intervals, intervals may be specified by "[ ]" operators, such as "row 3[ column 1: column 5 "represents an interval consisting of cells at the intersection of" row 3 "and" column 1 "to" column 5 ".
The component 210 for specifying nodes of different hierarchies may also be configured to obtain metadata for each of a plurality of nodes of the hierarchy. According to one embodiment, obtaining metadata for each of the plurality of nodes includes obtaining semantic information describing a particular meaning of the node. According to one embodiment, the semantic information may include one or more of a name, a title, a label, and an annotation. For example, the component 210 for specifying nodes of different hierarchies may include text boxes, option boxes, dialog boxes, and the like, thereby allowing a user to enter semantic information corresponding to the nodes, such that the graphical user interface editor 200A is user-friendly.
The dependency definition component 220 may be configured to obtain a dependency between a first node and another one or more nodes of the plurality of nodes in the hierarchy. The computational relationship definition component 230 may be configured to obtain a computational relationship between the first node and the one or more additional nodes. For example, the computational relationship definition component may be configured to obtain a computational formula between the first node and the further one or more nodes, an operator or combination of operators of the computational formula (e.g., "x/" 1 ", where" x "represents a placeholder), and/or the like. Thus, the dependency and calculation relationships between cell nodes and nodes higher than the cell (e.g., row nodes, column nodes, table nodes, etc.) can be directly defined, thereby facilitating user understanding of logical relationships in spreadsheets and facilitating user debugging and multiplexing, etc. of generated spreadsheets. According to one embodiment, the dependency relationship, the calculation relationship between the node corresponding to each of the one or more first cells corresponding to the first node and the node corresponding to each of the one or more second cells corresponding to the other one or more nodes may be obtained based on the dependency relationship, the calculation relationship between the first node and the other one or more nodes, respectively. Examples of this process are further described below in conjunction with fig. 5A-5D.
The modifier component 240 can be configured to obtain information specifying a format of one or more first cells corresponding to each node of the plurality of nodes. According to one embodiment, specifying the format of the one or more first cells includes specifying a format type (e.g., a first format type, a second format type, etc.), and the one or more first cells are formatted in a format corresponding to the format type (e.g., font size, background color, font color, bolding, underlining, indenting, etc.). For example, the modifier component 240 can be configured to obtain information specifying a format of a plurality of cells in the same row corresponding to one row node, the information specifying the format of the cells as a first format type, and then can set the format of the cells as a format corresponding to the first format type, such as four-size, bold. According to one embodiment, the graphical user interface editor 200A may further comprise a format setting component that may be used to set a format corresponding to the format type. According to one embodiment, predefined text may be displayed, user settings for the format of the predefined text are received, and a specific format corresponding to the format type is set based on the user settings for the format of the predefined text. It should be understood that the information specifying the format of the one or more first cells corresponding to each node of the plurality of nodes may also be obtained in any other suitable manner. For example, the formatting component may include a text box, an option box, a dialog box, etc., and the user may enter a number corresponding to the format, enter text corresponding to the format, select a level corresponding to the format, etc.
The tag component 250 may be configured to obtain an alias tag or attribute tag for each node, where the alias tag may specify an alias (e.g., number, symbol, text, or the like) of one or more cells corresponding to the node, and the attribute tag may specify additional characteristics of the one or more cells corresponding to the node. The alias tags and the attribute tags may facilitate debugging of the spreadsheet by a user. For example, assuming that the row names of two rows are both "total", and actually the two rows correspond to 2016 total data and 2017 total data, respectively, the alias of the first row node may be defined as "2016 total", and the alias of the second row node may be defined as "2017 total", so that the two rows may be more clearly distinguished. For example, the alias of both columns having the column names "2016 year" and "2017 year", respectively, may also be defined as "hist", so that the alias "hist" may be directly utilized to reference the two column nodes together when defining the calculation relationship between the nodes, thereby making debugging of the spreadsheet more flexible. The attribute tags help specify some additional characteristics of the node. For example, the attribute tag may be specified based on a key value pair (key value). Assuming that a particular cell in the spreadsheet is available from two different calculation formulas, the user may define node A and node B corresponding to the particular cell, which may have different calculation relationships. For example, in fig. 3C, the cell at the intersection of row 3 and column 5 may be derived from both equations 358 and 376, in which case the cell node a storing the calculation relationship of equation 376 may be assigned the highest PRIORITY (e.g., PRIORITY TOP) with the attribute label, thereby preferentially utilizing the calculation relationship of equation 376 to obtain the equation for that particular cell. It is also possible to specify with the attribute tag that the cell node B storing the calculation relationship of the formula 358 is used to verify the calculation relationship of the node a (e.g., CHECK ═ TRUE), so that when the value of the specific cell obtained with the calculation relationship of the node a does not coincide with the value of the specific cell obtained with the calculation relationship of the node B, an alarm may be issued (e.g., a pop-up dialog box, a formula displayed in a special format, a prompt sound issued, etc.).
It should be understood that a client (e.g., client 170 in fig. 1A) may interact with each component in graphical user interface editor 200A through any suitable input mechanism (e.g., keyboard, mouse, tablet, microphone, touch sensitive screen, etc.).
FIG. 2B is a flow diagram illustrating an exemplary method 200B for obtaining a hierarchical structure of a spreadsheet according to some embodiments of the present disclosure. While fig. 2B illustrates three steps of the method 200B, this is merely an exemplary flow for obtaining a hierarchical structure of a spreadsheet, and the method 200B for obtaining a hierarchical structure of a spreadsheet may include more or less steps than those shown, or may include a combination of any of the three steps described above. Further, some of the steps in method 200B may occur simultaneously or in a different order than that shown. For example, the method 200B may be performed by the apparatus 100A shown in fig. 1A.
The method 200B begins at step S210 by providing a graphical user interface editor (e.g., the graphical user interface editor 200A shown in fig. 2A) at step S210, wherein the graphical user interface editor may include components for specifying nodes of different hierarchies.
The method 200B proceeds to step S220 where the graphical user interface editor may receive input for a component specifying a node of a different hierarchy at step S220.
The method 200B proceeds to step S230 where the graphical user interface editor may generate a hierarchy based on input for the component specifying the nodes of the different hierarchy at step S230. For example, respective row nodes can be added, modified, and/or deleted in the hierarchy based on input to the component for specifying the row node.
Fig. 4A-4C illustrate exemplary graphical user editors 400A, 400B, and 400C, respectively, according to some embodiments of the present disclosure. Graphical user interface editors 400A, 400B, and 400C may be examples of editor 110 as shown in fig. 1A or graphical user interface editor 200A as shown in fig. 2A. It should be understood that the graphical user interface editors 400A, 400B and 400C may also include more or fewer components than shown, or the graphical user interface editors 400A, 400B and 400C may be implemented in any other suitable manner.
As shown in FIG. 4A, the graphical user interface editor 400A includes components for specifying nodes at different hierarchical levels, such as a component 401 for specifying a table, a component 410 for specifying a header, a component 481 for specifying a header, a component 413 for specifying a stub, a component 414 and 416 for specifying a column or a block of a column, a component 420 and 471 and 472 for specifying a row or a block of a row, and a component (not shown) for specifying a cell. In response to an add operation (e.g., clicking on a component for a specified page) to a component (not shown) for the specified page, a new page may be displayed in the graphical user interface editor 400A and the name of the page or other information describing the page may be added. In response to an add operation for the component 482 for specifying a table, a table can be added in the graphical user interface editor 400A and a component indicating that the hierarchy type is "table" and a component 402 for specifying a table name can be displayed, the component 402 can be part of the component 401 for specifying a table. By entering "sales" in component 402, the name of the table can be specified. A component 410 for specifying a header of a table may also be displayed in the graphical user interface editor 400A in response to an add operation to the component 482 for specifying a table. A component 413 for specifying a stub may be displayed. The stub "million yuan" shown in fig. 4A may be a unit of data in the table, however, the stub may also indicate other information associated with the data in the table. Two primary column blocks "2017" and "2018" are defined in the data header shown in fig. 4A, each of which includes five secondary columns "Q1", "Q2", "Q3", "Q4", "year round", respectively. By clicking on the component 416 for specifying columns, more primary columns or primary column blocks can be added. By clicking on the component 415 for specifying a column, one or more tertiary columns that are subordinate to the secondary column "Q4" (when the secondary column becomes a secondary column block) may be added. By clicking on the component 414 for specifying a column, one or more secondary columns or blocks of secondary columns that are subordinate to the primary column "2017" can be added. The component 417 can be a dependency definition component and/or a computational relationship definition component. The calculation formula for one or more columns in the table may be specified by the component 417, e.g., "full year-Q1 + Q2+ Q3+ Q4" or the like may be specified.
The row definition component 420-460 may define the rows contained in the table. The modifier component 421 can be employed to specify the format of one or more cells that the row includes. For example, the level of the format type of a line can be increased by clicking on the top-located triangle in the component 421 to make the line appear more conspicuous (e.g., larger font size, highlighted in bold and/or underline, etc., displayed in a darker font color, etc.); the level of the format type of a line can be lowered by clicking on the underlying triangle in the component 421 to make the line appear less conspicuous. It is to be understood that the modifier component 421 can also be implemented in any other suitable manner, e.g., a user can directly enter information in a specified format, such as text defining the format, a number of format types.
According to one embodiment, the graphical user interface editor 400A may include a format setting component for specifying a format corresponding to a format type. For example, a new dialog box may be popped up or predefined text may be displayed in other areas of the graphical user interface (e.g., "cell format 1"), and user settings for the format of the predefined text may be received, e.g., the displayed predefined text may be adjusted in real-time according to the user settings to facilitate the user to directly view the display effect of the format. A specific format corresponding to the format type may then be set based on the user's setting of the format of the predefined text, and the format of the one or more cells having that format type may be specified accordingly according to the specific format. For example, referring to fig. 17, fig. 17 illustrates an exemplary format setting component 1700 in accordance with some embodiments of the present disclosure. In the format setting component 1700 shown in FIG. 17, different format types of title, column, and row may be set 1701 and 1711. For example, the predefined format of the text "title format 1" 1701 represents setting title format 1 to a black background, white bold plus bold font; the format representation of the predefined text 'line format 2' 1708 sets the line format 2 to be italic in line name, 2 characters retracted, italic in line data, underlined in two decimal places, and thousandth characters added; the format of the predefined text "line format 4" 1710 represents that the line name of line format 4 is set to be underlined, and the data in the line is displayed in percentile, two decimal places. The predefined text 1712, "default table format", etc. represents setting the default format of the table (e.g., in the case where the editor does not include a modifier component) to: the table names are black background white bold, the stubs are italics, the column block name merging cells are centered and displayed bold, the row block names are listed above the rows included in the row blocks and displayed bold, and the secondary rows in the row blocks need to be indented with a character and the like.
Component 422 can be used to obtain semantic information describing the particular meaning of a line, such as a line name, line tag, annotation, and the like. The graphical user interface editor 400A may also include other components for obtaining metadata for each node in the hierarchy. For example, in addition to semantic information, the metadata may include one or more of the following additional information: the creation time of the node, the number of children of the node, the units of data for the one or more cells corresponding to the node, the point in time or period of time corresponding to the data of the node, and the path from the root node to the node in the hierarchy, etc. The content entered in component 423 is a predefined formula, such as "SOURCE ()", which may indicate that the content of the row is populated with the original data obtained by the data panel. The components 453, 463 may be dependency definition components and/or computational relationship definition components, where the content in component 453 indicates that the result of row "total" is equal to the sum of row "cell phone", row "notebook", and row "tablet", and the content in component 463 indicates that the result of row "average" is equal to the average of row "cell phone", row "notebook", and row "tablet". Thus, row "total" depends on row "cell phone", row "notebook" and row "tablet", row "average" also depends on row "cell phone", row "notebook" and row "tablet". Although the five rows shown in FIG. 4A are all one level of rows, the components for specifying rows may allow for the addition of different levels of rows, similar to the components for specifying columns. As shown in FIG. 4B, by clicking (e.g., right-clicking or double-clicking, etc.) on component 424, a dialog box 464 may pop-up, allowing the user to add a new line, add a new block (a line may continue to be added within a block, a line that is one level lower in behavior than the current line), and so forth.
According to one embodiment, the graphical user interface editor 400A can also include a tab component, e.g., a tab component can be located in the upper left corner (or upper right corner, lower left corner, lower right corner, etc.) of a component (e.g., component 422) for specifying node names in a hierarchy, and a tab component can also be located in other areas in the graphical user interface. As shown in FIG. 4C, by clicking on the label assembly, a dialog box 473 may pop up (dialog box 473 may be part of the label assembly), allowing the user to edit one or more labels corresponding to the node. The tag component may obtain an alias tag and/or an attribute tag for each node, where the alias tag may specify an alias (e.g., number, symbol, text, etc.) of one or more cells corresponding to the node, and the attribute tag may specify additional characteristics of the one or more cells corresponding to the node. For example, in dialog box 473, the row node "handset" is set with the alias label "handset sales", and the attribute label "PRIORITY ()" to indicate that the formula "handset ()" has the highest PRIORITY to indicate that the row with the row name "handset" is to be filled with the original data obtained from the data panel with PRIORITY.
Fig. 4D-4F illustrate exemplary graphical user interfaces displayed on an apparatus for automatically generating a spreadsheet according to some embodiments of the present disclosure. Graphical user interface 4000D includes graphical user interface editor 4010 and spreadsheet preview module 4020, and may jump to data-populating graphical user interface 840 as shown in fig. 8B by clicking button 4030, and may jump to an interface presenting visual representation 500E as shown in fig. 5E by clicking button 4050.
According to one embodiment, the editor 110 may also include a component to import templates, which may be configured to import templates for one or more nodes in the hierarchy. The template may be a template for any hierarchy type of node, and may be system preset or user-defined. As shown in fig. 4D-4F, templates for an overall workbook (e.g., an overall spreadsheet template for the DCF (cash flow discount) model) may be imported by clicking on button 4017, or templates for a form (e.g., "profit form", "balance sheet", "cash flow form" template) may be imported by clicking on buttons 4012 or 4013. The user can save pages, tables, blocks, lines, headers, etc. in the editor as custom templates by clicking the "save as template" button in the drop down menu (not shown) of button 4018. All available templates may be displayed in area 4011 of graphical user interface 4000E as shown in fig. 4E, and a user may select one of the templates and add it to the spreadsheet model being edited in the editor. A "profit sheet" template may be added to the editor, such as by clicking on button 4014, as shown in areas 4015 or 4016 in the editors of FIGS. 4E and 4F. Accordingly, in the graphical user interface 4000F as shown in fig. 4F, a preview 4026 of the generated spreadsheet corresponding to the newly added table template may be displayed in the spreadsheet preview module 4020.
The spreadsheet hierarchy and how to establish dependencies and computational relationships between nodes based on the obtained information according to exemplary embodiments of the present disclosure are further described below in conjunction with fig. 5A-5D.
Fig. 5A, 5B, and 5D are schematic diagrams illustrating exemplary spreadsheet hierarchies 500A, 500B, and 500D and dependencies between nodes according to some embodiments of the present disclosure. It is to be understood that the hierarchies 500A, 500B, and 500D are exemplary, and the hierarchies as shown in fig. 5A, 5B, and 5D are only for ease of understanding, and are not intended to limit the storage format of the hierarchies. The hierarchy in FIG. 5A may be obtained, for example, by editor 110 of FIG. 1A, editor 200A of FIG. 2A, or graphical user interface editors 400A-400C of FIGS. 4A-4C.
Nodes of different hierarchical types in the hierarchy are shown in fig. 5A with different node shapes, membership between nodes is shown with solid arrows, and dependencies between nodes are shown with dashed arrows. Assuming node a is subordinate to node B, the solid arrow points from B to a and node B is said to be the parent node of node a, which is the child node of node B. A node without a parent node is defined to be called a root node, all nodes on a branch from the root node to a node are called ancestor nodes of the node, and any node in a child directed graph taking a node as a root is called a descendant node of the node. The node 501 shown with an oval is the root node, whose hierarchical type is a page, and the node 501 corresponds to one page of the spreadsheet. It should be appreciated that in other embodiments, the hierarchical type of the root node may also be a workbook or the like. The hierarchy type of the node 503, shown as a rounded rectangle, is a table with two sub-nodes 504 and 505 of the hierarchy type row, shown as octagons. The hierarchy type of node 502 is also a row, but it is not subordinate to node 503, but directly subordinate to the root node 501. That is, the workbook includes a total of three rows, where the table corresponding to node 503 includes two rows corresponding to nodes 504 and 505. The nodes of the hierarchy type cell are shown with diamonds, where cell nodes 506 and 507 are attached to row node 502, cell nodes 508 and 509 are attached to row node 504, and cell nodes 510 and 511 are attached to row node 505. It should be understood that FIG. 5A is an example of a hierarchy of a spreadsheet, that actual hierarchies may include more or fewer or different hierarchy types than FIG. 5A, and that each hierarchy may include any suitable number of nodes.
Assuming that the calculation formula corresponding to the row node 504 includes the row node 502 (e.g., the row corresponding to the node 504 is the row × 2 corresponding to the node 502), the dependency definition component (e.g., the dependency definition component 220 in fig. 2A) may obtain the following dependencies: node 504 is dependent on node 502, which may be represented by dashed arrow 534 between node 502 and node 504. Assuming that the calculation formula corresponding to the cell node 507 includes the cell node 511 (for example, "cell corresponding to the node 507 is +1 of the cell corresponding to the node 511" or "cell corresponding to the node 507 is the cell corresponding to the node 511 + the cell corresponding to the node 510", etc.), the dependency definition component (for example, the dependency definition component 220 in fig. 2A) may obtain the following dependencies: node 507 is dependent on node 511, which is indicated by a dashed arrow 542 between node 511 and node 507 (for the case "cell corresponding to node 507 + cell corresponding to node 510", node 507 dependent on node 510 may also be obtained, not shown here). A method for establishing a dependency relationship between nodes according to an exemplary embodiment of the present disclosure will be described below with further reference to fig. 5B to 5D and fig. 6.
FIG. 6 is a flow diagram illustrating an exemplary method 600 for establishing dependencies between nodes, according to some embodiments of the present disclosure. Although fig. 6 illustrates four steps of the method 600, this is merely an exemplary flow of a method for establishing dependencies between nodes, and the method 600 may also include other possible steps, or may include a combination of any of the four steps described above.
The method 600 begins at step S610, where step S610 may be performed, for example, by the editor 110 of FIG. 1A or the dependency definition component 220 of FIG. 2A. At step S610, a dependency relationship between a first node and another one or more nodes of the plurality of nodes in the hierarchy is obtained. According to one embodiment, it may be determined that the first node is dependent on the further one or more nodes by identifying the further one or more nodes comprised in the calculation formula of the first node. For example, for the calculation formula in component 450 for specifying rows in fig. 4A, the row node "total" may be determined to depend on the row node "cell phone", the row node "notebook", and the row node "tablet" based on identifying the row node "cell phone", the row node "notebook", and the row node "tablet" from the calculation formula of the row node "total". For another example, in the embodiment of FIG. 5A, the dependency definition component may obtain the following dependencies: row node 504 is dependent on row node 502 and cell node 507 is dependent on cell node 511.
The method 600 proceeds to step S620, and step S620 may be performed, for example, by the hierarchy map builder 150 of fig. 1A. At step S620, based at least on the dependency relationship between the first node and the further one or more nodes, for the node corresponding to each of the one or more first cells corresponding to the first node, it is determined that the node depends on a first set of second nodes respectively corresponding to a first set of second cells of the one or more second cells corresponding to the further one or more nodes. Referring back to FIG. 5A, for the row corresponding to node 504, for example, according to the calculation formula corresponding to node 504, is: if the row corresponding to node 504 is equal to row x2 corresponding to node 502, it may be determined that cell node 508 has a dependency relationship with cell node 506 and cell node 509 has a dependency relationship with cell node 507. Specifically, cell node 508 depends on cell node 506, and cell node 509 depends on cell node 507. As shown in FIG. 5B, these two dependencies may be represented by dashed arrow 531 between node 508 and node 506 and dashed arrow 539 between node 509 and node 507. It should be understood that depending on the particular calculation formula, the first node having a dependency relationship with the one or more additional nodes may mean that each cell corresponding to the first node has a dependency relationship with some or all of the cells corresponding to the one or more additional nodes. That is, the first group of second cells may be a part of or all of the one or more second cells corresponding to the other one or more nodes. For example, cell a may be specified to be equal to the sum of all cells within row B by calculating the formula "cell a ═ row B. For another example, it may be specified by the calculation formula "row a ═ SUM (row B, row C)" that each cell of row a is equal to the SUM of the cells with the same column name in row B and row C, when each cell of row a and the cell with the same column name in row B, and the cell with the same column name in row C have a dependency relationship.
In fig. 5B, if the calculation formula in the node 504 is "row corresponding to the node 504 is — row corresponding to the node 502 × 2", the dependency edges of the nodes 502 to 504 have been established in step S610. In step S620, the dependency edges of the nodes 502 to 504 are converted into the dependency edges 531 of the nodes 506 to 508 and the dependency edges 539 of the nodes 507 to 509.
Depending on the specific calculation formula, the dependency relationship between the first node and the one or more other nodes may be converted into a dependency relationship between each cell corresponding to the first node and some or all of the cells corresponding to the one or more other nodes in different ways.
Through step S620, the dependency relationship between the nodes having the hierarchical type higher than the cell may be decomposed into the dependency relationship of the node having the hierarchical type as the cell in the descendant node of the node. Whereas, for the dependency relationship between the node 507 and the node 511 determined in step S610, this step S620 may actually be omitted since the hierarchy type of the hierarchy in which the nodes 507 and 511 are located is already a cell.
The method 600 proceeds to step S630, and step S630 may be performed, for example, by the hierarchy map builder 150 of fig. 1A. At step S630, a calculated relationship between the node corresponding to each of the one or more first cells corresponding to the first node and the node corresponding to each of the one or more second cells corresponding to the other one or more nodes is obtained based at least on the calculated relationship between the first node and the other one or more nodes. Referring back to fig. 5A, for example, if the calculation formula corresponding to the node 504 is "row × 2" corresponding to the node 502, it may be determined that "cell 508 is" cell 506 × 2 ", and" cell 509 is "cell 507 × 2". It should be understood that depending on the particular calculation formula, the first node having a dependency relationship with the one or more additional nodes may mean that each cell corresponding to the first node has a calculation relationship with some or all of the cells corresponding to the one or more additional nodes. For example, cell a may be specified to be equal to the sum of all cells within row B by calculating the formula "cell a ═ row B. For another example, "SUM (cell with column coordinates of row B being 2019, cell with column coordinates of row C being 2019)" may be determined by the calculation formula "SUM (row B, row C)" of row node a. For another example, if the calculation formula of one row node a is a system preset formula "row a ═ SOURCE ()", the calculation relationship of all unit cell nodes of the row node a is "═ SOURCE ()", which means that data of these unit cells need to be input from the data panel. Depending on the specific calculation formula, the calculation relationship between the first node and the one or more other nodes may be converted into the calculation relationship between each cell corresponding to the first node and some or all of the cells corresponding to the one or more other nodes in different ways.
Fig. 5C is a schematic diagram illustrating a method of translating computational relationships between high-level nodes into computational relationships between low-level nodes according to some embodiments of the present disclosure.
For example, a user may enter a calculation formula in an editor
"{ revenue } [ prediction period ] = { revenue: ../profit sheet, lag (1) × (1+ { average revenue growth rate }) -.
Reference is made to the following "table: summary table ", assume that the row" income "of the first node (or left value node) in the calculation formula is at row 10 in the summary table in the spreadsheet, and that the columns in the summary table where" 2019 "," 2020 "," 2021 "are located are" F "," G "," H ", respectively. If the three columns "2019", "2020", "2021" all carry the label "forecast period", then the spreadsheet formulas need to be generated in the cells (i.e., cells F10, G10, and H10) at the intersection of the row "revenue" in the aggregated table in the target spreadsheet (i.e., row 10) with "2019" (i.e., column F), "2020" (i.e., column G), "2021" (i.e., column H).
Table: total meter
Figure BDA0002234449320000281
In addition, for example, refer to the following "table: profit sheet ", assume" revenue "of the second node (dependent node) in the calculation formula: ../profit sheet "this line is at line 30 in the profit sheet in the spreadsheet.
Table: profit table
Figure BDA0002234449320000282
Further, for example, refer to the following "table: summary table ", assume that the cell corresponding to the" 10% value of the average revenue growth rate "of another second node (dependent node) in the calculation formula is in row 12, column C in the summary table in the spreadsheet.
Table: total meter
Figure BDA0002234449320000291
Thus, the following three spreadsheet formulas may be generated for cells F10, G10, and H10 in the summary table in the spreadsheet, respectively, according to the hierarchy of the spreadsheet (such as the summary table, profit table, etc., as described above), and the atomic operator ". lag (1)", "×", "+" or the composite operator "{ y } - { x1}. lag (1) × (1+ { x2 })" consisting of the above atomic operators:
for cell F10 in the summary table, generate the spreadsheet formula E30 × (1+ C12); for cell G10 in the summary table, generate spreadsheet formula F30 × (1+ C12); for cell H10 in the summary table, the spreadsheet formula G30 × (1+ C12) is generated.
For some implementations, the dependency relationships between nodes in the hierarchy need to be visualized, and at this time, the dependency relationships can be further established by the following operations. The method 600 proceeds to step S640, which step S640 may be performed, for example, by the hierarchy map builder 150 of fig. 1A. At step S640, for a node corresponding to each cell of the one or more first cells corresponding to the first node, the following dependencies are established: the node and all or part of the ancestor nodes of the node are dependent on the first set of second nodes and all or part of the ancestor nodes of the first set of second nodes. Referring to fig. 5B, for node 504, for example, it has been determined at step S620 that cell node 508 depends on cell node 506 and cell node 509 depends on cell node 507. The following dependencies can thus be established: node 508 and the nodes of all ancestors of node 508 that are not ancestors of node 506 are dependent on node 506 and the nodes of all ancestors of node 506 that are not ancestors of node 508, and node 509 and the nodes of all ancestors of node 509 that are not ancestors of node 507 are dependent on node 507 and the nodes of all ancestors of node 507 that are not ancestors of node 509. Fig. 5D shows the dependencies constructed according to step S640 for the hierarchy shown in fig. 5A. Note that for clarity of illustration, the dependency between a node that is not an ancestor of node 507 of node 509 and its ancestor and a node that is not an ancestor of node 509 of node 507 and its ancestor are omitted in fig. 5D. That is, the following dependencies may be established: dependency 531, indicating that node 508 depends on node 506; a dependency 532 indicating that node 504 depends on node 506; a dependency 533, indicating that node 503 depends on node 506; a dependency 534, indicating that node 504 depends on node 502; dependency 535, indicating that node 508 is dependent on node 502; dependency 536, indicating that node 503 depends on node 502. For another example, for node 507, it has been determined at step S610 that node 507 is dependent on node 511. The following dependencies can thus be established: node 507 and the nodes of all ancestors of node 507 that are not ancestors of node 511 are dependent on node 511 and the nodes of all ancestors of node 511 that are not ancestors of node 507. That is, the following dependencies may be established: dependency 542, indicating that node 507 depends on node 511; dependency 543, indicating that node 507 depends on node 505; dependency 545, indicating that node 507 depends on node 503; dependency 541, indicating that node 502 depends on node 511; dependency 544, indicating that node 502 depends on node 505; dependency 546, indicating that node 502 depends on node 503. A schematic diagram of a visual representation of the dependency relationships thus established is shown in fig. 5E. For example, in the visual representation 500E of fig. 5E, all nodes of the hierarchy having a hierarchy type of page and dependencies between all nodes of the hierarchy having a hierarchy type of page in the hierarchy are displayed. Visual representation 500E may include nodes 5001-5007 and arrows representing dependencies between them. In other embodiments of the present disclosure, the dependency relationship between the nodes in the hierarchy does not need to be visualized, and in this case, the dependency relationship does not need to be further established by the method of step S640. In fig. 6, step S640 is shown with a dashed box to indicate that this step is optional.
Fig. 7 is a schematic diagram illustrating a node 700 in an exemplary spreadsheet hierarchy according to some embodiments of the present disclosure. It should be understood that the node 700 may be any one of the nodes in the hierarchy in fig. 5A-5B and 5D. A data structure storing nodes in a hierarchy structure as shown in fig. 5A-5B and 5D according to an exemplary embodiment of the present disclosure may be referred to as a hierarchy map. It should be understood that the hierarchical structure of the tree shown in fig. 5A, 5B, and 5D is only for convenience of understanding, and is not intended to limit the storage manner of the hierarchical structure. The hierarchical graph may be stored using any suitable data structure, such as a linked list, a tree, a directed graph, and so forth. According to one embodiment, a hierarchy map builder (e.g., hierarchy map builder 150 as shown in fig. 1A) may be configured to build a hierarchy map, and a hierarchy map memory (e.g., hierarchy map memory 160 as shown in fig. 1A) may be configured to store the hierarchy map in any suitable storage device (including but not limited to RAM, ROM, magnetic disk, optical disk, etc.) and allow for dynamic querying, invoking, and modifying of the hierarchy map.
According to one embodiment, the hierarchy type 702 of the hierarchy in which the node is located, the child nodes 704 of the node, and the metadata 706 of the node may be stored for each node. According to one embodiment, the hierarchy graph builder may be configured to build a hierarchy graph for a spreadsheet based on a hierarchy type 702 of a hierarchy in which each node of a plurality of nodes in the hierarchy resides, a child node 704 of the node, and metadata 706 of the node. The metadata 706 may include semantic information (e.g., one or more of a title, name, label, and annotation associated with the node) that describes the particular meaning of the node. The metadata 706 may also include one or more of the following additional information: the creation time of the node, the number of children of the node, the units of data for the one or more cells corresponding to the node, the point in time or period of time corresponding to the data of the node, and the path from the root node to the node in the hierarchy, etc. Referring to fig. 5D, for example, for node 504, the hierarchy type of the hierarchy in which node 504 is located may be stored as a row, the child nodes of node 504 are nodes 508 and 509 (e.g., a number list of child nodes or a list of pointers to child nodes may be stored, etc.), and metadata of node 504 may be stored (e.g., a row name, a list of column names for each cell of the row, etc.).
According to one embodiment, the nodes 708 on which the node depends may also optionally be stored for each node (e.g., the number of the dependent node may be stored or a pointer to the dependent node may be stored, etc.). In one embodiment, the hierarchy map builder builds the hierarchy map based also on the node 708 on which each node in the hierarchy depends. Referring to FIG. 5D, for node 504, for example, the nodes on which node 504 depends may be stored including node 502 and node 506. It should be noted that it is not necessary to store the nodes on which each node depends. According to one embodiment, nodes that depend on each node may additionally or alternatively be stored for that node. That is, for each node in the hierarchical graph, the node on which the node depends may be stored, or the node which depends on the node may be stored, or both the node on which the node depends and the node which depends on the node may be stored. Furthermore, the dependency of the node and other nodes may not be stored for some nodes in the hierarchy (e.g., the contents of the cell corresponding to the node may be directly populated by the original data, the node is not dependent on other nodes, but the node may be dependent on other nodes, such as the row nodes "cell phone", "notebook", and "tablet" in fig. 4A).
According to an embodiment, the calculation relationship 710 between the node and other nodes may also be optionally stored for each node (e.g., a calculation formula of the node, an operator or a combination of operators included in the calculation formula of the node, constants possibly included in the calculation formula, and a node on which the node depends corresponding to each parameter placeholder in the calculation formula may be stored). According to one embodiment, the hierarchy map builder builds the hierarchy map also based on the computational relationships 710 between each node and other nodes in the hierarchy. Referring to fig. 5D, for node 504, for example, the computational relationships between node 504 and other nodes may be stored as: "the row corresponding to the node 504 is" the row × 2 "corresponding to the node 502, or" × 2 ". For node 508, the computational relationships between node 508 and other nodes may be stored as: "the cell corresponding to the node 508 is the cell × 2" corresponding to the node 506, or "× 2". It should be noted that in the case that only an operator or a combination of operators included in the calculation formula of a node is stored in the calculation relationship 710 of the node and other nodes, the complete calculation formula of the node can be derived in combination with the node 708 on which the node depends, so that the utilization of the storage space can be optimized while avoiding information loss. At this time, the dependencies utilized in deriving the complete calculation formula of the node do not include the newly obtained dependencies through step S640. That is, for dependencies between nodes retrieved through an editor, dependencies between ancestor nodes of the nodes are not utilized in deriving their computational formula. Furthermore, the computed relationship of the node and other nodes may not be stored for some nodes in the hierarchy (e.g., the contents of the cell corresponding to the node may be directly populated with raw data rather than computed from other nodes, such as the row nodes "cell phone", "notebook", and "tablet" in fig. 4A).
Fig. 8A is a block diagram of an exemplary data panel 800A, according to some embodiments of the present disclosure. Data panel 800A may be a separate component from the editor. Data panel 800A may be one example of data panel 120 as shown in FIG. 1A. As shown in FIG. 8A, the data panel 800A can include a raw data acquisition component 810, a to-be-populated data detection component 820, and a data matching component 830. Although fig. 8A illustrates the above three units, this is only a schematic structure of the data panel 800A, and the data panel 800A may further include more or less units than those illustrated, or may include a combined unit of the above three units.
Raw data acquisition component 810 can be configured to provide an interface with the source of the raw data. According to one embodiment, raw data acquisition component 810 may include one or more of the following components: an intelligent data extraction component configured to automatically identify raw data from a data file (e.g., an Excel file, a txt file, etc.); a database interface component configured to import raw data from a database (e.g., Bloomberg's or like professional financial database); a retrieval interface component configured to retrieve raw data from an external data source (e.g., a search engine, an electronic publication, a blog, etc.); a manual input receiving component configured to receive raw data input by a user. According to one embodiment, the manual input receiving component may allow a user to directly enter data in a spreadsheet preview module (e.g., spreadsheet preview module 140) in a graphical user interface editor. According to one embodiment, a user can manually modify data derived from one or more of the intelligent data extraction component, the database interface component, and the retrieval interface component. According to one embodiment, a data tracing component may be utilized to record the source of raw data entered in a data panel. For example, the data sourcing component may record one or more of the name and/or location of the data file, the database name, the name of the external data source, and the user name of the incoming data. According to one embodiment, the raw data entered in the data panel 800A may be stored in a data store, and the raw data stored in the data store may be recalled or exported. The raw data acquisition component 810 can be configured to identify semantic information for each raw data item, the raw data item being a relatively independent unit of data in a data file, the semantic information for a raw data item can be a list of strings describing the raw data item, e.g., the semantic information for a raw data item "123.45" can be a list of strings "[" 2019 "," revenue "]". According to one embodiment, a user may drag or otherwise import a data file into data panel 800A, and then the intelligent data extraction component may automatically identify semantic information for each raw data item of raw data in the data file.
The to-fill data detection component 820 can be configured to detect a node of a plurality of nodes of a hierarchy that requires input of raw data and a requirement for the raw data in the node (e.g., whether the node requires input of raw data and a type of raw data that requires input). According to one embodiment, the to-be-populated data detection component 820 may determine that one or more cells corresponding to a node in the editor require INPUT of raw data based on detecting that a particular predefined formula (e.g., -SOURCE () or-INPUT ()) is included in the component specifying the node at a different level, and determine the requirements for the raw data based on the metadata and/or the hierarchical structure (e.g., the number of row nodes, the number of column nodes, the number of cell nodes, etc.) associated with the node. The user may also specify other characteristics of the raw data, such as accuracy, etc.
The data matching component 830 can be configured to match the nodes requiring input of raw data with the acquired raw data based on the raw data acquired by the raw data acquisition component 810 and the nodes requiring input of raw data detected by the to-be-populated data detection component 820 and the requirements for raw data in the nodes. The data matching component 830 can be configured to populate the successfully matched raw data into the matched nodes requiring the input of the raw data. In some implementations, if multiple raw data items match the same node requiring raw data entry, the user is allowed to select the raw data items to be populated into the node requiring raw data entry. In other implementations, the user is allowed to enter data directly (e.g., via a keyboard) to fill in to the node that needs to enter the original data.
Data panel 800A may optionally include a data population graphical user interface 840. In some implementations, the data form to be populated can be generated by the spreadsheet generation module and displayed on a graphical user interface, thereby allowing real-time display of data matching and populating results and allowing a user to more intuitively populate nodes that require input of raw data. The data table to be filled may be an Excel file or other spreadsheet file, or may be a txt file or a part of a web page, or any other suitable file format.
Fig. 8B is an exemplary data panel graphical user interface 840 according to some embodiments of the present disclosure. The graphical user interface 840 may include a data table 831 (e.g., in the form of a web page) to be populated generated by a translator and renderer. The graphical user interface 840 can also include a view 811 of the raw data file (e.g., in pdf format) imported by the raw data acquisition component and a view 812 of the results of the parsing of the raw data file by the intelligent data extraction component. According to one embodiment, the intelligent data extraction component is configured to parse semantic information of each of the raw data identified from the data file to generate parsed data, and respective data items of one of the data file, the data parsed by the intelligent data extraction component, and the data populated in the data table to be populated may be highlighted when a data item of the other two of the data file, the data parsed by the intelligent data extraction component, and the data populated in the data table to be populated is selected. As shown in fig. 8B, each original data item corresponds to a row name and a column name matched thereto in the view 812, for example, the original data item "265,595" corresponds to semantic information [ "Net Sales", "September 29", "2018" ]. The cells with dark gray backgrounds in the data table to be filled 831 represent cells detected by the data to be filled detection component that do not need to be filled with data (e.g., the data of these cells need to be calculated from the raw data filled by other cells), and only the cells with white or light blue backgrounds need to be filled with data. In area 833 is the data that is automatically matched and filled by data matching component 830 and is represented on the data-filling graphical user interface by a black font, e.g., data item "265,595" of the original data is automatically filled into the cell at the intersection of row "Sales" and column "2018" and is displayed by a black font. According to one embodiment, the raw data from different SOURCEs or corresponding to different predefined formulas may be distinguished in different display formats, e.g., data manually entered by the user is represented in cell 835 with underlined numbers and a light blue background, and data of cells corresponding to the predefined formula "═ INPUT ()" instead of "═ SOURCE ()" is represented in the area 834 corresponding to the three cells with black italic numbers. The graphical user interface 840 in fig. 8B includes a data source function, i.e., clicking on any one of the data items in the data table 831 to be populated, one or more of the original data items and parsed data items that match them can be highlighted in the views 811 and 812, respectively. Similarly, clicking on any of the original data items in view 811 highlights the matching parsed data item and the matching populated data item in view 812 and data table to be populated 831, respectively; clicking on any of the parsed data items in view 812 highlights the matching original and fill data items in view 811 and data table to be filled 831, respectively.
Fig. 9A is a flow diagram illustrating an exemplary method 900A for generating a spreadsheet according to some embodiments of the present disclosure. Although fig. 9A illustrates three steps of the method 900A, this is merely an exemplary flow of a method for generating a spreadsheet, and the method 900A for generating a spreadsheet may include more or fewer steps than shown, or may include a combination of any of the three steps described above. Further, some of the steps in method 900A may occur simultaneously or in a different order than that shown.
The method 900A begins at step S910, which step S910 may be performed by the to-fill data detection component 820 of fig. 8A. At step S910, a node of the plurality of nodes in the hierarchy that needs to input the original data and a requirement for the original data in the node are detected.
The method 900A proceeds to step S920, and step S920 may be performed by the translator. At step S920, the translator generates a spreadsheet to be populated based on the hierarchy of the spreadsheet, the metadata, the detected nodes that need to input the raw data, and the requirements for the raw data in the nodes.
The method 900A proceeds to step S930 where the spreadsheet to be populated is populated based on the raw data to generate the spreadsheet at step S930.
Fig. 9B is a flow diagram illustrating an exemplary method 900B for generating a spreadsheet according to some embodiments of the present disclosure. Fig. 9B is a flow diagram illustrating an exemplary method 900B for generating a spreadsheet according to some embodiments of the present disclosure. Although FIG. 9B illustrates two steps of the method 900B, this is merely an exemplary flow of a method for generating a spreadsheet, and the method 900B for generating a spreadsheet may include more or fewer steps than shown, or may include a combination of any of the two steps. Further, the steps in method 900B may occur simultaneously or in a different order than that shown. According to one embodiment, the method 900B may be performed after the data items to be stuffed are stuffed in steps S910-S930 of the method 900A. According to another embodiment, the method 900B may be performed before steps S910-S930 of the method 900A, generating only formulas in a spreadsheet. According to one embodiment, method 900B may be performed by a translator of a spreadsheet generation module.
The method 900B begins at step S901, where, for each node of a plurality of nodes in a hierarchy: a location of one or more cells in the spreadsheet corresponding to the node is determined based on the hierarchical structure.
The method 900B proceeds to step S902, where at step S902, the contents of one or more cells corresponding to the node are populated based on one or more of the raw data, the hierarchical type of the node, the metadata of the node, the node on which the node depends, and the computational relationship of the node.
According to one embodiment, corresponding pages may be added to the spreadsheet for all nodes in the hierarchy that are of the hierarchy type "page". According to one embodiment, the location (e.g., row coordinates and column coordinates) where the title of a different hierarchy is located in each page may be determined for a node of which the hierarchy type is "section" in the hierarchy, and the content of the title may be written into the cell of the corresponding location in the spreadsheet. According to one embodiment, the location (e.g., row and column coordinates) of the top left-most cell of each table in the spreadsheet may be determined for a node of the hierarchy type "table" in the hierarchy, the name of the table and the location of the stub of the table in the spreadsheet may be determined, and the contents of the table name and stub may be written into the cell of the corresponding location in the spreadsheet. According to one embodiment, for each "table" node, the location of all row names and column names in this table in the spreadsheet may be determined from the "row" node, the "column" node, the "block" node in its children, and the row name and column name may be written to the cells of the corresponding location in the spreadsheet. According to one embodiment, for each "table" node, the locations of all cells of the table in the spreadsheet and the contents (e.g., data or formulas) in those cells may be determined, and the corresponding contents (e.g., data or formulas) may be written to the cells at the corresponding locations in the spreadsheet. It should be understood that these descriptions are merely examples, and the cells may also be populated in any other suitable order and manner, so long as the generated spreadsheet is guaranteed to remain consistent with the obtained hierarchy, metadata for the corresponding nodes, raw data, and computational relationships.
Fig. 10 is a block diagram of an exemplary spreadsheet generation module 1000 according to some embodiments of the present disclosure. Spreadsheet generation module 1000 may be one example of spreadsheet generation module 130 as shown in FIG. 1. As shown in fig. 10, the spreadsheet generation module 1000 may include a translator 1010 and a renderer 1020. Although fig. 10 illustrates the above two units, this is only a schematic structure of the spreadsheet generating module 1000, and the spreadsheet generating module 1000 may include more or less units than those illustrated, or may include a combined unit of the above two units.
According to one embodiment, the translator 1010 may be configured to generate data or a formula in each of the one or more first cells based on raw data obtained by the data panel or at least based on a calculated relationship between each of the one or more first cells and each of the one or more second cells obtained by the hierarchical graph builder. As described above, according to one embodiment, the translator 1010 may be configured to generate a spreadsheet populated with data based on the data matching results of the data matching component 830. According to one embodiment, the translator 1010 may be configured to: for each node of a plurality of nodes in a hierarchy, determining a location in the spreadsheet of one or more cells corresponding to the node based on the hierarchy; and populating contents of one or more cells corresponding to the node based on one or more of the raw data, the hierarchy type of the node, the metadata of the node, the node on which the node depends, and the computational relationship of the node.
After passing through step S630 shown in fig. 6, if the calculation relationship of the node corresponding to one cell is the system preset formula "═ SOURCE ()" or "═ INPUT ()", it indicates that the content of this cell is the original data item matching the cell obtained via the data panel. After the step S630 shown in fig. 6, if the calculation relationship between one cell node and one or more other cell nodes is obtained, the formula of the cell corresponding to the cell node in the spreadsheet may be generated according to the calculation relationship between the cell node and one or more other cell nodes, the position of the cell corresponding to the cell node in the spreadsheet, and the positions of the cells corresponding to one or more other cell nodes in the spreadsheet. For example, the computational relationship of cell node a to row node B, "cell a ═ row b.sum ()" may be translated into a computational relationship of cell a to each cell that is subordinate to row B: "cell a ═ sum (each cell in row B). If the row B includes three cells, the positions of the three cells in the spreadsheet determined via step S901 in fig. 9B are "E10, F10, G10", respectively, and the position of the cell node a in the spreadsheet determined via step S901 is "D5", it may be determined that the content of the cell D5 of the generated spreadsheet is the formula "═ SUM (E10: G10)".
The renderer 1020 may be configured to set a format of the one or more first cells in the spreadsheet according to the information for specifying the format of the one or more first cells. According to one embodiment, the renderer 1020 may be configured to automatically set the format of the one or more cells corresponding to each node of the plurality of nodes in the hierarchy according to one or more of a hierarchy type of a hierarchy in which the node is located, information of the format of the node, and contents of the one or more cells corresponding to the node. For example, if a node whose hierarchical type is a column includes "column format 1" set for the node by the modifier component in the metadata of the node, the renderer 1020 may set the format of the cell in which the column name of the column corresponding to the node is located to the format corresponding to "column format 1" (e.g., black background, white bold font, four-size character, etc.). For another example, if a node is a row in the hierarchical type, the node metadata includes "row format 2" set for the node by the modifier component, and the renderer 1020 may set the row name of the row corresponding to the node and the format of each cell included in the row to a format corresponding to "row format 2" (e.g., italics, underlines, four-size characters, blue-size characters, two-bit significant numbers, decimals, etc.). For another example, it should be understood that, according to some embodiments, the format of the cells may also be automatically set (e.g., where the editor does not include a modifier component) based on any suitable predefined rule. According to one embodiment, the renderer 1020 may perform one or more of the following: the method includes automatically setting different formats for titles of different hierarchies according to the hierarchy of the title, automatically setting the format of a data header of a table, automatically setting the format of different columns in the table according to the hierarchy of the columns, automatically setting the format of different rows in the table according to the hierarchy of the rows, and automatically setting the format of different cells according to the content in the cells. According to one embodiment, the format of the cells may be set according to the source of the data in the cells, e.g., data manually entered by the user is underlined and a light blue background, data extracted from the database is displayed in black italics, other raw data is displayed in gray, etc. According to one embodiment, the cells may be formatted according to the content in the cells, such as the cells with formula content set in black font, the page crossing formula set in green font, the cells with errors in large red font, etc.
As described above, according to one embodiment, a spreadsheet preview module (e.g., spreadsheet preview module 140 of FIG. 1A and 4020 in FIG. 4D) may be configured to cause the generated spreadsheet to be displayed.
11A-11D illustrate exemplary displayed spreadsheets 1100A-1100D, according to some embodiments of the present disclosure. Spreadsheets 1100A-1100D may be generated, for example, from inputs in a graphical user interface editor and raw data (not shown) as shown in FIG. 4A. It should be appreciated that spreadsheets 1100A-1100D may also be generated based on input in any other type of editor. The generation of spreadsheets 1100A-1100D is now described with reference to FIG. 4A.
A data to fill detection component of the data panel (e.g., data to fill detection component 820 of fig. 8A) may detect that cells corresponding to row node "cell phone", row node "notebook", and row node "tablet" in fig. 4A require input of raw data, and then may determine that raw data of ten columns of one row needs to be filled in cells corresponding to row node "cell phone", row node "notebook", and row node "tablet", respectively, based on the parent nodes (i.e., table node "sales") of the row nodes including ten columns (i.e., 10 data per row, 30 data in total). While ten formulas need not be populated, but rather data need to be populated, in the cells corresponding to the row node "total" and the row node "average", respectively, but these formulas need to reference the raw data in the cells corresponding to the row node "cell phone", the row node "notebook", and the row node "tablet".
A translator (e.g., translator 1010 shown in fig. 10) may be configured to generate a spreadsheet 1100A to be populated as shown in fig. 11A based on the hierarchy and metadata obtained by the graphical user interface editor 400A. While the spreadsheet to be populated is shown in FIG. 11A as an Excel file, spreadsheet 1100A to be populated may also be a portion of any other suitable spreadsheet file, txt file, or web page, or any other suitable file format. According to one embodiment, "sales" 1110 may be filled in the top left cell of the spreadsheet based on the table "sales" being the first table of the page and based on the table name "sales". Since the header of the table contains secondary columns, two rows are required to fill in the column names, so that the stub "million Yuan" 1120 may be filled into the merged cell of the first cell (A2-A3) of the second to third rows of the spreadsheet. Based on determining that column chunk "2017" and chunk "2018" each include five secondary columns "Q1", "Q2", "Q3", "Q4", "yearly", column name 1121- "2017" may be populated into the 2-6 cells (B2-F2) of the second row, and column name 1122- "2018" may be populated into the 7-11 cells (G2-K2) of the second row. Column names 1141-. Similarly, the row names 1131-. Thereby, a data table 1100A to be populated can be generated. According to one embodiment, a calculation formula may be entered in the graphical user interface editor 400A of FIG. 4A: "whole year-round Q1+ Q2+ Q3+ Q4". Thus, cells in row "total", row "average", and cells in row "cell," "notebook," and "tablet" column name "year round" may be filled with a dark background color to indicate that the cells do not need to be filled with raw data, but rather a formula. The to-be-populated data table 1100A can be used to populate the graphical user interface 840 with data in the data panel 800A.
A translator (e.g., translator 1010 shown in fig. 10) may be configured to populate the data table to be populated 1100A based on raw data obtained through the data panel and based on nodes on which the respective nodes depend and the calculated relationships of the respective nodes to generate a spreadsheet 1100B. According to one embodiment, the content populated in the cells of row "cell phone", row "notebook", row "tablet" in the spreadsheet 1100B, column names "Q1", "Q2", "Q3", "Q4", is the raw data obtained through the data panel that matches these cells, while the content populated in row "total" and row "AVERAGE" may be a spreadsheet formula generated based on the calculated relationship of each cell of row node "cell phone", row node "notebook", row node "tablet", e.g., the content in cell "B7" is "SUM (B4: B6)" and the content of cell B8 is "AVERAGE (B4: B6). According to one embodiment, a calculation formula may be entered in the graphical user interface editor 400A of FIG. 4A: "whole year-round Q1+ Q2+ Q3+ Q4". In this case, only the original data for the cells located in the columns with the column names 1141 and 1144 and 1151 and 1154 and the cells located in the row with the row names 1131 and 1133 may be input. The contents of the cells in the columns with column names 1145 and 1155 and the row with row name 1134 and 1135 are formulas, for example, the content in the cell "F4" is "SUM (B4: E4)". The translator may be configured to further populate the contents of the cells (e.g., numerical results) populated with spreadsheet formulas based on the formulas and the raw data in those cells, resulting in a spreadsheet 1100C as shown in fig. 11C.
According to one embodiment, the renderer may format one or more cells in the spreadsheet 1100C based on information obtained in the graphical user interface editor 400A for specifying the format of the one or more cells. According to one embodiment, in response to the format level for line "total" and line "average" obtained in the finisher component 421 being "line format 3", it is possible to set the cells a7 and A8 in which the line names 1134 and 1135 are located to bold, and indented 2 characters according to "line format 3", and to set the number format of the cells (B7 to K7, B8 to K8) included in the two lines to bold, two-bit decimal, and plus one-thousandth characters. In addition, the cells a 4-a 6 of the row names 1131-1133 can also be set as bold according to the default row format preset by the system, and the cells (B4-K4, B5-K5, B6-K6) included in the three rows can also be set as two-digit decimal and plus one-thousandth characters. According to one embodiment, the formats of the cells in the first row are automatically set to bold and character four, and the formats of the cells in the second row to the third row are automatically set to bold, character four and italic in response to the name of the first behavior table, and the data headers of the second row to the third row in the spreadsheet.
FIG. 12 is a flow diagram illustrating an exemplary method 1200 for updating a generated spreadsheet according to some embodiments of the present disclosure. Although FIG. 12 illustrates three steps of the method 1200, this is merely an exemplary flow of a method for updating a generated spreadsheet and the method 1200 for updating a generated spreadsheet may include other possible steps as well or may include a combination of any of the three steps described above. Method 1200 may be performed, for example, by a spreadsheet preview module.
The method 1200 begins at step S1210, where the generated spreadsheet is displayed at step S1210. For example, the generated spreadsheet may be displayed on a display coupled with the means for generating a spreadsheet.
The method 1200 proceeds to step S1220 where a modification to the hierarchy, metadata, raw data, dependencies, or computational relationships is received at step S1220. According to one embodiment, an editor may be utilized to modify a hierarchy, metadata, dependencies, or computational relationships, such as modifying membership or dependencies of nodes in a hierarchy, adding or deleting nodes, modifying semantic information of nodes, modifying format information of nodes, changing formulas of nodes, and so forth. According to one embodiment, the original data stored in the data storage device may be modified.
The method 1200 proceeds to step S1230, at step S1230, the displayed spreadsheet is updated based on the modifications to the hierarchy, metadata, raw data, dependencies, or calculated relationships. According to one embodiment, the updated spreadsheet corresponds to the modified hierarchy, metadata, raw data, dependencies, or computational relationships. For example, in response to modifying the row name "totals" in FIG. 4A to "sales totals," the row name 1134 in the spreadsheet shown in FIG. 11B may be modified to "sales totals. As another example, in response to adding a new row node "growth rate on par" in FIG. 4A using the component 471 for specifying a row node, a new row can be added below the row corresponding to the row name "average" in the spreadsheet 1100B shown in FIG. 11B. Specifically, the row name "growth rate on par" may be populated in the first cell of row 9.
FIG. 13 is a flow diagram illustrating an exemplary method 1300 for modifying a spreadsheet according to some embodiments of the present disclosure. Although FIG. 13 illustrates three steps of the method 1300, this is merely an exemplary flow of a method for modifying a spreadsheet, and the method 1300 for modifying a spreadsheet may include other possible steps as well, or may include a combination of any of the three steps described above. Method 1300 may be performed, for example, by a spreadsheet preview module.
The method 1300 begins at step S1310, and at step S1310, the generated spreadsheet is displayed. For example, the generated spreadsheet may be displayed on a display coupled with the means for generating a spreadsheet.
The method 1300 proceeds to step S1320, at step S1320, a modification to the generated spreadsheet is received. According to one embodiment, a user may add or delete one or more cells in a spreadsheet, change the location of one or more cells, modify one or more of the name, title, label, and annotation of one or more cells, modify formatting information of one or more cells, and the like. For example, the user may modify the row name 1134 in the spreadsheet shown in FIG. 11B to "sales total". For another example, the user may add a new row with a row name of "comparable growth rate" below the row corresponding to the row name of "average" in the spreadsheet 1100B shown in FIG. 11B.
The method 1300 proceeds to step S1330, at step S1330, translating the modification to the spreadsheet into a modification to at least one of the hierarchy, the metadata, the raw data, the dependencies, or the computational relationships, and modifying at least one of the hierarchy, the metadata, the raw data, the dependencies, or the computational relationships accordingly based on the modification using at least one of the editor and the data panel. According to one embodiment, the modified hierarchy, metadata, raw data, dependencies, and computational relationships correspond to the modified spreadsheet. According to one embodiment, the hierarchy map memory may be utilized to store modified hierarchies, metadata, dependencies, or computational relationships, and may also store modified raw data in the data store. For example, in response to modifying the row name 1134 in the spreadsheet shown in fig. 11B to "sales total," the name "total" of the corresponding row 450 in the hierarchy corresponding to fig. 4A may be modified to "sales total. For another example, in response to adding a new row having a row name of "percentage growth" below the row corresponding to the row name of "average" in spreadsheet 1100B shown in FIG. 11B, a new row node of "percentage growth" may be added in the hierarchy corresponding to FIG. 4A, the parent node of which may be the node corresponding to the table "sales", e.g., a row node may be automatically added using component 471 for specifying a row and the name of the newly added row in the editor set to "percentage growth".
According to one embodiment, the modification to the hierarchical structure includes a dragging of a component that specifies a node of a different level in the hierarchical structure, and the updating of the displayed spreadsheet includes adjusting a relative position of one or more cells corresponding to the node in the spreadsheet to coincide with a relative position of the dragged component that specifies the node in the graphical user interface editor.
Fig. 14 illustrates an exemplary graphical user editor 1400 in accordance with some embodiments of the disclosure. In contrast to the graphical user interface editor 400A in FIG. 4A, the component 440 for the designated row node "tablet" is dragged over the component 430 for the designated row node "notebook".
FIG. 15 illustrates an exemplary displayed spreadsheet 1500 according to some embodiments of the present disclosure. Spreadsheet 1500 is updated as compared to spreadsheet 1100D shown in FIG. 11D. Specifically, the relative position of the cells in the row with the row name "tablet" in the spreadsheet is adjusted to be above the cells in the row with the row name "notebook" to coincide with the relative position of the dragged component 440 for specifying the row node "tablet" in the graphical user interface editor 1400.
The means for generating a spreadsheet may also include other additional functionality to facilitate the operation of the user. According to one embodiment, an apparatus for generating a spreadsheet may include an error detection module. The error detection module may be configured to: automatically detecting an error in one or more of the hierarchy, the metadata, the raw data, the dependencies, or the computational relationships, and issuing an alert to prompt for the error. For example, the error detection module may detect that the original data in the first cell is 0, while the formula of the second cell may be equal to the inverse of the value of the first cell, so that the error detection module may determine that the original data or the formula of the second cell may be in error, thereby issuing a warning. For example, the error detection module may detect that the formula of the row "total" is "total ═ AVEARGE (mobile phone, notebook, tablet)", so as to detect that the semantic information "total" of the row does not conform to the operator "AVERAGE" of the row, thereby issuing a warning. According to one embodiment, an apparatus for generating a spreadsheet may include an intelligent suggestion module. The intelligent suggestion module may be configured to: predicting one or more of a hierarchy, metadata, raw data, dependencies, computational relationships, and operations to be performed by a user to be acquired based on one or more of the hierarchy, metadata, raw data, dependencies, computational relationships, and operations that have been performed by the user that have been acquired; and providing intelligent suggestion results for one or more of the hierarchy to be obtained, the metadata, the raw data, the dependencies, the computational relationships, and the operations to be performed by the user. The user may select directly from the intelligent suggestion results, which may improve the efficiency of the process of generating the spreadsheet. For example, in response to the user successively defining two columns having column names "2016", "2017", the column name of the next to-be-added column may be predicted to be "2018", and the intelligent suggestion result is displayed to the user. According to one embodiment, different types of syntax elements in a component in a graphical user interface editor for specifying different levels of nodes may be represented in different display formats. For example, a defined node, a newly defined node, a function name in a formula, a node name, etc. may be distinguished by different colors, fonts, etc.
FIG. 16 is a flow chart illustrating an exemplary method 1600 of obtaining a hierarchical structure for a spreadsheet according to some embodiments of the present disclosure. Although fig. 16 illustrates two steps of the method 1600, this is merely an exemplary flow of a method of obtaining a hierarchy for a spreadsheet, and the method 1600 of obtaining a hierarchy for a spreadsheet may include other possible steps, or may include a combination of any of the two steps. For example, method 1600 may be performed by an editor, which may be a text editor.
The method 1600 begins at step S1610, where a text code input by a user may be received at step S1610. The text code may be written in a domain specific language for the application scenario, or in any suitable programming language existing (e.g., C, C + +, C #, Java, python, etc.), or that may be developed in the future. According to one embodiment, in a domain specific language for the present application scenario, the user may specify different levels using the keywords BOOK, SHEET, TABLE, HEADER, STUB, ROW, and code indentation, etc., separate different columns or blocks of columns in the HEADER using the keyword "[ ]" to specify intervals, define tags using the keyword "[ ] ]" to define tags, use + + +, - - - -, as modifiers to define the format of nodes, etc. For example, the text code entered by the user may be as follows.
Figure BDA0002234449320000461
The user may also write text code based on any predefined grammar rules.
The method 1600 proceeds to step S1620, where the text code is parsed to generate a hierarchy at step S1620. According to one embodiment, the text code may be parsed based on predefined grammar rules. For example, the text editor may obtain the same hierarchical structure as that obtained by the graphical user interface editor 400A shown in fig. 4A by parsing the text code as shown above, and will not be described herein again.
As described above, according to the embodiments of the present disclosure, the separation of the hierarchical structure, the calculation relationship, and the original data in the electronic form can be achieved, the manner of generating the electronic form can be more intuitive, convenient, easy to understand and debug, and the electronic form has the characteristics of flexibility and automation. Furthermore, embodiments in accordance with the present disclosure can facilitate intuitive and convenient modification of spreadsheets, making it easy to reuse existing spreadsheet models.
Hardware implementation
FIG. 18 illustrates a general hardware environment in which the present disclosure may be applied, according to some embodiments of the present disclosure.
Referring to fig. 18, a computing device 1800, which is an example of a hardware device applicable to aspects of the present disclosure, will now be described. Computing device 1800 may be any machine configured to perform processing and/or computing, and may be, but is not limited to, a workstation, a server, a desktop computer, a laptop computer, a tablet computer, a personal digital assistant, a smart phone, a portable camera, or any combination thereof. The apparatus 100A described above may be implemented in whole or at least in part by a computing device 1800 or similar device or system.
Computing device 1800 may include elements capable of connecting with bus 1802 or communicating with bus 1802 via one or more interfaces. For example, computing device 1800 may include bus 1802One or more processors 1804, one or more input devices 1806, and one or more output devices 1808. The one or more processors 1804 may be any type of processor and may include, but are not limited to, one or more general-purpose processors and/or one or more special-purpose processors (such as special-purpose processing chips). Input device 1806 may be any type of device capable of inputting information to a computing device and may include, but is not limited to, a mouse, a keyboard, a touch screen, a microphone, and/or a remote control. Output devices 1808 may be any type of device capable of presenting information and may include, but are not limited to, a display, speakers, a video/audio output terminal, and/or a printer. Computing device 1800 may also include, or be connected with, non-transitory storage device 1810 may be any storage device that is non-transitory and that may implement a data storage library, and may include, but is not limited to, disk drives, optical storage devices, solid state storage, floppy disks, flexible disks, hard disks, tapes or any other magnetic medium, compact disks or any other optical medium, ROM (read only memory), RAM (random access memory), cache memory, and/or any other memory chip or cartridge, and/or any other medium from which a computer may read data, instructions, and/or code. Non-transitory storage device 1810 may be detachable from the interface. The non-transitory storage device 1810 may have data/instructions/code for implementing the above-described methods and steps. Computing device 1800 may also include communication devices 1812. The communication device 1812 may be any type of device or system capable of communicating with external apparatus and/or with a network, and may include, but is not limited to, a modem, a network card, an infrared communication device, wireless communication equipment, and/or a device such as bluetoothTMDevices, 802.11 devices, WiFi devices, WiMax devices, cellular communications facilities, and the like.
The bus 1802 can include, but is not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA (eisa) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
The computing device 1800 may also include a working memory 1814, which may be any type of working memory that can store instructions and/or data useful to the operation of the processor 1804, and may include, but is not limited to, random access memory and/or read only memory devices.
Software elements may be located in the working memory 1814 including, but not limited to, an operating system 1816, one or more application programs 1818, drivers, and/or other data and code. Instructions for performing the above-described methods and steps may be included in one or more application programs 1818, and the above-described components of apparatus 100A may be implemented by processor 1804 reading and executing the instructions of one or more application programs 1818. More specifically, editor 110 may be implemented, for example, by processor 1804 when executing application 1818 with instructions to perform steps S110 and S120. The data panel 120 may be implemented, for example, by the processor 1804 when executing the application 1818 with instructions to perform step S130. Spreadsheet generation module 130 may be implemented, for example, by processor 1804 when executing application 1818 with instructions to perform step S140. Executable or source code for the instructions of the software elements may be stored in a non-transitory computer-readable storage medium, such as storage device(s) 1810 described above, and may be read into working memory 1814, possibly compiled and/or installed. Executable code or source code for the instructions of the software elements may also be downloaded from a remote location.
The present disclosure also relates to the following embodiments.
Embodiment 1, a computer-implemented method for automatically generating a spreadsheet, the method comprising:
obtaining a hierarchy for the spreadsheet, wherein the hierarchy comprises one or more levels having a plurality of nodes, wherein each level has at least one node and has a corresponding level type, each node corresponding to one or more cells in the spreadsheet, wherein the hierarchy further comprises membership between the plurality of nodes;
obtaining metadata for each of the plurality of nodes;
obtaining raw data for the spreadsheet; and
generating the spreadsheet based at least on the hierarchy for the spreadsheet, the metadata, and the raw data.
Embodiment 2, the method of embodiment 1, further comprising:
for each node, the hierarchy type of the hierarchy in which the node is located, the child nodes of the node, and metadata of the node are stored.
Embodiment 3 the method of embodiment 1, wherein obtaining a hierarchical structure for the spreadsheet comprises:
providing a graphical user interface editor, wherein the graphical user interface editor comprises a component for specifying nodes of different hierarchies;
receiving input for a component specifying nodes of different hierarchies; and
generating the hierarchy based on the input.
Embodiment 4 the method of embodiment 3, wherein the hierarchy type of the one or more levels of the spreadsheet comprises one or more of: workbooks, pages, sections, tables, blocks, rows, columns, ranges, and cells, where components used to specify nodes at different levels include one or more of the following: a component for specifying a page, a component for specifying a title, a component for specifying a section, a component for specifying a table, a component for specifying a data header, a component for specifying a table body, a component for specifying a row, a component for specifying a column, a component for specifying a block, a component for specifying a section, and a component for specifying a cell.
Embodiment 5 the method of embodiment 1, wherein obtaining a hierarchical structure for the spreadsheet comprises:
receiving a text code input by a user; and
parsing the text code to generate the hierarchical structure.
Embodiment 6 the method of embodiment 1, wherein obtaining metadata for each of the plurality of nodes comprises obtaining semantic information describing a particular meaning of the node.
Embodiment 7 the method of embodiment 6, wherein the semantic information includes one or more of a title, a name, a label, and an annotation.
Embodiment 8, the method of embodiment 1, wherein:
obtaining metadata for each of the plurality of nodes further includes obtaining information specifying a format of one or more first cells corresponding to the node, and
generating the spreadsheet further comprises formatting the one or more first cells in the spreadsheet according to the information for specifying the format of the one or more first cells.
Example 9 the process according to example 8,
wherein the information for specifying the format of the one or more first cells corresponding to the node includes a format type, and
wherein the format of the one or more first cells is set with a format corresponding to the format type.
Embodiment 10 the method of embodiment 3, wherein the graphical user interface editor further comprises a modifier component for specifying a format type of one or more cells corresponding to a node in the hierarchy.
Embodiment 11, the method of embodiment 9, wherein the format corresponding to the format type is set by:
displaying predefined text;
receiving the setting of a user on the format of a predefined text; and
setting a format corresponding to the format type based on a user setting of a format of the predefined text.
Embodiment 12, the method of embodiment 1, wherein:
obtaining metadata for each of the plurality of nodes further comprises obtaining an alias tag or attribute tag for the node, wherein the alias tag specifies an alias for one or more cells corresponding to the node and the attribute tag specifies additional characteristics of the one or more cells corresponding to the node.
Embodiment 13, the method of embodiment 1, further comprising:
obtaining a dependency relationship between a first node and one or more other nodes of the plurality of nodes.
Embodiment 14, the method of embodiment 13, further comprising:
obtaining a dependency between a node corresponding to each of one or more first cells corresponding to the first node and a node corresponding to each of one or more second cells corresponding to the further one or more nodes based at least on the dependency between the first node and the further one or more nodes.
Embodiment 15, the method of embodiment 14, further comprising:
acquiring a calculation relation between the first node and one or more other nodes;
determining a calculated relationship between each of one or more first cells corresponding to the first node and each of one or more second cells corresponding to the additional one or more nodes based at least on the calculated relationship between the first node and the additional one or more nodes.
Embodiment 16 the method of embodiment 15, wherein generating the spreadsheet further comprises:
generating a spreadsheet formula for each of the one or more first cells based at least on the calculated relationship between each of the one or more first cells and each of the one or more second cells.
Embodiment 17, the method of embodiment 14, further comprising:
for a node corresponding to each of the one or more first cells corresponding to the first node, determining that the node depends on a first set of second nodes corresponding to respective first sets of second cells of the one or more second cells based on a dependency between the node and the node corresponding to each of the one or more second cells corresponding to the other one or more nodes; and
the following dependencies are established: the node and all or part of the ancestor nodes of the node are dependent on the first set of second nodes and all or part of the ancestor nodes of the first set of second nodes.
Embodiment 18, the method of embodiment 17, further comprising storing, for each node, at least one of the node on which the node depends and the node on which the node depends.
Embodiment 19 the method of embodiment 15, further comprising storing, for each node, the computed relationship between the node and other nodes.
Embodiment 20, the method of embodiment 1, wherein the raw data for the spreadsheet is obtained by one or more of:
is automatically identified from the data file or files,
the information is imported from a database and is transmitted to the user,
retrieved from an external data source, an
Input by a user.
Embodiment 21, the method of embodiment 1, further comprising:
detecting a node of said plurality of nodes requiring input of raw data and a requirement for raw data in said node, and
and matching the acquired raw data with the detected nodes needing to input the raw data.
Embodiment 22 the method of embodiment 21, wherein generating the spreadsheet further comprises:
generating a spreadsheet to be populated based on the spreadsheet's hierarchy, the metadata, the detected nodes that need to input raw data, and the requirements for raw data in the nodes; and
populating the spreadsheet to be populated based on the raw data to generate the spreadsheet.
Embodiment 23, the method of embodiment 22, wherein:
the raw data for the spreadsheet is automatically identified from the data file, and the method further comprises parsing semantic information for each raw data item in the raw data identified from the data file to generate parsed data; and
when a data item of one of the data file, the data parsed by the intelligent data extraction component, and the data populated in the data table to be populated is selected, a corresponding data item of another two of the data file, the parsed data, and the data populated in the data table to be populated is highlighted.
Embodiment 24, the method of embodiment 15, wherein generating the spreadsheet comprises:
for each node of the plurality of nodes:
determining, based on the hierarchy, a location of one or more cells in the spreadsheet that correspond to the node; and
populating contents of one or more cells corresponding to the node based on one or more of the raw data, the hierarchy type of the node, metadata of the node, the node on which the node depends, and a computational relationship of the node.
Embodiment 25, the method of embodiment 1, further comprising:
receiving an operation specifying a location of a table in the spreadsheet;
wherein generating the spreadsheet comprises adjusting a position of the table in the spreadsheet based on the operation.
Embodiment 26 the method of embodiment 1, wherein generating the spreadsheet further comprises automatically formatting the one or more cells corresponding to each node of the plurality of nodes according to one or more of a hierarchy type of a hierarchy in which the node is located, format information of the node, and contents of the one or more cells corresponding to the node.
Embodiment 27, the method of embodiment 15, further comprising:
displaying the generated electronic form;
receiving a modification to the hierarchy, the metadata, the raw data, the dependencies, or the computational relationships; and
updating the displayed spreadsheet based on the modification to the hierarchical structure, the metadata, the raw data, the dependencies, or the calculated relationships.
Embodiment 28 the method of embodiment 15, further comprising:
displaying the generated electronic form;
receiving a modification to the displayed spreadsheet; and
converting the modification to the spreadsheet to a modification to at least one of the hierarchy, the metadata, the raw data, the dependencies, or the calculated relationships and modifying at least one of the hierarchy, the metadata, the raw data, the dependencies, or the calculated relationships accordingly based on the modification.
Example 29 the method of example 27,
wherein a hierarchy for the spreadsheet is obtained through a graphical user interface editor, and the graphical user interface editor comprises a component for specifying nodes of different hierarchies;
wherein the modification to the hierarchy comprises a drag on a component used to specify a third node in the hierarchy; and
wherein updating the displayed spreadsheet comprises adjusting the relative position of one or more cells corresponding to the third node in the spreadsheet to coincide with the relative position of the dragged component for specifying the third node in the graphical user interface editor.
Embodiment 30 the method of embodiment 15, further comprising:
automatically detecting an error present in one or more of the hierarchy, the metadata, the raw data, the dependencies, and the computational relationships; and
a warning is issued to alert of the error.
Embodiment 31, the method of embodiment 15, further comprising:
predicting one or more of the hierarchy, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user to be acquired based on one or more of the hierarchy, the metadata, the raw data, the dependency, the computational relationships, and operations to be performed by a user that have been acquired; and
providing intelligent suggestion results for one or more of the hierarchy to be obtained, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user.
Embodiment 32 the method of embodiment 3, wherein different types of syntax elements in a component for specifying nodes at different levels are represented in different display formats.
Embodiment 33, the method of embodiment 17, further comprising:
visualizing at least a portion of the plurality of nodes in the hierarchy and dependencies between the portion of nodes and other nodes of the plurality of nodes.
Embodiment 34 the method of embodiment 1, wherein obtaining a hierarchy for the spreadsheet further comprises:
importing a template for one or more nodes in the hierarchy.
Embodiment 35, an apparatus for automatically generating a spreadsheet, the apparatus comprising:
an editor configured to obtain a hierarchy for the spreadsheet, wherein the hierarchy comprises one or more levels having a plurality of nodes, wherein each level has at least one node and has a corresponding level type, each node corresponding to one or more cells in the spreadsheet, wherein the hierarchy further comprises membership between the plurality of nodes, and the editor is further configured to obtain metadata for each node of the plurality of nodes;
a data panel configured to obtain raw data for the spreadsheet;
a spreadsheet generation module configured to generate the spreadsheet based at least on a hierarchy for the spreadsheet, the metadata, and the raw data.
Embodiment 36 the apparatus of embodiment 35, further comprising a hierarchy map builder and a hierarchy map memory, wherein the hierarchy map builder is configured to build a hierarchy map for the spreadsheet based on a hierarchy type of a hierarchy in which each of the plurality of nodes is located, child nodes of the node, and metadata of the node, and the hierarchy map memory is configured to store the hierarchy map.
Embodiment 37 the apparatus of embodiment 35, wherein the editor comprises a graphical user interface editor, wherein the graphical user interface editor comprises a component to specify different levels of nodes, and wherein the graphical user interface editor is further configured to:
receiving input for a component specifying nodes of different hierarchies; and
generating the hierarchy based on the input.
Embodiment 38 the apparatus of embodiment 37, wherein the hierarchy type of the one or more levels of the spreadsheet comprises one or more of: workbooks, pages, sections, tables, blocks, rows, columns, ranges, and cells, where components used to specify nodes at different levels include one or more of the following: a component for specifying a page, a component for specifying a title, a component for specifying a section, a component for specifying a table, a component for specifying a data header, a component for specifying a table body, a component for specifying a row, a component for specifying a column, a component for specifying a block, a component for specifying a section, and a component for specifying a cell.
Embodiment 39 the apparatus of embodiment 35, wherein the editor comprises a text editor configured to:
receiving a text code input by a user; and
parsing the text code to generate the hierarchical structure.
Embodiment 40 the apparatus of embodiment 35, wherein obtaining metadata for each node of the plurality of nodes comprises obtaining semantic information describing a particular meaning of the node.
Embodiment 41 the apparatus of embodiment 40, wherein the semantic information comprises one or more of a title, a name, a label, and an annotation.
Embodiment 42, the apparatus of embodiment 35, wherein:
the editor further includes a modifier component configured to obtain information specifying a format of one or more first cells corresponding to each of the plurality of nodes, and
wherein the spreadsheet generation module comprises a renderer configured to set a format of the one or more first cells in the spreadsheet according to the information for specifying the format of the one or more first cells.
Example 43 the apparatus of example 42,
wherein the information for specifying the format of the one or more first cells includes a format type, and
wherein the renderer is configured to format the one or more first cells with a format corresponding to the format type.
Embodiment 44 the apparatus of embodiment 37, wherein the graphical user interface editor further comprises a modifier component to specify a format type of one or more cells corresponding to a node in the hierarchy.
Embodiment 45, the apparatus of embodiment 43, further comprising a format setting component configured to set a format corresponding to the format type by:
displaying predefined text;
receiving the setting of a user on the format of a predefined text; and
and setting a format corresponding to the format type based on the setting of the format of the predefined text by the user.
Embodiment 46, the apparatus of embodiment 35, wherein:
the editor further includes a tag component configured to obtain an alias tag or attribute tag for each node, wherein the alias tag specifies an alias of one or more cells corresponding to the node and the attribute tag specifies additional characteristics of the one or more cells corresponding to the node.
Embodiment 47, the apparatus of embodiment 35, wherein:
the editor further includes a dependency definition component configured to obtain a dependency between a first node of the plurality of nodes and another one or more nodes.
Embodiment 48, the apparatus of embodiment 47, wherein the hierarchical graph builder is configured to:
obtaining a dependency between a node corresponding to each of one or more first cells corresponding to the first node and a node corresponding to each of one or more second cells corresponding to the further one or more nodes based at least on the dependency between the first node and the further one or more nodes.
Embodiment 49 the apparatus of embodiment 48, further comprising a calculate relationship definition component,
wherein the computational relationship definition component is configured to obtain a computational relationship between the first node and another one or more nodes; and is
Wherein the hierarchical graph builder is further configured to determine a calculated relationship between each of one or more first cells corresponding to the first node and each of one or more second cells corresponding to the additional one or more nodes based at least on the calculated relationship between the first node and the additional one or more nodes.
Embodiment 50 the apparatus of embodiment 49, wherein the spreadsheet generation module further comprises a translator configured to:
generating a spreadsheet formula for each of the one or more first cells based at least on the calculated relationship between each of the one or more first cells and each of the one or more second cells.
Embodiment 51 the apparatus of embodiment 48, wherein the hierarchical graph builder is further configured to:
for a node corresponding to each of the one or more first cells corresponding to the first node, determining that the node depends on a first set of second nodes corresponding to respective first sets of second cells of the one or more second cells based on a dependency between the node and the node corresponding to each of the one or more second cells corresponding to the other one or more nodes; and
the following dependencies are established: the node and all or part of the ancestor nodes of the node are dependent on the first set of second nodes and all or part of the ancestor nodes of the first set of second nodes.
Embodiment 52 the apparatus of embodiment 51, wherein constructing the hierarchical graph is further based on nodes on which each of the plurality of nodes depends.
Embodiment 53 the apparatus of embodiment 49, wherein constructing the hierarchical graph is further based on computational relationships between each node of the plurality of nodes and other nodes.
Embodiment 54 the apparatus of embodiment 35, wherein the data panel comprises a raw data acquisition component comprising one or more of the following:
the system includes an intelligent data extraction component configured to automatically identify raw data from a data file, a database interface component configured to import raw data from a database, a retrieval interface component configured to retrieve raw data from an external data source, and a manual input reception component configured to receive user-entered raw data. Example 55 the apparatus of example 54,
wherein the data panel further comprises:
a data to be filled detection component configured to detect a node of the plurality of nodes that requires input of raw data and a requirement for the raw data in the node; and
a data matching component configured to match the raw data acquired by the raw data acquisition component with the node requiring input of raw data detected by the to-be-populated data detection component.
Example 56 the apparatus of example 55,
wherein the spreadsheet generation module comprises:
a translator configured to generate a spreadsheet to be populated based on a hierarchy of the spreadsheet, the metadata, the detected nodes requiring input of raw data, and requirements for raw data in the nodes, and populate the spreadsheet to be populated based on the raw data to generate the spreadsheet.
Embodiment 57, the apparatus of embodiment 56, wherein:
the raw data acquisition component comprises the intelligent data extraction component and the intelligent data extraction component is configured to parse semantic information for each raw data item in raw data identified from a data file to generate parsed data; and
when a data item of one of the data file, the data parsed by the intelligent data extraction component, and the data populated in the data table to be populated is selected, a corresponding data item of the other two of the data file, the data parsed by the intelligent data extraction component, and the data populated in the data table to be populated is highlighted.
Embodiment 58 the apparatus of embodiment 49, wherein the spreadsheet generation module comprises a translator configured to:
for each node of the plurality of nodes:
determining, based on the hierarchy, a location of one or more cells in the spreadsheet that correspond to the node; and
populating contents of one or more cells corresponding to the node based on one or more of the raw data, the hierarchy type of the node, metadata of the node, the node on which the node depends, and a computational relationship of the node.
Example 59 the apparatus of example 35,
wherein the editor is further configured to receive an operation specifying a location of a table in the spreadsheet; and is
Wherein the spreadsheet generation module is further configured to adjust the table's position in the spreadsheet based on the operation.
Embodiment 60 the apparatus of embodiment 35, wherein the spreadsheet generation module comprises a renderer configured to automatically set a format of the one or more cells corresponding to each node of the plurality of nodes according to one or more of a hierarchy type of a hierarchy in which the node is located, format information of the node, and contents of the one or more cells corresponding to the node.
Embodiment 61 the apparatus of embodiment 49, further comprising a spreadsheet preview module configured to:
causing the generated spreadsheet to be displayed;
receiving a modification to the hierarchy, the metadata, the raw data, the dependencies, or the computational relationships; and
updating the displayed spreadsheet based on the modification to the hierarchical structure, the metadata, the raw data, the dependencies, or the calculated relationships.
Embodiment 62 the apparatus of embodiment 49, further comprising a spreadsheet preview module configured to:
causing the generated spreadsheet to be displayed;
receiving a modification to the displayed spreadsheet; and
converting modifications to a spreadsheet to modifications to at least one of the hierarchy, the metadata, the raw data, the dependencies, and the calculated relationships, and modifying at least one of the hierarchy, the metadata, the raw data, the dependencies, and the calculated relationships accordingly based on the modifications with at least one of the editor and the data panel.
Embodiment 63 the apparatus of embodiment 61, further comprising a graphical user interface editor configured to obtain a hierarchy for the spreadsheet and comprising a component to specify nodes of different hierarchies;
wherein the modification to the hierarchy comprises a drag on a component used to specify a third node in the hierarchy; and
wherein updating the displayed spreadsheet comprises adjusting the relative position of one or more cells corresponding to the third node in the spreadsheet to coincide with the relative position of the dragged component for specifying the third node in the graphical user interface editor.
Embodiment 64 the apparatus of embodiment 49, further comprising an error detection module configured to:
automatically detecting an error present in one or more of the hierarchy, the metadata, the raw data, the dependencies, and the computational relationships; and
a warning is issued to alert of the error.
Embodiment 65, the apparatus of embodiment 49, further comprising a smart suggestion module, wherein the smart suggestion module is configured to:
predicting one or more of the hierarchy, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user to be acquired based on one or more of the hierarchy, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user that have been acquired; and
providing intelligent suggestion results for one or more of the hierarchy to be obtained, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user.
Embodiment 66, the apparatus of embodiment 37, wherein different types of syntax elements in the component for specifying different levels of nodes are represented in different display formats.
Embodiment 67 the apparatus of embodiment 51, further comprising a visualization module, wherein the visualization module is configured to:
visualizing at least a portion of the plurality of nodes in the hierarchy and dependencies between the portion of nodes and other nodes of the plurality of nodes.
Embodiment 68 the apparatus of embodiment 35, wherein the editor further comprises a component to import a template configured to:
importing a template for one or more nodes in the hierarchy.
Embodiment 69, an apparatus for automatically generating a spreadsheet, comprising: means for performing the steps of the method of any one of embodiments 1-34.
Embodiment 70, an apparatus for automatically generating a spreadsheet, comprising:
at least one processor; and
at least one storage device storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of any of embodiments 1-34.
Embodiment 71, a non-transitory computer readable storage medium storing instructions that when executed by a processor cause performance of the method of any of embodiments 1-34.
From the above embodiments, it is apparent to those skilled in the art that the present disclosure can be implemented by software and necessary hardware, or can be implemented by hardware, firmware, and the like. Based on this understanding, embodiments of the present disclosure may be implemented partially in software. The computer software may be stored in a computer readable storage medium, such as a floppy disk, hard disk, optical disk, or flash memory. The computer software includes a series of instructions that cause a computer (e.g., a personal computer, a service station, or a network terminal) to perform a method or a portion thereof according to various embodiments of the disclosure.
Having thus described the disclosure, it will be apparent that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the disclosure, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.

Claims (67)

1.A computer-implemented method for automatically generating a spreadsheet, the method comprising:
prior to generating the spreadsheet, obtaining, with an editor, a hierarchy for the spreadsheet, wherein the hierarchy comprises one or more levels having a plurality of nodes, wherein each level has at least one node and has a corresponding level type, each node corresponding to one or more cells in the spreadsheet, wherein the hierarchy further comprises membership between the plurality of nodes;
obtaining metadata for each of the plurality of nodes with an editor;
acquiring a calculation relation between a first node and one or more other nodes in the plurality of nodes by using an editor;
determining a calculated relationship between each of one or more first cells corresponding to the first node and each of one or more second cells corresponding to the additional one or more nodes based at least on the calculated relationship between the first node and the additional one or more nodes;
generating a spreadsheet formula for each of the one or more first cells based at least on the calculated relationship between each of the one or more first cells and each of the one or more second cells;
prior to generating the spreadsheet, obtaining raw data for the spreadsheet using a different data panel than an editor; and
generating the spreadsheet based at least on the hierarchy for the spreadsheet, the metadata, the spreadsheet formula, and the raw data.
2. The method of claim 1, further comprising:
for each node, the hierarchy type of the hierarchy in which the node is located, the child nodes of the node, and metadata of the node are stored.
3. The method of claim 1, wherein obtaining a hierarchy for the spreadsheet comprises:
providing a graphical user interface editor, wherein the graphical user interface editor comprises a component for specifying nodes of different hierarchies;
receiving input for a component specifying nodes of different hierarchies; and
generating the hierarchy based on the input.
4. The method of claim 3, wherein a hierarchy type of the one or more hierarchies of the spreadsheet comprises one or more of: workbooks, pages, sections, tables, blocks, rows, columns, ranges, and cells, where components used to specify nodes at different levels include one or more of the following: a component for specifying a page, a component for specifying a title, a component for specifying a section, a component for specifying a table, a component for specifying a data header, a component for specifying a table body, a component for specifying a row, a component for specifying a column, a component for specifying a block, a component for specifying a section, and a component for specifying a cell.
5. The method of claim 1, wherein obtaining a hierarchy for the spreadsheet comprises:
receiving a text code input by a user; and
parsing the text code to generate the hierarchical structure.
6. The method of claim 1, wherein obtaining metadata for each of the plurality of nodes comprises obtaining semantic information describing a particular meaning of the node.
7. The method of claim 6, wherein the semantic information includes one or more of a title, a name, a label, and an annotation.
8. The method of claim 1, wherein:
obtaining metadata for each of the plurality of nodes further includes obtaining information specifying a format of one or more first cells corresponding to the node, and
generating the spreadsheet further comprises formatting the one or more first cells in the spreadsheet according to the information for specifying the format of the one or more first cells.
9. The method of claim 8, wherein the first and second light sources are selected from the group consisting of,
wherein the information for specifying the format of the one or more first cells corresponding to the node includes a format type, and
wherein the format of the one or more first cells is set with a format corresponding to the format type.
10. The method of claim 3, wherein the graphical user interface editor further comprises a modifier component for specifying a format type of one or more cells corresponding to a node in the hierarchy.
11. The method of claim 9, wherein the format corresponding to the format type is set by:
displaying predefined text;
receiving the setting of a user on the format of a predefined text; and
setting a format corresponding to the format type based on a user setting of a format of the predefined text.
12. The method of claim 1, wherein:
obtaining metadata for each of the plurality of nodes further comprises obtaining an alias tag or attribute tag for the node, wherein the alias tag specifies an alias for one or more cells corresponding to the node and the attribute tag specifies additional characteristics of the one or more cells corresponding to the node.
13. The method of claim 1, further comprising:
and acquiring the dependency relationship between the first node and one or more other nodes.
14. The method of claim 13, further comprising:
obtaining a dependency between a node corresponding to each of one or more first cells corresponding to the first node and a node corresponding to each of one or more second cells corresponding to the further one or more nodes based at least on the dependency between the first node and the further one or more nodes.
15. The method of claim 14, further comprising:
for a node corresponding to each of the one or more first cells corresponding to the first node, determining that the node depends on a first set of second nodes corresponding to respective first sets of second cells of the one or more second cells based on a dependency between the node and the node corresponding to each of the one or more second cells corresponding to the other one or more nodes; and
the following dependencies are established: the node and all or part of the ancestor nodes of the node are dependent on the first set of second nodes and all or part of the ancestor nodes of the first set of second nodes.
16. The method of claim 15, further comprising storing, for each node, at least one of the node on which the node depends and the node on which the node depends.
17. The method of claim 1, further comprising storing, for each node, a computational relationship between the node and other nodes.
18. The method of claim 1, wherein the raw data for the spreadsheet is obtained by one or more of:
is automatically identified from the data file or files,
the information is imported from a database and is transmitted to the user,
retrieved from an external data source, an
Input by a user.
19. The method of claim 1, further comprising:
detecting a node of said plurality of nodes requiring input of raw data and a requirement for raw data in said node, and
and matching the acquired raw data with the detected nodes needing to input the raw data.
20. The method of claim 19, wherein generating the spreadsheet further comprises:
generating a data table to be populated based on the hierarchy of the spreadsheet, the metadata, the detected nodes requiring input of raw data, and requirements for raw data in the nodes; and
populating the data form to be populated based on the raw data to generate the spreadsheet.
21. The method of claim 20, wherein:
the raw data for the spreadsheet is automatically identified from the data file, and the method further comprises parsing semantic information for each raw data item in the raw data identified from the data file to generate parsed data; and
when a data item of one of the data file, the parsed data, and the data populated in the data table to be populated is selected, a corresponding data item of another two of the data file, the parsed data, and the data populated in the data table to be populated is highlighted.
22. The method of claim 15, wherein generating the spreadsheet comprises:
for each node of the plurality of nodes:
determining, based on the hierarchy, a location of one or more cells in the spreadsheet that correspond to the node; and
populating contents of one or more cells corresponding to the node based on one or more of the raw data, the hierarchy type of the node, metadata of the node, the node on which the node depends, and a computational relationship of the node.
23. The method of claim 1, further comprising:
receiving an operation specifying a location of a table in the spreadsheet;
wherein generating the spreadsheet comprises adjusting a position of the table in the spreadsheet based on the operation.
24. The method of claim 1, wherein generating the spreadsheet further comprises automatically formatting the one or more cells corresponding to each node of the plurality of nodes according to one or more of a hierarchy type of a hierarchy in which the node is located, format information of the node, and contents of the one or more cells corresponding to the node.
25. The method of claim 15, further comprising:
displaying the generated electronic form;
receiving a modification to the hierarchy, the metadata, the raw data, the dependencies, or the computational relationships; and
updating the displayed spreadsheet based on the modification to the hierarchical structure, the metadata, the raw data, the dependencies, or the calculated relationships.
26. The method of claim 15, further comprising:
displaying the generated electronic form;
receiving a modification to the displayed spreadsheet; and
converting the modification to the spreadsheet to a modification to at least one of the hierarchy, the metadata, the raw data, the dependencies, or the calculated relationships and modifying at least one of the hierarchy, the metadata, the raw data, the dependencies, or the calculated relationships accordingly based on the modification.
27. The method of claim 25, wherein the first and second portions are selected from the group consisting of,
wherein a hierarchy for the spreadsheet is obtained through a graphical user interface editor, and the graphical user interface editor comprises a component for specifying nodes of different hierarchies;
wherein the modification to the hierarchy comprises a drag on a component used to specify a third node in the hierarchy; and
wherein updating the displayed spreadsheet comprises adjusting the relative position of one or more cells corresponding to the third node in the spreadsheet to coincide with the relative position of the dragged component for specifying the third node in the graphical user interface editor.
28. The method of claim 15, further comprising:
automatically detecting an error present in one or more of the hierarchy, the metadata, the raw data, the dependencies, and the computational relationships; and
a warning is issued to alert of the error.
29. The method of claim 15, further comprising:
predicting one or more of the hierarchy, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user to be acquired based on one or more of the hierarchy, the metadata, the raw data, the dependency, the computational relationships, and operations to be performed by a user that have been acquired; and
providing intelligent suggestion results for one or more of the hierarchy to be obtained, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user.
30. The method of claim 3, wherein different types of syntax elements in components used to specify nodes of different hierarchies are represented in different display formats.
31. The method of claim 15, further comprising:
visualizing at least a portion of the plurality of nodes in the hierarchy and dependencies between the portion of nodes and other nodes of the plurality of nodes.
32. The method of claim 1, wherein obtaining a hierarchy for the spreadsheet further comprises:
importing a template for one or more nodes in the hierarchy.
33. An apparatus for automatically generating a spreadsheet, the apparatus comprising:
an editor configured to obtain a hierarchy for the spreadsheet prior to generating the spreadsheet, wherein the hierarchy comprises one or more levels having a plurality of nodes, wherein each level has at least one node and has a corresponding level type, each node corresponding to one or more cells in the spreadsheet, wherein the hierarchy further comprises membership between the plurality of nodes, and the editor is further configured to obtain metadata for each of the plurality of nodes, wherein the editor comprises a computational relationship definition component configured to obtain a computational relationship between a first node and another one or more nodes of the plurality of nodes;
a hierarchical graph builder configured to determine a calculated relationship between each of one or more first cells corresponding to the first node and each of one or more second cells corresponding to a further one or more nodes based at least on the calculated relationship between the first node and the further one or more nodes;
a data panel configured to obtain raw data for the spreadsheet prior to generating the spreadsheet;
a spreadsheet generation module, wherein the spreadsheet generation module comprises a translator configured to generate a spreadsheet formula for each of the one or more first cells based at least on a calculated relationship between each of the one or more first cells and each of the one or more second cells, the spreadsheet generation module configured to generate the spreadsheet based at least on a hierarchy for the spreadsheet, the metadata, the spreadsheet formula, and the raw data.
34. The apparatus of claim 33, further comprising a hierarchy map memory, wherein the hierarchy map builder is further configured to build a hierarchy map for the spreadsheet based on a hierarchy type of a hierarchy in which each node of the plurality of nodes is located, child nodes of the node, and metadata of the node, and the hierarchy map memory is configured to store the hierarchy map.
35. The apparatus of claim 33, wherein the editor comprises a graphical user interface editor, wherein the graphical user interface editor comprises a component to specify nodes of different hierarchies, and wherein the graphical user interface editor is further configured to:
receiving input for a component specifying nodes of different hierarchies; and
generating the hierarchy based on the input.
36. The apparatus of claim 35, wherein a hierarchy type of the one or more hierarchies of the spreadsheet comprises one or more of: workbooks, pages, sections, tables, blocks, rows, columns, ranges, and cells, where components used to specify nodes at different levels include one or more of the following: a component for specifying a page, a component for specifying a title, a component for specifying a section, a component for specifying a table, a component for specifying a data header, a component for specifying a table body, a component for specifying a row, a component for specifying a column, a component for specifying a block, a component for specifying a section, and a component for specifying a cell.
37. The apparatus of claim 33, wherein the editor comprises a text editor configured to:
receiving a text code input by a user; and
parsing the text code to generate the hierarchical structure.
38. The apparatus of claim 33, wherein obtaining metadata for each node of the plurality of nodes comprises obtaining semantic information describing a particular meaning of the node.
39. The apparatus of claim 38, wherein the semantic information comprises one or more of a title, a name, a label, and an annotation.
40. The apparatus of claim 33, wherein:
the editor further includes a modifier component configured to obtain information specifying a format of one or more first cells corresponding to each of the plurality of nodes, and
wherein the spreadsheet generation module comprises a renderer configured to set a format of the one or more first cells in the spreadsheet according to the information for specifying the format of the one or more first cells.
41. The apparatus in accordance with claim 40 wherein the first and second electrodes are,
wherein the information for specifying the format of the one or more first cells includes a format type, and
wherein the renderer is configured to format the one or more first cells with a format corresponding to the format type.
42. The apparatus of claim 35, wherein the graphical user interface editor further comprises a modifier component for specifying a format type of one or more cells corresponding to a node in the hierarchy.
43. The apparatus of claim 41, further comprising a format setting component configured to set a format corresponding to the format type by:
displaying predefined text;
receiving the setting of a user on the format of a predefined text; and
and setting a format corresponding to the format type based on the setting of the format of the predefined text by the user.
44. The apparatus of claim 33, wherein:
the editor further includes a tag component configured to obtain an alias tag or attribute tag for each node, wherein the alias tag specifies an alias of one or more cells corresponding to the node and the attribute tag specifies additional characteristics of the one or more cells corresponding to the node.
45. The apparatus of claim 33, wherein:
the editor further includes a dependency definition component configured to obtain a dependency between the first node and another one or more nodes.
46. The apparatus of claim 45, wherein the hierarchy map builder is configured to:
obtaining a dependency between a node corresponding to each of one or more first cells corresponding to the first node and a node corresponding to each of one or more second cells corresponding to the further one or more nodes based at least on the dependency between the first node and the further one or more nodes.
47. The apparatus of claim 46, wherein the hierarchy map builder is further configured to:
for a node corresponding to each of the one or more first cells corresponding to the first node, determining that the node depends on a first set of second nodes corresponding to respective first sets of second cells of the one or more second cells based on a dependency between the node and the node corresponding to each of the one or more second cells corresponding to the other one or more nodes; and
the following dependencies are established: the node and all or part of the ancestor nodes of the node are dependent on the first set of second nodes and all or part of the ancestor nodes of the first set of second nodes.
48. The apparatus of claim 34, wherein building the hierarchical graph is further based on nodes on which each node of the plurality of nodes depends.
49. The apparatus of claim 34, wherein building the hierarchical graph is further based on a computational relationship between each node of the plurality of nodes and other nodes.
50. The apparatus of claim 33, wherein the data panel comprises a raw data acquisition component comprising one or more of:
an intelligent data extraction component configured to automatically identify raw data from a data file,
a database interface component configured to import raw data from a database,
a retrieval interface component configured to retrieve raw data from an external data source, an
A manual input receiving component configured to receive raw data input by a user.
51. The apparatus in accordance with claim 50 wherein the first and second electrodes are electrically connected,
wherein the data panel further comprises:
a data to be filled detection component configured to detect a node of the plurality of nodes that requires input of raw data and a requirement for the raw data in the node; and
a data matching component configured to match the raw data acquired by the raw data acquisition component with the node requiring input of raw data detected by the to-be-populated data detection component.
52. The apparatus in accordance with claim 51 wherein the first and second electrodes are,
wherein the translator is further configured to generate a data table to be populated based on the hierarchy of the spreadsheet, the metadata, the detected nodes requiring input of raw data, and requirements for raw data in the nodes, and populate the data table to be populated based on the raw data to generate the spreadsheet.
53. The apparatus of claim 52, wherein:
the raw data acquisition component comprises the intelligent data extraction component and the intelligent data extraction component is configured to parse semantic information for each raw data item in raw data identified from a data file to generate parsed data; and
when a data item of one of the data file, the data parsed by the intelligent data extraction component, and the data populated in the data table to be populated is selected, a corresponding data item of the other two of the data file, the data parsed by the intelligent data extraction component, and the data populated in the data table to be populated is highlighted.
54. The apparatus of claim 47, wherein the translator is further configured to:
for each node of the plurality of nodes:
determining, based on the hierarchy, a location of one or more cells in the spreadsheet that correspond to the node; and
populating contents of one or more cells corresponding to the node based on one or more of the raw data, the hierarchy type of the node, metadata of the node, the node on which the node depends, and a computational relationship of the node.
55. The apparatus as set forth in claim 33, wherein,
wherein the editor is further configured to receive an operation specifying a location of a table in the spreadsheet; and is
Wherein the spreadsheet generation module is further configured to adjust the table's position in the spreadsheet based on the operation.
56. The apparatus of claim 33, wherein the spreadsheet generation module comprises a renderer configured to automatically set a format of one or more cells corresponding to each node of the plurality of nodes according to one or more of a hierarchy type of a hierarchy in which the node is located, format information of the node, and contents of one or more cells corresponding to the node.
57. The apparatus of claim 47, further comprising a spreadsheet preview module configured to:
causing the generated spreadsheet to be displayed;
receiving a modification to the hierarchy, the metadata, the raw data, the dependencies, or the computational relationships; and
updating the displayed spreadsheet based on the modification to the hierarchical structure, the metadata, the raw data, the dependencies, or the calculated relationships.
58. The apparatus of claim 47, further comprising a spreadsheet preview module configured to:
causing the generated spreadsheet to be displayed;
receiving a modification to the displayed spreadsheet; and
converting modifications to a spreadsheet to modifications to at least one of the hierarchy, the metadata, the raw data, the dependencies, and the calculated relationships, and modifying at least one of the hierarchy, the metadata, the raw data, the dependencies, and the calculated relationships accordingly based on the modifications with at least one of the editor and the data panel.
59. The apparatus of claim 57, further comprising a graphical user interface editor configured to obtain a hierarchy for the spreadsheet and comprising a component to specify nodes of different hierarchies;
wherein the modification to the hierarchy comprises a drag on a component used to specify a third node in the hierarchy; and
wherein updating the displayed spreadsheet comprises adjusting the relative position of one or more cells corresponding to the third node in the spreadsheet to coincide with the relative position of the dragged component for specifying the third node in the graphical user interface editor.
60. The apparatus of claim 47, further comprising an error detection module configured to:
automatically detecting an error present in one or more of the hierarchy, the metadata, the raw data, the dependencies, and the computational relationships; and
a warning is issued to alert of the error.
61. The apparatus of claim 47, further comprising a smart suggestion module, wherein the smart suggestion module is configured to:
predicting one or more of the hierarchy, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user to be acquired based on one or more of the hierarchy, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user that have been acquired; and
providing intelligent suggestion results for one or more of the hierarchy to be obtained, the metadata, the raw data, the dependencies, the computational relationships, and operations to be performed by a user.
62. The apparatus of claim 35, wherein different types of syntax elements in components for specifying different levels of nodes are represented in different display formats.
63. The apparatus of claim 47, further comprising a visualization module, wherein the visualization module is configured to:
visualizing at least a portion of the plurality of nodes in the hierarchy and dependencies between the portion of nodes and other nodes of the plurality of nodes.
64. The apparatus of claim 33, wherein the editor further comprises a component of an import template configured to:
importing a template for one or more nodes in the hierarchy.
65. An apparatus for automatically generating a spreadsheet, comprising: means for performing the steps of the method of any one of claims 1-32.
66. An apparatus for automatically generating a spreadsheet, comprising:
at least one processor; and
at least one storage device storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of any of claims 1-32.
67. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause performance of the method recited in any one of claims 1-32.
CN201910978565.XA 2019-10-15 2019-10-15 Method, apparatus, device and storage medium for automatically generating electronic form Active CN110738037B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910978565.XA CN110738037B (en) 2019-10-15 2019-10-15 Method, apparatus, device and storage medium for automatically generating electronic form
PCT/CN2020/089642 WO2021073077A1 (en) 2019-10-15 2020-05-11 Method, apparatus and device for automatically generating spreadsheet, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910978565.XA CN110738037B (en) 2019-10-15 2019-10-15 Method, apparatus, device and storage medium for automatically generating electronic form

Publications (2)

Publication Number Publication Date
CN110738037A CN110738037A (en) 2020-01-31
CN110738037B true CN110738037B (en) 2021-02-05

Family

ID=69269010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910978565.XA Active CN110738037B (en) 2019-10-15 2019-10-15 Method, apparatus, device and storage medium for automatically generating electronic form

Country Status (2)

Country Link
CN (1) CN110738037B (en)
WO (1) WO2021073077A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110738037B (en) * 2019-10-15 2021-02-05 深圳逻辑汇科技有限公司 Method, apparatus, device and storage medium for automatically generating electronic form
CN113268964B (en) * 2020-07-23 2022-01-18 腾讯科技(深圳)有限公司 Table editing method, device, equipment and storage medium
CN111709220B (en) * 2020-08-18 2020-11-13 广东电网有限责任公司东莞供电局 Distribution network power supply switching operation system and method
CN112528613A (en) * 2020-12-21 2021-03-19 金蝶软件(中国)有限公司 Data table generation method and related equipment thereof
CN112765947A (en) * 2021-01-22 2021-05-07 平安资产管理有限责任公司 Table rendering display method and device, computer equipment and storage medium
CN113657274B (en) * 2021-08-17 2022-09-20 北京百度网讯科技有限公司 Table generation method and device, electronic equipment and storage medium
CN114371894B (en) * 2021-12-08 2023-11-17 贵州开放大学(贵州职业技术学院) Method for managing metadata
CN114547314B (en) * 2022-04-25 2022-07-05 北京安华金和科技有限公司 Data classification and classification method and system based on master-slave table
CN116029264A (en) * 2023-02-01 2023-04-28 上海谐振半导体科技有限公司 ATE test data conversion method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1755668A (en) * 2004-09-30 2006-04-05 微软公司 Design of spreadsheet functions for working with tables of data
CN101258486A (en) * 2005-09-09 2008-09-03 微软公司 User interface for creating a spreadsheet data summary table
CN101263453A (en) * 2005-09-09 2008-09-10 微软公司 Filtering user interface for a data summary table
CN101278279A (en) * 2005-09-09 2008-10-01 微软公司 Automated placement of fields in a data summary table
CN101561799A (en) * 2008-04-18 2009-10-21 知惠创出株式会社 Electronic forms preparing and managing system, electronic forms preparing and managing program, and program storing memory media
CN105573610A (en) * 2014-10-14 2016-05-11 珠海金山办公软件有限公司 Spreadsheet operation methods and apparatuses
CN107111639A (en) * 2014-12-18 2017-08-29 起元技术有限责任公司 Build form
CN110287473A (en) * 2019-06-28 2019-09-27 北京字节跳动网络技术有限公司 Electrical form edit methods and device

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7415481B2 (en) * 2004-09-30 2008-08-19 Microsoft Corporation Method and implementation for referencing of dynamic data within spreadsheet formulas
US7984371B2 (en) * 2005-02-18 2011-07-19 Andrew Joseph Zdenek Method and system for the graphical modeling of data and calculations of a spreadsheet
US8577704B2 (en) * 2007-12-10 2013-11-05 Modelsheet Software, Llc Automatically generating formulas based on parameters of a model
US8326892B2 (en) * 2008-05-30 2012-12-04 Schneider Electric USA, Inc. Methods and systems for automatic conversion of a utility monitoring system layout into a storage format
IT1393542B1 (en) * 2009-03-30 2012-04-27 Milano Politecnico PHOTO-DETECTOR AND METHOD FOR REVEALING OPTICAL RADIATION
CN101706716B (en) * 2009-09-08 2013-04-03 南京师范大学 VO-based form customization, configuration and parsing operation method
CN101794280B (en) * 2010-03-11 2011-07-27 北京中科辅龙计算机技术股份有限公司 Form automatic generation method and system based on form template set
CN103257959A (en) * 2012-02-15 2013-08-21 深圳市金蝶友商电子商务服务有限公司 Method and device for generating spreadsheet report
US20140082470A1 (en) * 2012-09-19 2014-03-20 4Clicks Solutions, LLC Spreadtree hierarchy system for spreadsheets and related methods
CN103559292A (en) * 2013-11-07 2014-02-05 大连东方之星信息技术有限公司 Method for dynamically establishing and displaying multiple levels of forms in customized mode
CN103605747B (en) * 2013-11-20 2017-10-27 北京国双科技有限公司 The treating method and apparatus of file form
WO2015113301A1 (en) * 2014-01-30 2015-08-06 Microsoft Technology Licensing, Llc Automatic insights for spreadsheets
US9785637B2 (en) * 2014-03-18 2017-10-10 Google Inc. System and method for computing, applying, and displaying document deltas
CN106776509A (en) * 2016-11-16 2017-05-31 武汉飞博科技有限公司 A kind of electronic spreadsheet generation method and device
CN108595397A (en) * 2018-04-09 2018-09-28 重庆塞尔特科技有限公司 A method of automatically generating report
CN109800401A (en) * 2018-12-25 2019-05-24 北京数知科技股份有限公司 Information report automatic generation method and device
CN109766381A (en) * 2018-12-29 2019-05-17 福建华闽通达信息技术有限公司 A kind of method that assessment of project data are quoted automatically
CN110032373B (en) * 2019-04-12 2022-05-06 国网山东省电力公司淄博供电公司 Object-oriented table function universal implementation method
CN110738037B (en) * 2019-10-15 2021-02-05 深圳逻辑汇科技有限公司 Method, apparatus, device and storage medium for automatically generating electronic form

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1755668A (en) * 2004-09-30 2006-04-05 微软公司 Design of spreadsheet functions for working with tables of data
CN101258486A (en) * 2005-09-09 2008-09-03 微软公司 User interface for creating a spreadsheet data summary table
CN101263453A (en) * 2005-09-09 2008-09-10 微软公司 Filtering user interface for a data summary table
CN101278279A (en) * 2005-09-09 2008-10-01 微软公司 Automated placement of fields in a data summary table
CN101561799A (en) * 2008-04-18 2009-10-21 知惠创出株式会社 Electronic forms preparing and managing system, electronic forms preparing and managing program, and program storing memory media
CN105573610A (en) * 2014-10-14 2016-05-11 珠海金山办公软件有限公司 Spreadsheet operation methods and apparatuses
CN107111639A (en) * 2014-12-18 2017-08-29 起元技术有限责任公司 Build form
CN110287473A (en) * 2019-06-28 2019-09-27 北京字节跳动网络技术有限公司 Electrical form edit methods and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于J2EE整合BIRT技术的可定制动态报表研究;董付春;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180615(第06期);I138-818 *
表格模板可视化技术研究;石念峰 等;《计算机工程》;20080120(第02期);255-257+260 *

Also Published As

Publication number Publication date
WO2021073077A1 (en) 2021-04-22
CN110738037A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN110738037B (en) Method, apparatus, device and storage medium for automatically generating electronic form
US7673235B2 (en) Method and apparatus for utilizing an object model to manage document parts for use in an electronic document
US9262384B2 (en) Markup language system, method, and computer program product
US7421648B1 (en) Reusable data markup language
US7512875B2 (en) Chart view for reusable data markup language
Edhlund Nvivo 9 essentials
US8065267B2 (en) Information processing device, file data merging method, file naming method, and file data output method
CN100447779C (en) Document information processing apparatus, document information processing method, and document information processing program
CN106599039B (en) Statistical representation method supporting free combination nesting of relational database data
US9922383B2 (en) Patent claims analysis system and method
US20080028340A1 (en) Tree view for reusable data markup language
US20070061703A1 (en) Method and apparatus for annotating a document
US20060288284A1 (en) System and method for visualizing contextual-numerical data of source documents as corresponding transformed documents
CN110728124B (en) Method, apparatus, device and storage medium for visualizing electronic forms
CN110738027B (en) Computer-implemented method, apparatus, and storage medium for generating spreadsheet formulas
US8601367B1 (en) Systems and methods for generating filing documents in a visual presentation context with XBRL barcode authentication
CN113590102B (en) Zero-code rapid software development method, system, medium and equipment
CN116468010A (en) Report generation method, device, terminal and storage medium
CN113407678B (en) Knowledge graph construction method, device and equipment
US20100138735A1 (en) Document processing device
US20210240334A1 (en) Interactive patent visualization systems and methods
EP1744271A1 (en) Document processing device
CN111427544B (en) Software requirement document generation method and device, storage medium and electronic equipment
US9262383B2 (en) System, method, and computer program product for processing a markup document
JP4923413B2 (en) Information extraction program and method

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