A simple and flexible table data acquisition and output method, medium and system

CN116501742BActive Publication Date: 2026-10-09QINGDAO NOAH INT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310554052.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2026-10-09
Estimated Expiration
2043-05-17

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明提供一种简单灵活的表格数据采集输出方法、介质及系统,能够解决表格设计复杂,数据计算困难,输出报告数据需求不统一的问题

Benefits of technology

本发明抛掉传统开发的复杂臃肿,设计人员和业务人员只需按照原始设计“画”表格即可,倍幅降低了开发成本。且模拟了Excel工具的部分基础功能,降低了用户的学习及使用成本;面对后期不断变化的业务需求,本发明无论是在表格设计还是数据方面都能灵活面对。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116501742B_ABST
    Figure CN116501742B_ABST
Patent Text Reader

Abstract

The application provides a simple and flexible table data acquisition and output method, medium and system, belongs to the technical field of data processing, and comprises the following steps: defining a data calculation rule, and calculating whether the rule is compliant; entering data into a table; filling the data; outputting a report formed by the filled data; designing an initial table by using a table designer; binding business key fields and editing key fields in the initial table; saving the table after the binding of the key fields as a template and storing the template into a database; and the application can solve the problems of complex table design, difficult data calculation and non-uniform output report data requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing technology, and specifically relates to a simple and flexible method, medium, and system for collecting and outputting tabular data. Background Technology

[0002] The increasing informatization of today's society inevitably leads to improved management, organizational restructuring, and changes in workflows. In the field of physical and chemical testing, informatization refers to abandoning the complexity and inflexibility of the traditional process from designing forms to generating reports, simplifying the design and data collection processes, ensuring the real-time nature of data and the accuracy of related calculations, and generating reports tailored to user needs. This informatization change does not place excessive demands on users; it is a simple and user-friendly transformation. Therefore, information technology should be used to boldly upgrade and transform users' organizational structures, job functions, business processes, and work methods.

[0003] Existing data tables suffer from problems such as complex table design, difficult data calculation, and inconsistent data requirements in the output reports throughout the entire process from initial design to final report generation. Summary of the Invention

[0004] In view of this, the present invention provides a simple and flexible method, medium and system for collecting and outputting tabular data, which can solve the problems of complex table design, difficult data calculation and inconsistent data requirements for output reports.

[0005] This invention is implemented as follows: In a first aspect, the present invention provides a simple and flexible method for collecting and outputting tabular data, comprising the following steps: S10: Define custom data calculation rules and calculate whether the rules are compliant; S20: Enter the data into the table; S30: Fill in the data; S40: Output a report generated from the populated data.

[0006] Based on the above technical solution, the simple and flexible tabular data acquisition and output method of the present invention can be further improved as follows: The specific steps for entering the data into the table are as follows: Use the table designer to design the initial table; Bind key business fields and edit key fields in the initial table; Save the table after binding the key fields as a template and store it in the database.

[0007] Furthermore, the specific steps for binding and editing key business fields in the initial table are as follows: Regularize the data in the initial table to generate the first data object; The generated data objects are automatically filled into the corresponding positions in the table according to the bound business key field 'key' and editing key field 'bind', and the table template automatically expands the columns or rows according to the amount of data; Extract data from the populated table, generate a second data object, and store it in a non-relational database.

[0008] Furthermore, the specific steps for defining the custom data calculation rules and determining whether the rules are compliant are as follows: Bind formula properties to the cells that need to be calculated. The formula properties include: edit the key field bind, and locate the specific cell position based on the edit field bind. The calculation rules include summation, average, maximum and minimum values, and median. The dynamic row identifier R# is used to represent the Rth dynamic row.

[0009] The specific steps for generating a report from the filled data are as follows: Before generating a professional report, you need to add a custom report generation attribute to the original table. This attribute only appears on the data that needs to be included in the report. When generating the report, the data that needs to be included in the report is extracted according to the custom report generation attribute and a data object is generated. The data is automatically filled in the corresponding position in the report to generate the final professional report. You can also print the professional report as needed.

