API FOR DATA REPOSITORIES

Methods and systems for accessing a data repository include identifying target cells in an input data repository, including an input cell, an output cell, and a formula. An interface for the input data repository is generated that applies an input data value from a request to the input cell and that outputs a value from the output cell that is generated by the formula. A new value from a request is applied to the input cell using the interface. A value generated by the formula is outputted.

BACKGROUND

The present invention generally relates to data access and, more particularly, to application programming interfaces (APIs) for data repositories.

While much information is stored in readily accessible forms, such as in databases that can be accessed with an appropriate query, other information is stored in forms that are less accessible. For example, modern spreadsheet software is used to store large volumes of data and, additionally, has the ability to implement programmatic manipulation of their data. It is difficult to interact with such data repositories in an automated way, frequently necessitating manual intervention by human beings to access and modify the information stored within them.

SUMMARY

A method for accessing a data repository include identifying target cells in an input data repository, including an input cell, an output cell, and a formula. An interface for the input data repository is generated that applies an input data value from a request to the input cell and that outputs a value from the output cell that is generated by the formula. A new value from a request is applied to the input cell using the interface. A value generated by the formula is outputted.

A system for accessing a data repository includes a hardware processor and a memory that stores a computer program. When executed by the hardware processor, the computer program causes the hardware processor to identify target cells in an input data repository, including an input cell, an output cell, and a formula, to generate an interface for the input data repository that applies an input data value from a request to the input cell and that outputs a value from the output cell that is generated by the formula, to apply a new value from a request to the input cell using the interface, and to output a value generated by the formula.

DETAILED DESCRIPTION

To access the data that is stored in otherwise programmatically inaccessible formats, such as spreadsheets or files stored locally or in the cloud, the inputs, outputs, and formulas of the data repository may be learned. These learned attributes may be used to automatically generate an application programming interface (API) for the data repository, using natural language processing to generate labels. The API can subsequently be used to access the data stored within the data repository, so that access to, and update of, the data within the data repository can be more readily automated.

Thus, embodiments may accept an input repository or repositories and may identify areas within the input repository that represent inputs and areas that calculate output values. As a result of this process, a trained repository learning model may be generated. When a new data repository is provided, the repository learning model may be used to identify the inputs, the outputs, and the formulas that translate between them.

Streams of input, for example in the form of audio and text files, may further be used to assess for details such as specific key values or words. These key values and words may be extracted using natural language processing and are referred to herein as tokens. Tokens may be used to identify possible tags and saved repositories of information that may apply to information within the tokens.

Because the API is generated from learned information from the data repositories, it can be generally applied without knowing a format of the input repository in advance. Information about the tags of the input data repositories can be saved, making it easy to search for relevant repositories. This makes it possible to collect together data repositories spanning different fields and topics. Providing access to the functions embedded in semi-structured data repositories increases the flexibility and utility of those data repositories and thereby improves the functionality of the computer system as a whole.

Referring now toFIG.1, a data repository access system100is shown. The access system100includes a hardware processor102and a memory104that are used to execute one or more functional modules relating to the access of data in data repositories. A request interface106accepts written or spoken queries, for example using a user interface such as a microphone or keyboard.

The access system100may have access to a variety of different types of data repositories. For example, conventional databases110may be accessible using structured query language inputs. Additional types of data repositories are included as well, and may not have any predefined means for programmatic access to their contents. For example, a spreadsheet112may include a wide variety of data types, structured in an arbitrary way that is defined by its author. Thus spreadsheets112and other data repositories may be semi-structured data sources-having some structure, such as formulas, without being as well-defined as a structured database. The spreadsheet112may include executable instructions of its own, which take certain inputs and generate corresponding outputs.

Other types of data repository114are also contemplated, which may not resemble database110and spreadsheet112, but which may nonetheless store information and which may have learnable inputs, outputs, and functionality. For example, an executable program may include its own internal data, stored according to a proprietary data format, that may be rendered accessible according to the present embodiments.

A request workflow orchestrator108translates between the request interface106and an appropriate data repository. For queries to a database110, having a predefined query language or API, the request workflow orchestrator108may simply forward the query to the database110and report any results to the request interface106.

For spreadsheets112and other data repositories114, the request workflow orchestrator108may generate an appropriate API for the data repository in question. When queries are received at the request interface106, the request workflow orchestrator108may use natural language processing to translate the queries into a form suitable for the generated API. The request workflow orchestrator108then executes the translated query on the data repository in question and reports any results to the request interface106.

Referring now toFIG.2, a method of learning and using a data repository is shown. Although this embodiment is described with a specific focus on spreadsheets112, those having ordinary skill in the art would be able to adapt it to other data repositories114as well.

Block202scans the data repository to identify inputs and outputs. For example, every cell in spreadsheet112may be inspected and analyzed for dependencies. If there is a dependency, the cell may represent a formula. A formula in a spreadsheet may include a function that takes an input, performs some calculation or other action, and generates an output. Thus, for example, a given call may include a summation of the values of multiple other cells. The identified other cells represent inputs to the formula and the generated sum represents the output of the formula.

