Background and Relevant Art
Computers and computing systems have affected nearly every aspect of modern living. Computers are generally involved in work, recreation, healthcare, transportation, entertainment, household management, etc.
Modern computing systems have the capability to generate and store large amounts of data. For example, data may be collected by data collection mechanisms coupled to sensors, web services, or other data sources. The raw data can be operated on to create even more data. Mass storage is very inexpensive, so this data can be persisted for long periods of time, without the need to destroy the data to reclaim the storage space. Thus, large amounts of data can be generated and accumulated.
Because of the large amounts of data available, finding a particular piece of data is akin to the proverbial finding of a needle in a haystack. Difficulties can arise simply in searching through the large amounts of data. This can be compounded by a user not being able to craft effective search queries. In particular, various indexes and search engines can organize and make data searchable, but these tools are only as effective as a user performing a search allows them to be by constructing appropriate queries. Further, a user may have a desire to find data that cannot completely be provided by a single data store.
The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is only provided to illustrate one exemplary technology area where some embodiments described herein may be practiced.
One embodiment illustrated herein is directed to a method that may be practiced in a distributed computing environment. The method includes acts for obtaining a single unified result for a query over a plurality of data sources. The method includes receiving a query from a user, the query including a hint specifying (i) an identity of a type of data that the query is providing, and (ii) an identity of a format and type of data the query is looking for as a specific answer to the query. The method further includes mapping the query to a particular query pattern from among a plurality of available query patterns. Each available query pattern comprises a first query portion and a second parameter portion, and defines one or more queries over a set of two or more different data sources, mapping the query to a particular query pattern comprising matching the type of data that the query is providing to the second parameter portion of each of the plurality of available query patterns.
The method further includes querying a particular set of two or more different data sources using the one or more queries that correspond to the particular query pattern, including receiving at least two results of querying the particular set of two more different data sources using the one or more queries that correspond to the particular query pattern. The method further includes deriving a single unified result from at least one of the results, the single unified result having the format and type of data the hint specified that the query was looking for as a specific answer to the query.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
Additional features and advantages will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the teachings herein. Features and advantages of the invention may be realized and obtained by means of the instruments and combinations particularly pointed out in the appended claims. Features of the present invention will become more fully apparent from the following description and appended claims, or may be learned by the practice of the invention as set forth hereinafter.
In order to describe the manner in which the above-recited and other advantages and features can be obtained, a more particular description of the subject matter briefly described above will be rendered by reference to specific embodiments which are illustrated in the appended drawings. Understanding that these drawings depict only typical embodiments and are not therefore to be considered to be limiting in scope, embodiments will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:
Some embodiments described herein allow users to construct natural language queries on top of data that is exposed through a data platform that has a set of data providers from which it can provide data. One such data platform is the Windows Azure® Marketplace available from Microsoft Corporation of Redmond Wash. However, embodiments may be used with other storage that contains structured data. The natural language query can be used as input by the system to form semantically appropriate queries for two or more of the data set providers, which can then be queried using the semantically appropriate queries. The results from the two or more providers can be aggregated and provided to the user as a single unified result.
Referring now to
The following illustrates an example: the natural language query “Crime rate in Seattle” maps to the pattern “Crime rate in {City}” this is then translated to a set of queries (such as OData queries, SQL queries or queries in another query language) against the structured data repository as appropriate for each given data repository. These queries result in a specific value that represents the crime rate in Seattle. This value is then returned to the user.
Some embodiments may be implemented in a spreadsheet application, such as Excel® available from Microsoft Corporation of Redmond Wash., using a Lookup or similar function. Such an example is illustrated in
Alternatively or additionally, embodiments may be implemented as a bot that can be used in an instant messaging client, such as Microsoft® Communicator. For example, a user may be able to use an instant messaging client to connect to an information service. Referring now to
Alternatively or additionally, embodiments may be implemented as service that uses speech, such as a phone or other application. For example, a user can speak a natural language question into a phone or other computing device. That question can be translated to semantically appropriate queries for different data repositories available to the information service. These queries can then be used to obtain data and to construct an answer to the user's natural language question.
Embodiments may be implemented where a portion or all of the patterns can be inferred from the schema of the underlying structured data. Continuing the example, above, if the data exposes a number of columns, where the columns are labeled “Violent Crime”, “Robbery”, “Domestic Crime”, etc. the pattern that the user can input can be structured in a form of “{Column_Name} in {City}” and the {Column_Name} can be one of these column names. This makes the engine smarter by relying on the structured data it operates on. While the preceding example illustrates usage of column names, embodiments are not limited only to column names. Rather, alternative or additional embodiments may include other types of semantics that are being applied.
Patterns can also contain enums, which is a type with a fixed set of constants, for certain often used variations of a phrase. For example, a pattern may include “crime rate {for|in} {City}” where for and in are the elements of the enum and represent common variances in questions seeking the same information.
The user can also provide information about the type of the data that they are looking for or providing. For example, a user may inject hints. For example, a user may hint that they are asking for an answer (or that they are sending information) that should be a number and that they are looking for text as a result. With this, and given the structure of the underlying data, the system will fetch values that make sense in the context.
Embodiments may additionally or alternatively include functionality to allow the user select data and provide information as to the type of data. For example, a user could select one or more of an Excel® workbook, a table in a Word® document, comma separated elements in a textbox, etc. The user could then indicate the type of the data. For example, the user could select a list of cities and provide an indication to the system that these are cities. Additionally or alternatively, the system could also determine the type by looking at the column header of the selected area or even by inspecting the further context of the document. This structured input can be used to match against one or more pattern from the query patterns 106 that the engine 102 understands and provide the user 100 a smart choice of which patterns can be applied. In particular, by the system knowing what information a user has available for making queries, the system can display in a user interface general query patterns that it has available that would fit the data elements that the user can use as input. The user could then select an appropriate query and populate variable elements from the information that they have available.
The following illustrates another example. The user has a set of cities, e.g., Seattle, San Francisco, Las Vegas, etc. The user selects these cities in a user interface and finds an experience where s/he can tell the system that these are cities. After that the system tells the user that there are 3 patterns that he could use with this data to augment his work: (1) Crime rate in City, (2) Current temperature in City, (3) Average income in City. The user chooses one of the choices for their set of cities and this selection is added to the user's query. The system, by knowing what data points a user has available, can prompt the user as to what query they might like to run. Once the user has selected a natural language query, the system can translate the query to semantically appropriate queries 112-1 through 112-m to obtain results 114-1 through 114-m from data stores 108-1 through 108-n which can be consolidated to provide the result 116 to the user 100.
Embodiments may include functionality for allowing an administrator to construct a query patterns such as query patterns 106 illustrated in
The following discussion now refers to a number of methods and method acts that may be performed. Although the method acts may be discussed in a certain order or illustrated in a flow chart as occurring in a particular order, no particular ordering is required unless specifically stated, or required because an act is dependent on another act being completed prior to the act being performed.
Referring now to
The method 600 further includes determining a set of two or more data sources from the finite set of data sources that together can be used to satisfy the query (act 604). For example, the engine 102 can determine two or more structured data stores from the set of data store 108-1 through 108-n. These two or more structured data stores may have information that can satisfy the users query.
In some embodiments, the method 600 may be practiced where determining a set of two or more data sources includes identifying data sources that can be used together. For example, identifying data sources that can be used together may include identifying data sources that can be used together based on at least one of licensing (including, for example, cost to access data in a particular data store), terms of use, data structures of the data sources, compatibility of inputs and outputs, or data set purposes. For example, licensing restrictions or requirements may require that certain fees be paid to access certain data sources or that certain data sources be used together or not be used together. Similarly, terms of use requirements may have similar restrictions on the system. In another example, the manner in which data is organized in various repositories may make that data more suitable for use with other repositories. Thus, those repositories may be used together. For example, some data stores may be more suitable for language translation queries, while other data stores are more suitable for reporting sports scores, weather, or financial information.
In an alternative or additional embodiment, determining a set of two or more data sources may include identifying data sources based on previous user interaction to select data sources. For example, previous user searches may be used to determine appropriate data sources. The previous user interaction may be indicative of the type of data stores or information that a user searches for. Thus, the system may develop preferences for one data store or type of data store over another data store or type of data store.
The method 600 further includes translating at least a portion of the query from the user to semantically appropriate queries for the two or more data sources (act 606). For example, the query 110 may be translated to semantically appropriate queries using the query patterns 106. These semantically appropriate queries can be used to query two or more of the data stores 108-1 through 108-n.
As will be detailed below, querying the data stores could be done in parallel, series, or in other appropriate fashions. For example, illustrating now a serial query scenario, a user 100 could submit a query 110. The query 110 could be matched to a pattern from the set of patterns 106, where the matched pattern is a pattern semantically appropriate for the data store 108-1. A query 112-1, that is semantically appropriate for the data store 108-1 may be generated and run against the data store 108-1 resulting in the result 114-1. This result 114-1 could be used to generate a second query 112-2 which is then run against a different data store 108-2, resulting in a result 114-2. This may be the result 116 returned to the user, or additional queries may be performed in the serial fashion described against different data stores in the set of data stores 108-1 though 108-n until an appropriate result is found.
In a parallel example, the query 110 may be translated to two or more queries, such as queries 112-1 and 112-2 that are semantically appropriate queries to be run against data stores 108-1 and 108-2 respectively. These two queries 112-1 and 112-2 can be run in parallel and their results aggregated to produce the result 116 that is returned to the user 100.
The method 600 further includes receiving results from the two or more data sources to the semantically appropriate queries (act 608). For example, as illustrated in
The method 600 further includes aggregating the results (act 610). For example, as illustrated in
As illustrated above, the method 600 may be practiced where semantically appropriate queries are run in series and where aggregating comprises using results from one data source for a query for another data source. For example, embodiments are illustrated above where the query 112-2 is formed using the result 114-1 such that the aggregation occurs by using one result to construct a later query.
Alternatively or additionally the method 600 may be practiced where semantically appropriate queries are run in parallel and parallel results are aggregated. For example, queries 112-1 and 112-2 may be run independent of each other, but the results 114-1 and 114-2 may be aggregated once both results are received.
The method 600 may be practiced where aggregating queries comprises aggregating one or more cached queries. For example, one or more of the queries 112-1 through 112-m may be run at some point (either independently or in fulfilling a previous user query 110), and the corresponding result(s) 114-1 through 114-m cached at the engine 102. When a subsequent query 110 is run, the cached result may be used to satisfy the query 110.
The system illustrated herein may be extensible in that while the system is able to access a fixed set of data stores, additional third party data stores can be added to the set of data stores accessible by the system. In particular, various third parties are able to subscribe to data platform services to make their data available through the data platform services. Typically, the data platform services can obtain financial reward either by charging content providers a fee to host a particular data store or by charging users to access data from data stores while possibly passing on a portion of the collected fee back to providers of data in the data stores. Thus, it may be beneficial for data platform service providers and data providers to collaboratively work together to increase the number of data stores available on a data platform.
Embodiments of the method 600 may be practiced where the user query is based on at least one system prompt indicating the types of queries that a user can ask. For example, in the examples illustrated above, embodiments of the system can identify the types of data a user has available. For example, the user may have available a list of cities. The system can identify that the user has an available list of cities in a dataset. The system can then provide hints as to what queries the user may wish to ask, such as “what is the crime rate of a given city” or “what is the temperature in a given city”.
Further, the methods may be practiced by a computer system including one or more processors and computer readable media such as computer memory. In particular, the computer memory may store computer executable instructions that when executed by one or more processors cause various functions to be performed, such as the acts recited in the embodiments.
Embodiments of the present invention may comprise or utilize a special purpose or general-purpose computer including computer hardware, as discussed in greater detail below. Embodiments within the scope of the present invention also include physical and other computer-readable media for carrying or storing computer-executable instructions and/or data structures. Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer system. Computer-readable media that store computer-executable instructions are physical storage media. Computer-readable media that carry computer-executable instructions are transmission media. Thus, by way of example, and not limitation, embodiments of the invention can comprise at least two distinctly different kinds of computer-readable media: physical computer readable storage media and transmission computer readable media.
Physical computer readable storage media includes RAM, ROM, EEPROM, CD-ROM or other optical disk storage (such as CDs, DVDs, etc), magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer.
A “network” is defined as one or more data links that enable the transport of electronic data between computer systems and/or modules and/or other electronic devices. When information is transferred or provided over a network or another communications connection (either hardwired, wireless, or a combination of hardwired or wireless) to a computer, the computer properly views the connection as a transmission medium. Transmissions media can include a network and/or data links which can be used to carry or desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer. Combinations of the above are also included within the scope of computer-readable media.
Further, upon reaching various computer system components, program code means in the form of computer-executable instructions or data structures can be transferred automatically from transmission computer readable media to physical computer readable storage media (or vice versa). For example, computer-executable instructions or data structures received over a network or data link can be buffered in RAM within a network interface module (e.g., a “NIC”), and then eventually transferred to computer system RAM and/or to less volatile computer readable physical storage media at a computer system. Thus, computer readable physical storage media can be included in computer system components that also (or even primarily) utilize transmission media.
Computer-executable instructions comprise, for example, instructions and data which cause a general purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions. The computer executable instructions may be, for example, binaries, intermediate format instructions such as assembly language, or even source code. Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the described features or acts described above. Rather, the described features and acts are disclosed as example forms of implementing the claims.
Alternatively, or in addition, the functionally described herein can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc
Those skilled in the art will appreciate that the invention may be practiced in network computing environments with many types of computer system configurations, including, personal computers, desktop computers, laptop computers, message processors, hand-held devices, multi-processor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile telephones, PDAs, pagers, routers, switches, and the like. The invention may also be practiced in distributed system environments where local and remote computer systems, which are linked (either by hardwired data links, wireless data links, or by a combination of hardwired and wireless data links) through a network, both perform tasks. In a distributed system environment, program modules may be located in both local and remote memory storage devices.
The present invention may be embodied in other specific forms without departing from its spirit or characteristics. The described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.
This application is a continuation of U.S. patent application Ser. No. 13/471,707, filed May 15, 2012, and entitled “SCENARIO BASED INSIGHTS INTO STRUCTURE DATA.” The entire content of the foregoing application is incorporated by reference herein in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | 13471707 | May 2012 | US |
Child | 14593130 | US |