The present invention contemplates a method and system for automatically aggregating tables having a variety of configurations or layouts into a single destination table. Specifically, tables having a variety of categories with multiple divisions within those categories may be combined wherein rows and...http://www.google.com/patents/US5272628?utm_source=gb-gplus-sharePatent US5272628 - Method and system for aggregating tables having dissimilar formats

Method and system for aggregating tables having dissimilar formatsUS 5272628 A

Abstract

The present invention contemplates a method and system for automatically aggregating tables having a variety of configurations or layouts into a single destination table. Specifically, tables having a variety of categories with multiple divisions within those categories may be combined wherein rows and columns are automatically created in a destination table based on the categories and divisions of one or more source tables. In accordance with the teachings of the present invention, a plurality of source tables are selected as input to the system. A template containing categories and divisions for aggregation is then manually generated by a user or automatically generated by the computer system based on the categories and divisions contained within the source tables. Once the template is generated, mapping tables for rows and columns are created wherein each mapping table comprises an array of pairs of values wherein each pair comprises a first value for identifying a source table location and a second value for identifying a template location. The system then generates a single destination table by applying the mapping tables and by performing the desired mathematical function on the values in the source and destination tables (e.g., summing the values in the appropriate locations in the source and destination tables).

Images(5)

Claims(17)

I claim:

1. A method for aggregating tables in a computer system running a program, wherein the program uses tables to store and manipulate data, each table consisting of a grid of intersecting rows and columns, and where each column has a heading called a division and each row has a heading called a category, said method comprising the steps of:

(a) specifying a plurality of source tables for aggregation, each source table having at least one category and division;

(b) generating a destination table template, said destination table template specifying desired categories and divisions of said source tables to be aggregated into a destination table;

(c) creating a category mapping list that maps categories of said source tables to corresponding categories of said destination table template;

(d) creating a division mapping list that maps divisions of said source tables to corresponding divisions of said destination table template; and

(e) applying the category mapping list and the division mapping list to said destination table.

2. The method of claim 1 wherein said destination table template is manually generated by a user.

3. The method of claim 1 wherein said destination table template is automatically generated by the computer system.

4. A computer system for aggregating tables, the computer system running a program, the program using tables to store and manipulate data, each table consisting of a grid of intersecting rows and columns, each column having a heading called a division and each row having a heading called a category, the system comprising:

(a) input means for specifying a plurality of source tables for aggregation, each source table having at least one category and division;

(b) means for generating a destination table template, said destination table template specifying desired categories and divisions of said source tables to be aggregated into a destination table;

(c) means for creating a category mapping list that maps categories of said source tables to corresponding categories of said destination table template;

(d) means for creating a division mapping list that maps divisions of said source tables to corresponding divisions of said destination table template; and

(e) means for applying the category mapping list and the division mapping list to said destination table.

5. A computer system for aggregating tables, each table having an intersecting grid of rows and columns and each table having a format defined by the rows and columns in the table, the system comprising:

(a) a plurality of source tables for storing data, at least one of said source tables having a different format than other source tables;

(b) a destination table template for specifying the rows and columns from said source tables to be aggregated; and

(c) means for aggregating said source tables into a destination table, the destination table having the same format as the destination table template.

6. The system of claim 5 wherein the data stored in cells is numeric data.

7. A method for combining tables in a computer system running a program, wherein the program uses tables to store data, wherein each table contains a grid of intersecting columns and rows, wherein the intersection of each column and row is a cell capable of containing data, said method comprising the steps of:

specifying a plurality of source tables to be combined such that each source table column has a heading called a division and each source table row has a heading called a category and at least one source table has a different format than other source tables; and

generating a destination table, the destination table containing divisions and categories from the source tables in addition to data that is derived from data contained in cells form the source tables.

8. The method of claim 7 wherein the destination table contains the union of the divisions and categories of the source tables.

9. The method of claim 7 wherein the cells of the destination table contain data that are the result of a mathematical operation on the data from the corresponding cells in the source tables.

10. The method of claim 7 wherein the step of generating a destination table includes the additional steps of:

13. The method of claim 10 wherein the step of generating a mapping includes the additional step of creating destination mapping tables that map the relationship of the source table categories to the destination table template categories and the source table divisions to the destination table template divisions.