Block204can thereby represent the data repository as a collection of formulas and their inputs and outputs, for example identified as particular respective target cells within the spreadsheet112. Block206may use text information in the target cells and in adjacent cells and column headers to generate tokens relating to the target cells. This token information helps to identify the function of the target cells. For example, if a given column header is, “number of CPUs,” then this may be identified as pertaining to a token, “CPUs: 23”. A corresponding output cell, such as “cost,” may then be returned. The target cell and token information may be stored for later use. In some cases, the outputs of formulas may be filtered according to whether they represent final outputs. For example, if the output of a given formula serves as the input to another formula, then it is not a final output and may be filtered out. The assignation of tags/tokens to target cells may be augmented by textual or audio inputs from subject matter experts, defining the contents of the cells.

Block208accepts inputs relating to the data repository. This input may include, for example, text or audio inputs. The inputs may be broken into tokens using natural language processing, and the tokens may be applied to the data repository. Multiple input streams may be analyzed, with low-confidence input tokens being picked out for verification by a human being. Tokens that are frequently repeated may be used to identify relevant repositories with similar tags. Block210may then apply the extracted tokens as inputs to the data repository and associated outputs may be reported.

Block212may update values of the data repository as needed. For example, key-value pairs may be used to update values of the spreadsheet112, where the key may be a uniform resource indicator and the value may be a request for a value to use in changing the repository. Additionally, the workflow orchestrator108may have an internal data repository that stores the tokens associated with the spreadsheet112. Block212may therefore update the workflow orchestrator108with more precise information about which cells of the spreadsheet to use as the inputs and outputs.

Referring now toFIG.3, an exemplary spreadsheet300is shown. The spreadsheet includes multiple cells, arranged into rows and columns. Each cell may include a data value or a formula that calculates an output data value based on one or more input data values. Thus a set of input cells302are shown. Each input cell302may include a data value of any appropriate data type, such as numerical information or textual information. In the present example, the input cells302may include floating point numerical data, such as a dollar/cents value or a measurement generated by a sensor.

In some embodiments, not all cells of the spreadsheet300are necessarily filled by data values or formulas. Some may be empty, while some may include only formatting information intended to make it easier for a user to read and understand the spreadsheet300. The spreadsheet300may include other cells that include data unrelated to the function of the spreadsheet300, such as instructional information for users, descriptive information unrelated to the contents of the cells or formulas, ownership/authorship information, security information, and any other type of information or data that does not pertain to the functioning of the API. When identifying target cells for the API, the cells that are empty or that include data unrelated to the functioning of the spreadsheet may be ignored or filtered out.

A column of cells labeled first sum304are shown. These cells illustrate an intermediate formula, each of which takes a set of input cells302from a respective row as inputs and each of which generates a sum of the set of input cells302as an intermediate output. Thus the multiple first sums304may each generate an output data value that is the sum of the data values stored in input cells302from the same row.

A final sum306is shown below the first sums304, and in this example the final sum306may accept the first sums304as inputs and may generate a sum of the first sums304as an output. In this example, the output value of the final sum306is not used by any other formula in the spreadsheet300.

Although the formulas described in spreadsheet300are relatively simple, embodiments may use any number of such formulas, and the formulas may include any type of data processing. Appropriate formulas include, but are not limited to, arithmetic functions, statistical functions, calculus functions, data formatting functions, and text processing functions.

When processing the spreadsheet300, the formulas304and306are identified and their respective inputs are further identified. Thus, the input cells302and the locations of the formulas' outputs are identified as target cells that are useful in implementing an API. Intermediate outputs, such as the outputs of the first sums304, may be filtered so that they do not generate outputs in the API—such intermediate values may be unlikely to represent useful data that is sought by the person accessing the spreadsheet300.

The spreadsheet300may include cells that describe the contents of other cells. For example, column headings308may include information relating to the data values and formulas stored in the cells of the respective columns. This information may be stored as tokens relating to the relevant cells of the spreadsheet300and can be used to identify inputs within subsequent input queries.

After the API for the spreadsheet300has been generated, the API may modify values of the spreadsheet300in accordance with inputs and queries. For example, a given query may provide data values to use in the inputs302. The API may insert such values in the inputs302and may process the formulas, first sums304and final sum306. Each formula generates respective output values, and the final output of final sum306is selected by the API to output as the result of the query.

Referring now toFIG.4, a diagram of generating and using an API for a data repository is shown. An input spreadsheet402is provided as an input. As described above, the input spreadsheet402may be include stored data as well as functions that process that stored data to produce an output.

The data repository access system100processes the spreadsheet402to learn the functions within the input spreadsheet. The data repository access system100generates and stores an API404, which identifies target cells within the spreadsheet402to use as inputs and outputs. In some embodiments, the input spreadsheet402and the API404may be stored together, with the API404providing a way to access the functionality of the input spreadsheet402. In some embodiments, the data repository access system100may replicate the functionality of the input spreadsheet402as a separate set of functionality that is implemented by the API404, for example as a separate executable program with definite inputs and outputs.