[0010] Furthermore, the table designer features include font settings, cell settings, alignment, merging / splitting cells, and inserting and deleting rows / columns.

[0011] The specific steps for defining the custom data rules are as follows: Extract all data fields that need to be entered and data fields that need to be calculated from the table; Label the data field types and set default data; Define the calculation formulas between fields and the target fields for formula output; The annotations are categorized as follows: integer, long integer, floating point, double precision, large number, and date.

[0012] Furthermore, the specific steps for determining whether the calculation rules are compliant are as follows: Implicit data population is performed according to the field types and default data. All defined calculation formulas are executed. Exceptions thrown by the calculation formulas are caught using try{}catch(e){} in JavaScript. If an exception exists, the calculation rule is non-compliant; otherwise, the calculation is compliant.

[0013] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions for executing the above-described simple and flexible tabular data acquisition and output method.

[0014] This invention provides a simple and flexible tabular data acquisition and output system, which includes the aforementioned computer-readable storage medium.

[0015] Compared with existing technologies, the advantages of the simple and flexible tabular data acquisition and output method, medium, and system provided by this invention are: This invention eliminates the complexity and cumbersome nature of traditional development, allowing designers and business personnel to simply "draw" tables according to the original design, significantly reducing development costs. It also simulates some basic functions of Excel, lowering the learning and usage costs for users. Furthermore, this invention can flexibly adapt to constantly changing business needs, both in terms of table design and data processing.

[0016] Secondly, this invention structures tabular data, meaning that tabular data can be stored in a regularized manner, has high reusability, and the extracted data is also regular, greatly simplifying the difficulty of business data collection and extraction.

[0017] Thirdly, this invention can flexibly extract data from tables to generate professional reports, and can also store the data in professional reports separately for reuse. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating the steps of a simple and flexible method for collecting and outputting tabular data; Figure 2 This is a diagram showing the main structural components of data objectification in this invention; Figure 3 Example diagrams are generated for the professional report of this invention; Figure 4 This is an example diagram illustrating the calculation method of the present invention; Figure 5 An example diagram for data objectification. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0022] Firstly, such as Figure 1 The diagram shows a flowchart of a simple and flexible table data collection and output method provided by this invention, including the following steps: S10: Define custom data calculation rules and calculate whether the rules are compliant; The specific steps for defining custom data rules are as follows: Extract all data fields that need to be entered and data fields that need to be calculated from the table; Label the data fields with their data types (labeled as: integer, long integer, floating point, double, large number, date) and set default data; Define the calculation formulas between fields and the target fields for formula output; The specific steps for determining whether the calculation rules are compliant are as follows: Implicit (without actually filling in the interface) data is populated according to the above field types and default data. All defined calculation formulas are executed. JavaScript's try{}catch(e){} is used to catch exceptions thrown by the calculation formulas. If an exception exists, the calculation rule is non-compliant; otherwise, the calculation is compliant.

[0023] S20: Enter the data into the table; S30: Fill in the data; like Figure 4 As shown in Figure 5, data population involves populating dynamic rows / columns and complex rows. Dynamic row data refers to... Figure 5In the data structure, `rowdata` refers to non-dynamic row data, which is equivalent to `keylist`. A complex row is defined as all rows occupied by the largest merged row cell in a given row. The original table, during its initial design, did not know the amount of data or checks required in the process. Therefore, the initial design was generic. During automatic data filling, rows or columns are automatically expanded based on the data quantity to complete the filling. The main idea of ​​data filling is to designate a complex row in the designed table as a dynamic row, and then fill the non-dynamic rows with data according to the keys in the data structure. When filling dynamic rows or columns, this invention first reads the number of dynamic rows or columns in the data structure. If the number of dynamic data is less than the number of rows or columns reserved in the original table, rows or columns are expanded based on the number of dynamic rows or columns. Before filling each row, the style structure of the previous row is copied, and then data is filled into the row. This process is repeated until all dynamic rows are filled.

[0024] S40: Output a report generated from the populated data.

[0025] In the above technical solution, the specific steps for entering data into the table are as follows: Use the table designer to design the initial table; The table designer is an Excel-like tool that uses HTML and jQuery technologies to implement basic functions of a table designer.