14. A method for aggregating a plurality of disparate source tables into a destination table in a computer system running a program, wherein the program uses the plurality of disparate source tables to store and manipulate data, wherein each table contains a grid of intersecting columns and rows, wherein each column contains a column label and data, and each row contains a row label and data, the method comprising the steps of:

a) selecting the plurality of source tables, each source table comprising at least one column label and at least one row label;

b) determining which column and row labels from the plurality of source tables will be represented within the destination table; and

c) for each source table,

creating a column mapping list, the mapping list containing a list of paired entries (sc,dc), each sc representing a source table column label and each dc representing a destination table column label such that the data in the represented source table column will be stored in the represented destination table column,

creating a row mapping list, the row mapping list containing a list of paired entries (sr,dr), each sr representing a source table row label and each dr representing a destination table row label such that the data in the represented source table row will be stored in the represented destination table row, and

adding data from the source table to the destination table in accordance with the column and row mapping lists, the column and row mapping lists supplying the correct destination column dc and destination row dr for storing data contained within a source table column sc and source table row sr.

15. The method of claim 14 wherein the step of determining which column and row labels from the plurality of source tables will be represented within the destination table includes receiving input from a user of the computer system regarding desired column and row labels.

16. The method of claim 14 wherein the step of determining which column and row labels from the plurality of source tables will be represented within the destination table includes the step of including a row label in the destination table for each unique row label in the plurality of source tables and including a column label in the destination table for each unique column label in the plurality of source tables.

17. The method of claim 14 wherein the step of adding data from the source table to the destination table includes the steps of:

for each paired entry (sc, dc) in the column mapping list,

for each paired entry (sr,dr) in the row mapping list, adding the data stored at the intersection of the row containing row label sr and the column containing column label sc in the source table to the data stored at the intersection of the row containing row label dr and the column containing column label dc in the destination table.

Description

DESCRIPTION

1. Technical Field

This invention relates to the field of computer application programs and more specifically to a method and means for combining the data contained in a number of tables having dissimilar formats.

2. Background of the Invention

Computer spreadsheet applications are a popular means of relating a large amount of numerical data with predetermined mathematical relationships. Specifically, a spreadsheet typically comprises a plurality of cells, arranged in rows and columns wherein each cell is identified by its X-Y position in the spreadsheet and further wherein data within the cell may be manipulated or processed according to its relative position with respect to other cells. In addition to two dimensional arrays, some spreadsheets may include other planes for associating cells, thus providing a spreadsheet structure having three or more dimensions.

Groups of cells within a spreadsheet which may be logically grouped may be thought of as a table wherein a single spreadsheet may contain multiple tables. In other words, a table may comprise a portion of a spreadsheet. In addition, a table may exist in a static form such as a table which comprises a portion of a word processing document.

Occasionally, it is desirable to combine the data contained in multiple tables into a single master table. Prior spreadsheet application programs have provided only limited capability for table aggregation wherein only source tables having identical formats, in terms of size and category designations, could be combined. No technique is known which allows any number of tables having virtually any configuration to be automatically combined.

SUMMARY AND OBJECTS OF THE INVENTION

Accordingly, it is an object of the present invention to provide a method and system for aggregating tables having dissimilar formats.

It is another object of the present invention to provide a method and system for aggregating tables based on specific categories of information.

It is still another object of the present invention to provide a method and system for aggregating tables based on generic categories of information.

In summary, the present invention contemplates a method and system for automatically aggregating tables having a variety of configurations or layouts. Specifically, tables having a variety of categories with multiple divisions within those categories may be combined wherein rows and columns are automatically created in a destination table based on the categories and divisions of one or more source tables. In accordance with the teachings of the present invention, a plurality of source tables are selected as input to the system. Categories for aggregation are then specified by a user or are automatically generated based on the categories contained within the source tables. Once the desired categories are specified, mapping tables for rows and columns are created wherein each mapping table comprises an array of pairs of values wherein each pair comprises a first value for identifying a source table location and a second value for identifying a destination table location. The system then conducts a binary search based on each pair in the mapping table to find the correct location in the destination table and to apply the desired table mapping by performing the desired mathematical function on the values in the source and destination tables (e.g., summing the values in the appropriate locations in the source and destination tables).

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects may be completely understood through the detailed description of the invention below and the accompanying drawings in which:

FIG. 1 is a diagram showing a prior aggregation technique.

FIG. 2 is a diagram showing the aggregation of spreadsheets having dissimilar formats.

FIG. 3 is a diagram showing the automatic aggregation of multiple spreadsheets based on specific categories of information.

FIG. 4 is a diagram showing the aggregation of spreadsheets based on generic categories of information in accordance with the teachings of the present invention.

FIG. 5 is a diagram of a table demonstrating the cell location identifying convention used in the operation of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The present invention contemplates a method and system which allows the consolidation or aggregation of data in disparate tables into a single aggregate table which summarizes that data. While the present invention is adapted for aggregating virtually any type of table, in the discussion below, spreadsheets are shown as an example of one application of this invention. As shown in FIG. 1, in prior systems, only spreadsheets having identical configurations could be combined. The example of FIG. 1 demonstrates the aggregation capabilities of the popular Lotus 1-2-3 spreadsheet application program available from Lotus Development Corp. In the system 100, source spreadsheets 102, 104 represent typical spreadsheets wherein various categories are arranged along the vertical axis and various divisions are aligned along the horizontal axis of the spreadsheet, thus forming a plurality of cells arranged in rows and columns. In the example of system 100, financial categories are aligned along the vertical axis of the spreadsheets 102, 104 and yearly divisions are aligned along the horizontal axis of the spreadsheet.

In the system 100, source spreadsheets 102, 104 may be aggregated into an aggregate spreadsheet 106 which must be the same configuration as source spreadsheets 102, 104 wherein an identical number of rows and columns must be used with identical categories and divisions aligned along each vertical and horizontal axis, respectively.

In contrast, the present invention provides an improved method and system wherein source tables of virtually any size and configuration may be combined in an aggregate table based on user-defined, or automatically generated criteria. Referring now to FIG. 2, in a first aspect of the present invention, the source spreadsheets 202, 204 may be combined into a destination spreadsheet 206 wherein the source spreadsheets 202, 204 may contain a different number of rows and columns having different category and division designations. For example, spreadsheet 202 may contain the financial categories "Cost", "Profit", "Sales" and "Inventory" aligned along the vertical axis with divisions for the years 1986-1990 aligned along the horizontal axis in ascending order; and spreadsheet 204 may contain the financial categories "Sales", "Profit" and "Losses" aligned along the vertical axis with divisions for the years 1989-1986 aligned along the horizontal axis in descending order.

The present invention provides a method and means for automatically aggregating source spreadsheets 202, 204 to generate a destination spreadsheet 206 having all of the categories and divisions of both spreadsheets 202, 204. This aspect of the present invention is referred to as dynamic aggregation. In the system 200, the respective fields of the source spreadsheets 202, 204 may be combined according to predefined relationships such as summing, subtracting, etc., as represented by fields 208, 210 which are summed to generate field 212. In cases wherein there are no common categories between source spreadsheets, new fields are created in the destination spreadsheet 206 as represented by fields 214, 216 and fields 218, 220, respectively.

In another aspect of the present invention, referred to as static aggregation and shown in FIG. 3, specific fields may be specified by the user for aggregating in the destination spreadsheet 302. For example, in the system 300, source spreadsheets 202, 204 described above are used to generate aggregate spreadsheet 302 which contains aggregates of the "Cost" and "Profit" fields of spreadsheet 202 and the "Profit" fields of spreadsheet 204. In this example, exemplary source fields 208 and 210 of spreadsheets 202, 204, respectively, may be summed to create destination field 306 and the cost fields, e.g., cost field 214, are directly copied into aggregate spreadsheet 302 to generate new cost fields, e.g. cost field 304.

In the above examples, the respective aggregate spreadsheets are generated from source spreadsheets having nonvariant or specific categories, or categories for only one type of item. In another aspect of the present invention, the present invention contemplates a method and system for aggregating spreadsheets having generic categories of information. Referring now to FIG. 4, the spreadsheets 202' and 204' are similar to the spreadsheets 202, 204 with the exception that the "Sales" fields have been modified. For example, sales field 404 has been modified to represent sales of "widgets" for 1986 and sales field 406 has been modified to represent sales of "cogs" for 1986. Accordingly, in addition to all of the features described above, the present invention contemplates a method and system wherein a generic aggregate field may be defined, such as field 408, which represents total sales for both widgets and cogs for 1986.