The API404may later be accessed by users, for example by providing an input406. The input406may, for example, include one or more data inputs that are appropriate for use with the input cells of the input spreadsheet402. The input406may identify the input spreadsheet402explicitly, or may instead describe a requested functionality, for example using a natural language query. An appropriate API404may be selected from those stored by the data repository access system100, for example by analyzing tokens within the input406and matching those tokens to tokens associated with the API404.

The API404accepts the input406and matches any data values of the input406with input cells within the associated input spreadsheet402. The functions of the input spreadsheet402are used to generate output data values, which the API404reads out and provides as output408. In this way, access to the functions of the input spreadsheet402may be automated and used by any appropriate software application.

Referring now toFIG.5, additional detail on the request workflow orchestrator108is shown, in the context of the example shown inFIG.4. Input spreadsheets402may be received as input to the request workflow orchestrator108and may be stored with stored repositories. API learning504processes the input spreadsheet402to identify target cells and to associate the input spreadsheet with any appropriate tokens that may help identify the functions of the input spreadsheet402. The API generated by the API learning504is stored with stored APIs506, along with any appropriate tokens, tags, or other descriptive material.

Request processing508receives requests for a given data repository or function. In the event that the specific spreadsheet is not specified, the request processing508may identify tokens within the request to match the request with a data repository within the stored repositories502. An appropriate API is selected from the stored APIs506and request processing508applies input data values from the request to input cells within the data repository that corresponds to the selected API. Output generation510collects the output values generated by the selected API.

Referring now toFIG.6, an exemplary computing environment600is shown. Computing environment600contains an example of an environment for the execution of at least some of the computer code involved in performing the inventive methods, such as API generation690. In addition to block200, computing environment600includes, for example, computer601, wide area network (WAN)602, end user device (EUD)603, remote server604, public cloud605, and private cloud606. In this embodiment, computer601includes processor set610(including processing circuitry620and cache621), communication fabric611, volatile memory612, persistent storage613(including operating system622and block200, as identified above), peripheral device set614(including user interface (UI) device set623, storage624, and Internet of Things (IoT) sensor set625), and network module615. Remote server604includes remote database630. Public cloud605includes gateway640, cloud orchestration module641, host physical machine set642, virtual machine set643, and container set644.

PROCESSOR SET610includes one, or more, computer processors of any type now known or to be developed in the future. Processing circuitry620may be distributed over multiple packages, for example, multiple, coordinated integrated circuit chips. Processing circuitry620may implement multiple processor threads and/or multiple processor cores. Cache621is memory that is located in the processor chip package(s) and is typically used for data or code that should be available for rapid access by the threads or cores running on processor set610. Cache memories are typically organized into multiple levels depending upon relative proximity to the processing circuitry. Alternatively, some, or all, of the cache for the processor set may be located “off chip.” In some computing environments, processor set610may be designed for working with qubits and performing quantum computing.

VOLATILE MEMORY612is any type of volatile memory now known or to be developed in the future. Examples include dynamic type random access memory (RAM) or static type RAM. Typically, volatile memory612is characterized by random access, but this is not required unless affirmatively indicated. In computer601, the volatile memory612is located in a single package and is internal to computer601, but, alternatively or additionally, the volatile memory may be distributed over multiple packages and/or located externally with respect to computer601.

END USER DEVICE (EUD)603is any computer system that is used and controlled by an end user (for example, a customer of an enterprise that operates computer601), and may take any of the forms discussed above in connection with computer601. EUD603typically receives helpful and useful data from the operations of computer601. For example, in a hypothetical case where computer601is designed to provide a recommendation to an end user, this recommendation would typically be communicated from network module615of computer601through WAN602to EUD603. In this way, EUD603can display, or otherwise present, the recommendation to an end user. In some embodiments, EUD603may be a client device, such as thin client, heavy client, mainframe computer, desktop computer and so on.

REMOTE SERVER604is any computer system that serves at least some data and/or functionality to computer601. Remote server604may be controlled and used by the same entity that operates computer601. Remote server604represents the machine(s) that collect and store helpful and useful data for use by other computers, such as computer601. For example, in a hypothetical case where computer601is designed and programmed to provide a recommendation based on historical data, then his historical data may be provided to computer601from remote database630of remote server604.

PRIVATE CLOUD606is similar to public cloud605, except that the computing resources are only available for use by a single enterprise. While private cloud606is depicted as being in communication with WAN602, in other embodiments a private cloud may be disconnected from the internet entirely and only accessible through a local/private network. A hybrid cloud is a composition of multiple clouds of different types (for example, private, community or public cloud types), often respectively implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is bound together by standardized or proprietary technology that enables orchestration, management, and/or data/application portability between the multiple constituent clouds. In this embodiment, public cloud605and private cloud606are both part of a larger hybrid cloud.

In other embodiments, the hardware processor subsystem can include dedicated, specialized circuitry that performs one or more electronic processing functions to achieve a specified result. Such circuitry can include one or more application-specific integrated circuits (ASICs), FPGAs, and/or PLAs.