[0026] In this embodiment, the table designer is a web-based online editor that does not rely on a client. This designer has some of the basic functions of Excel, including font settings, cell settings, alignment, merging / splitting cells, and inserting and deleting rows / columns. Users can use this designer to complete the initial style design of the original table according to their Excel usage habits.

[0027] In the initial table, bind the business key field and the editing key field; these two keywords always appear as a set. Save the table after binding the key fields as a template and store it in the database.

[0028] Furthermore, in the above technical solution, the specific steps for binding and editing key business fields in the initial table are as follows: Regularize the data in the initial table to generate the first data object; The generated data objects are automatically filled into the corresponding positions in the table according to the bound business key field 'key' and editing key field 'bind', and the table template automatically expands the columns or rows according to the amount of data; Extract data from the populated table, generate a second data object, and store it in a non-relational database.

[0029] Furthermore, in the above technical solution, the specific steps for defining custom data calculation rules and calculating whether the rules are compliant are as follows: Bind formula properties to the cells that need to be calculated. Formula properties include: edit the key field bind, and locate the specific cell position based on the edit field bind; The calculation rules include summation, average, maximum and minimum values, and median. The dynamic row identifier R# is used to represent the Rth dynamic row.

[0030] If a table contains multiple dynamic rows, and some editable key fields (bind) are the same across rows, then a dynamic row identifier is needed to locate which data in which row. Otherwise, if the edit key field bind is not the same between rows in the table, then there is no need to use dynamic row identifiers.

[0031] In summary, by locating the cell using the key editing field `bind` in the properties, the data in the cell is obtained, and the calculation is performed according to the calculation rules in the formula properties to obtain the final calculation result.

[0032] like Figure 2 As shown, this example is a simplified calculation method.

[0033] exist Figure 2 The content in parentheses is the bind value of the key editing field for each cell. For a more intuitive comparison and explanation, the bind value is displayed on the front end.