According to the principles of the present invention, inputs to the inventive aggregation system comprise a list of input tables and an optional output table template which may be specified by a user. If no output table template is specified, one is generated by scanning all of the input tables and including each unique category and division found in the input tables. This is performed for each axis.

Referring now to FIG. 5, according to the principles of the present invention, input data is generated in the form of a list of tables designated:

T={T1, T2,...,TN }

where N is the total number of input tables given.

The value of a particular element (or entry) of a table is represented in the form:

Ti [j,k]

where Ti is the ith table in the input list, j is the row number and k is the column number of the table entry. The number of data rows and columns contained in table Ti is indicated by ri and ci, respectively. The category and division elements are treated as special table entries with 0-value indices. A table incorporating the above convention is shown in FIG. 5.

An output table template (either automatically generated or specified by a user), is referred to as O, each element being listed as O[i,j]. In the preferred practice of the present invention, the output table template is initialized wherein all data values are set to zero and all unique categories and divisions are stored in the elements O[i,0], and O[0,j], respectively. The maximum data row and column of the output table is designated rO and cO.

The GenerateTable function is used to automatically generate an output table template:

A subtable is referred to with index ranges instead of scalar constants. For example, while an entire output table may be referred to by O, a data area may be designated as follows:

O[1..rO, 1..cO ]

The vector of row categories is specified as follows:

O[1..r0,0]

In the preferred practice of the present invention, a mapping list is used to map source table row and columns to corresponding destination output (or aggregate) table row and columns. A mapping list is written as a list of pairs M={(s1, d1), (s2, d2), ... (si,di)} where each si represents a source row or column and each di represents a destination row or column (a mapping list contains either all source and destination row numbers or all source and destination column numbers, but not both).

The mapping process of the present invention is defined by the pseudo code DataConsolidate listing below which is set forth in the syntax of the well known "C" programming language. The following algorithm receives as input two arguments: an input table list and an output table template (which may be automatically generated by the GenerateTable subroutine or specified by a user), specified with the element identification convention set forth above.

The map subroutine called by DataConsolidate is used to create a mapping list from a source and a destination category vector and from a source and destination division vector. Instead of performing an equality comparison to locate matching categories and matching divisions, the output table uses categories and divisions as a pattern to match against all categories and divisions in a source table. A pseudo code listing for the map subroutine is set forth below:

If the pattern string contains no wild-card characters (used for generic aggregation), PatternMatch returns true if the pattern and object string are identical. Otherwise, PatternMatch returns true if the pattern string can be made to be identical to the object string after substituting a `?` character in the pattern for any other single character, and an `*` character in the pattern for any zero or more characters. For example, the pattern string "c?t" would match an object string of "cat", and "*Sales" would match "Regional Sales". A specific implementation for the PatternMatch routine is not set forth herein. However, a PatternMatch routine suitable for use with the present invention is set forth in Chapter 9, Aho, Hopcroft, and Ullman, "The Design and Analysis of Computer Algorithms," 1974 and published by Addison-Wesley.

The AddToMap subroutine called by the Map subroutine adds the first argument (a pair of numbers) to the second argument mapping list. It ensures that each pair is added only once to M (i.e., only unique pairs are allowed with no duplicates).

While the above description was set forth in terms of additive mapping, the present invention may be used for aggregate functions other than summing with a small modification. For example, rather than the Apply subroutine adding entries directly to the output table O, the routine enters intermediate values into a set of temporary tables of the same dimension as O. For example, to average values, two tables can be used, one for holding a cumulative sum, and one to contain the count of elements contributing to the sum. In this embodiment, the DataConsolidate routine is modified to include a step which combines the intermediate values from the temporary tables such that each element in O is assigned to the quotient of the sum table divided by the value in the count table. Similarly, a statistical variance function may be implemented through the use of three tables, a sum table, a sum of squares table and a count table. These features may be implemented according to the routine set forth below:

In summary, an improved method for aggregating tables having dissimilar formats has been described. Accordingly, all of such uses and modifications will be apparent to persons of ordinary skill without departing from the spirit and scope of the appended claims.

Method and apparatus using a pass through personal computer connected to both a local communication link and a computer network for indentifying and synchronizing a preferred computer with a portable computer