[0034] (1) Summation rule (when bind values ​​are the same): sum(R#0, bindVal_0, bindVal_1,...). bind_0 represents the first cell with bind=bindVal, bind_1 represents the second cell with bind=bindVal, and so on.

[0035] Example: Sum the cells sum1, sum2, and sum3: sum1:sum(R#0,num1_0,num1_1); sum2:sum(R#0,num2_0,num2_1); sum3:sum(R#0,num3_0,num3_1); R#0 represents the identifier of the first dynamic row.

[0036] (2) Rules for calculating the average (different bind values): average(R#0, bind1, bind2, ...); example: average: average(R#0,sum1,sum2,sum3) The formula calculation in this invention lies in its dynamic nature. When the original table expands to include new rows based on data, the formula attributes of the formula cells in those new rows also change accordingly. That is, the R#0 identifier mentioned above will change, the formula identifier in the second expanded row will become R#1, the third row R#2, and so on. The system uses the R#n identifier to locate the (n-1)th row, and then uses the bind value after R#n to locate the cell in that row, retrieves the data in the cell, performs the formula calculation, and obtains the final result. This avoids repeatedly binding calculation rules to each formula cell, greatly improving office efficiency.

[0037] In the above technical solution, the specific steps for generating a report from the filled data are as follows: Before generating a professional report, you need to add a custom report generation attribute to the original table. This attribute only appears on the data that needs to be included in the report. When generating the report, the data that needs to be included in the report is extracted according to the custom report generation attribute and a data object is generated. The data is automatically filled in the corresponding position in the report to generate the final professional report. You can also print the professional report as needed.

[0038] In this embodiment, the table is saved as an HTML template: After the table design, including data filling and formula calculation, is completed, the table needs to be bordered. At the same time, a save attribute is added to the cells in the table. When the relevant save button is triggered, the present invention will extract the table from the designer according to the added save attribute and finally generate the HTML code of the table.

[0039] Extracting data from the table: When filling in data, the data is filled in according to the business keyword "key" and the editing key field "bind". When extracting data, the data is also extracted according to the above two keywords. The cell is located according to "bind", the data in it is obtained, and it is stored in the database in a structured form. After collection, it is stored in the database for reuse.

[0040] To connect the processed table to the print and preview interface, you also need to set borders for the table. Since the setting process adds a save attribute to the cells in the table, when the preview and print functions are triggered, this invention will extract the table from the designer based on the added save attribute and present it in the preview window, generating a PDF or printing it as needed.

[0041] like Figure 3As shown, this example is a professional report generation example. Since not all table data needs to be generated in the professional report, a report-specific attribute needs to be added to the table for the data that needs to be included in the report before generation. During generation, this invention will search for data with report-specific attributes and fill them into the corresponding positions in the professional report.

[0042] Furthermore, in the above technical solution, the table designer functions include font settings, cell settings, alignment, merging / splitting cells, and inserting and deleting rows / columns.

[0043] Secondly, the present invention provides a computer-readable storage medium storing program instructions for executing the above-described simple and flexible tabular data acquisition and output method.

[0044] Thirdly, the present invention provides a simple and flexible tabular data acquisition and output system, which includes the aforementioned computer-readable storage medium.

[0045] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A simple and flexible method for collecting and outputting tabular data, characterized in that, Includes the following steps: S10: Define custom data calculation rules and calculate whether the rules are compliant; S20: Enter the data into the table; S30: Fill in the data; S40: Generate a report from the populated data and output it; The specific steps for entering the data into the table are as follows: Use the table designer to design the initial table; Bind key business fields and edit key fields in the initial table; Save the table after binding the key fields as a template and store it in the database; The specific steps for filling in the data are as follows: Regularize the data in the initial table to generate the first data object; The generated first data object is automatically filled into the corresponding position in the table according to the bound business key field key and editing key field bind, and the table template automatically expands the columns or rows according to the amount of data; Set a complex row in the completed table as a dynamic row, and fill the non-dynamic rows with data according to the key in the data structure; when filling dynamic rows or columns, first read the number of dynamic rows or columns in the data structure, expand the rows or columns according to the number of dynamic rows or columns, copy the style structure of the previous row before filling each row of data, and then fill the row with data. Repeat this process until all dynamic rows of data are filled. Extract data from the already populated table, generate a second data object, and store it in a non-relational database; The specific steps for defining the custom data calculation rules and determining whether the rules are compliant are as follows: Bind formula properties to the cells that need to be calculated. The formula properties include: edit key field bind, and locate the specific cell position based on the edit field bind. The calculation rules include summation, average, maximum and minimum values, and median. The dynamic row identifier R# is used to represent the Rth dynamic row; The specific steps for generating a report from the filled data are as follows: Before generating a professional report, you need to add a custom report generation attribute to the original table. This attribute only appears on the data that needs to be included in the report. When generating the report, the data that needs to be included in the report is extracted according to the custom report generation attribute and a data object is generated. The data is automatically filled in the corresponding position in the report to generate the final professional report.

2. The simple and flexible tabular data acquisition and output method according to claim 1, characterized in that, The table designer's functions include font settings, cell settings, alignment, merging / splitting cells, and inserting and deleting rows / columns.

3. The simple and flexible tabular data acquisition and output method according to claim 2, characterized in that, The specific steps for the custom data calculation rule are as follows: Extract all data fields that need to be entered and data fields that need to be calculated from the table; Label the field types of the data fields and set default data; Define the calculation formulas between fields and the target fields for formula output; The annotations are categorized as follows: integer, long integer, floating point, double precision, large number, and date.

4. The simple and flexible tabular data acquisition and output method according to claim 3, characterized in that, The specific steps to determine whether the calculation rule is compliant are as follows: Implicit data population is performed according to the field types and default data. All defined calculation formulas are executed. Exception handling statements are used to catch exceptions thrown by the calculation formulas. If an exception exists, the calculation rule is non-compliant; otherwise, the calculation is compliant.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions for executing a simple and flexible tabular data acquisition and output method as described in any one of claims 1-4.

6. A simple and flexible tabular data acquisition and output system, characterized in that, It includes the computer-readable storage medium of claim 5.

Citation Information

Patent Citations

  • System for automatically generating report from industrial data

    CN111538731A