Presenting data in response to an incomplete query

Disclosed are systems, methods, and non-transitory computer-readable storage media for executing a database query based on an incomplete query. An example system configured to practice the method receives a web request, wherein a uniform resource locator (URL) of the web request provides an argument, and extracts the argument from the URL as a parameter for a database query. The system identifies an unspecified parameter in the database query, and selects a likely value for the unspecified parameter. Then the system executes the database query using the parameter and the likely value, and incorporates at least part of the query result in a web page served in response to the web request. The system can cache the web request and the likely value for the unspecified parameter for later use.

TECHNICAL FIELD

The present technology pertains to database queries, and more specifically pertains to serving queries that are submitted with missing query parameters.

BACKGROUND

Databases are a powerful and mature tool for storing and retrieving specific data on demand from potentially very large repositories. However, the interfaces for extracting data from various database systems can be complex and intimidating for beginner users or users who are unfamiliar with the specifics of how to form a database query properly. Users who are not database experts often require data from such databases, and rely on experts to obtain or extract that data for them. This is a potentially very inefficient use of a database expert's time, and can cause a bottleneck in users' workflows when requesting data from a database. Some simplified interfaces provide a way for users to access data in the database, but such interfaces may still require information from users that the users do not know. The users are forced to go back to the expert for help, which defeats the purpose of the simplified interface.

SUMMARY

Users who are unfamiliar with database query languages can access database information through a simplified interface that allows users to submit query parameters that they know or in which they are interested, such as through a web-based interface. In the case of a web-based interface, the web server receives the query, and passes the query to a query processor. For example, the user can fill out a web form to provide the query parameters or can enter a specific URL that includes embedded query parameters. The query processor can extract or parse the query parameters, and examine them to determine if any are missing. If certain parameters are missing, the query processor can attempt to determine which parameters are missing, and what values those missing parameters should have. For instance, the query processor can examine the information that is provided in the other parameters or can examine other data external to the query, such as a user profile, event data, a query history or cache, and so forth. Then, the query processor can cause the query to be executed on a database. The results of the database query can be provided to the user, such as in a web page, an email, or other form of delivery. In the case of a web page, the format and layout of the results page can vary based on the type and quantity of the results returned from the query.

Disclosed are systems, methods, and non-transitory computer-readable storage media for executing a database query based on an incomplete query. An example system configured to practice the method can receive a web request, wherein a uniform resource locator (URL) of the web request provides an argument, and extract the argument from the URL as a parameter for a database query. Arguments can include database query parameters or parameters describing how to display results, such as a data type, a data category, a time window, a priority, a graph type, a chart type, a table type, or a database. The system can identify an unspecified parameter in the database query, and select a likely value for the unspecified parameter based on at least one of a predefined rule, a heuristic, an analysis of a statistical model, or information contained in the web request. An example statistical model can be based on past user input, user feedback, or log data. The system can select the likely value for the unspecified parameter further based on a data source associated with the database query, such as a production system, a logging module, an analytics module, or some other external source. Then the system can execute the database query using the parameter and the likely value for the unspecified parameter to yield a query result, and incorporate at least part of the query result in a web page served in response to the web request. The system can optionally select a presentation structure for the query result within the web page, wherein the presentation structure comprises at least one of a number of a statistical graphical representation, a layout of the statistical graphical representation, whether to stack the statistical graphical representation, or a type of the statistical graphical representation such as a graph, chart, table, or list. The system can cache the web request and the likely value for the unspecified parameter for later use.

The query results can include additional data related to the web request but not specifically requested through the web request. The system can incorporate specifically requested query results in the web page so that more relevant data is presented in a more visible way than less relevant data, such as by presenting the relevant data in a larger chart, or placing the relevant data in a higher position on the web page.

DESCRIPTION

Various embodiments of the disclosure are discussed in detail below. While specific implementations are discussed, it should be understood that this is done for illustration purposes only. A person skilled in the art will recognize that other components and configurations may be used without departing from the spirit and scope of the disclosure.

The disclosed technology addresses the need in the art for providing a simpler and more flexible interface for performing database queries. Users who are unfamiliar with database query languages can access database information through a simplified interface that allows users to submit query parameters that they know or in which they are interested, such as through a web-based interface. In the case of a web-based interface, the web server can receive the query, and pass the query to a query processor. For example, the user can fill out a web form to provide the query parameters or can enter a specific URL that includes embedded query parameters. The query processor can extract or parse the query parameters, and examine them to determine if any are missing. If certain parameters are missing, the query processor attempts to determine which parameters are missing, and what values those missing parameters should have. For instance, the query processor can examine the information that is provided in the other parameters or can examine other data external to the query, such as a user profile, event data, a query history or cache, and so forth. Then, the query processor can cause the query to be executed on a database. The results of the database query can be provided to the user, such as in a web page, an email, or other form of delivery. In the case of a web page, the format and layout of the results page can vary based on the type and quantity of the results returned from the query.

An exemplary system configuration100is shown inFIG. 1, wherein electronic devices communicate via a network for purposes of exchanging content and other data. The system can be configured for use on a wide area network such as that shown inFIG. 1. However, the present principles are applicable to a wide variety of network configurations that facilitate the intercommunication of electronic devices. For example, each of the components of system100inFIG. 1can be implemented in a localized or distributed fashion in a network.

In system100, a user can interact with content management system106through client devices1021,1022, . . . ,102n(collectively “102”) connected to network104by direct and/or indirect communication. Content management system106can support connections from a variety of different client devices, such as desktop computers; mobile computers; mobile communications devices, e.g. mobile phones, smart phones, tablets; smart televisions; set-top boxes; and/or any other network enabled computing devices. Client devices102can be of varying type, capabilities, operating systems, etc. Furthermore, content management system106can concurrently accept connections from and interact with multiple client devices102.

A user can interact with content management system106via a client-side application installed on client device102i. In some embodiments, the client-side application can include a content management system specific component. For example, the component can be a stand-alone application, one or more application plug-ins, and/or a browser extension. However, the user can also interact with content management system106via a third-party application, such as a web browser, that resides on client device102iand is configured to communicate with content management system106. In either case, the client-side application can present a user interface (UI) for the user to interact with content management system106. For example, the user can interact with the content management system106via a client-side application integrated with the file system or via a webpage displayed using a web browser application.

Content management system106can make it possible for a user to store content, as well as perform a variety of content management tasks, such as retrieve, modify, browse, and/or share the content. Furthermore, content management system106can make it possible for a user to access the content from multiple client devices102. For example, client device102ican upload content to content management system106via network104. The content can later be retrieved from content management system106using the same client device102ior some other client device102j.

To facilitate the various content management services, a user can create an account with content management system106. The account information can be maintained in user account database150. User account database150can store profile information for registered users. In some cases, the only personal information in the user profile can be a username and/or email address. However, content management system106can also be configured to accept additional user information.

User account database150can also include account management information, such as account type, e.g. free or paid; usage information, e.g. file edit history; maximum storage space authorized; storage space used; content storage locations; security settings; personal configuration settings; content sharing data; etc. Account management module124can be configured to update and/or obtain user account details in user account database150. The account management module124can be configured to interact with any number of other modules in content management system106.

An account can be used to store content, such as documents, text files, audio files, video files, etc., from one or more client devices102authorized on the account. The content can also include folders of various types with different behaviors, or other mechanisms of grouping content items together. For example, an account can include a public folder that is accessible to any user. The public folder can be assigned a web-accessible address. A link to the web-accessible address can be used to access the contents of the public folder. In another example, an account can include a photos folder that is intended for photos and that provides specific attributes and actions tailored for photos; an audio folder that provides the ability to play back audio files and perform other audio related actions; or other special purpose folders. An account can also include shared folders or group folders that are linked with and available to multiple user accounts. The permissions for multiple users may be different for a shared folder.

The content can be stored in content storage160. Content storage160can be a storage device, multiple storage devices, or a server. Alternatively, content storage160can be a cloud storage provider or network storage accessible via one or more communications networks. Content management system106can hide the complexity and details from client devices102so that client devices102do not need to know exactly where the content items are being stored by content management system106. In one variation, content management system106can store the content items in the same folder hierarchy as they appear on client device102i. However, content management system106can store the content items in its own order, arrangement, or hierarchy. Content management system106can store the content items in a network accessible storage (SAN) device, in a redundant array of inexpensive disks (RAID), etc. Content storage160can store content items using one or more partition types, such as FAT, FAT32, NTFS, EXT2, EXT3, EXT4, ReiserFS, BTRFS, and so forth.

Content storage160can also store metadata describing content items, content item types, and the relationship of content items to various accounts, folders, or groups. The metadata for a content item can be stored as part of the content item or can be stored separately. In one variation, each content item stored in content storage160can be assigned a system-wide unique identifier.

Content storage160can decrease the amount of storage space required by identifying duplicate files or duplicate segments of files. Instead of storing multiple copies, content storage160can store a single copy and then use a pointer or other mechanism to link the duplicates to the single copy. Similarly, content storage160can store files more efficiently, as well as provide the ability to undo operations, by using a file version control that tracks changes to files, different versions of files (including diverging version trees), and a change history. The change history can include a set of changes that, when applied to the original file version, produce the changed file version.

Content management system106can be configured to support automatic synchronization of content from one or more client devices102. The synchronization can be platform agnostic. That is, the content can be synchronized across multiple client devices102of varying type, capabilities, operating systems, etc. For example, client device102ican include client software, which synchronizes, via a synchronization module132at content management system106, content in client device102i's file system with the content in an associated user account. In some cases, the client software can synchronize any changes to content in a designated folder and its sub-folders, such as new, deleted, modified, copied, or moved files or folders. The client software can be a separate software application, can integrate with an existing content management application in the operating system, or some combination thereof. In one example of client software that integrates with an existing content management application, a user can manipulate content directly in a local folder, while a background process monitors the local folder for changes and synchronizes those changes to content management system106. Conversely, the background process can identify content that has been updated at content management system106and synchronize those changes to the local folder. The client software can provide notifications of synchronization operations, and can provide indications of content statuses directly within the content management application. Sometimes client device102imay not have a network connection available. In this scenario, the client software can monitor the linked folder for file changes and queue those changes for later synchronization to content management system106when a network connection is available. Similarly, a user can manually stop or pause synchronization with content management system106.

A user can also view or manipulate content via a web interface generated and served by user interface module122. For example, the user can navigate in a web browser to a web address provided by content management system106. Changes or updates to content in the content storage160made through the web interface, such as uploading a new version of a file, can be propagated back to other client devices102associated with the user's account. For example, multiple client devices102, each with their own client software, can be associated with a single account and files in the account can be synchronized between each of the multiple client devices102.

Content management system106can include a communications interface120for interfacing with various client devices102, and can interact with other content and/or service providers1091,1092, . . . ,109n(collectively “109”) via an Application Programming Interface (API). Certain software applications can access content storage160via an API on behalf of a user. For example, a software package, such as an app on a smartphone or tablet computing device, can programmatically make calls directly to content management system106, when a user provides credentials, to read, write, create, delete, share, or otherwise manipulate content. Similarly, the API can allow users to access all or part of content storage160through a web site.

Content management system106can also include authenticator module126, which can verify user credentials, security tokens, API calls, specific client devices, and so forth, to ensure only authorized clients and users can access files. Further, content management system106can include analytics module134that can track and report on aggregate file operations, user actions, network usage, total storage space used, as well as other technology, usage, or business metrics. A privacy and/or security policy can prevent unauthorized access to user data stored with content management system106.

Content management system106can include sharing module130for managing sharing content publicly or privately. Sharing content publicly can include making the content item accessible from any computing device in network communication with content management system106. Sharing content privately can include linking a content item in content storage160with two or more user accounts so that each user account has access to the content item. The sharing can be performed in a platform agnostic manner. That is, the content can be shared across multiple client devices102of varying type, capabilities, operating systems, etc. The content can also be shared across varying types of user accounts.

In some embodiments, content management system106can include a content management module128for maintaining a content directory. The content directory can identify the location of each content item in content storage160. The content directory can include a unique content entry for each content item stored in the content storage.

A content entry can include a content path that can be used to identify the location of the content item in a content management system. For example, the content path can include the name of the content item and a folder hierarchy associated with the content item. For example, the content path can include a folder or path of folders in which the content item is placed as well as the name of the content item. Content management system106can use the content path to present the content items in the appropriate folder hierarchy.

A content entry can also include a content pointer that identifies the location of the content item in content storage160. For example, the content pointer can include the exact storage address of the content item in memory. In some embodiments, the content pointer can point to multiple locations, each of which contains a portion of the content item.

In addition to a content path and content pointer, a content entry can also include a user account identifier that identifies the user account that has access to the content item. In some embodiments, multiple user account identifiers can be associated with a single content entry indicating that the content item has shared access by the multiple user accounts.

To share a content item privately, sharing module130can be configured to add a user account identifier to the content entry associated with the content item, thus granting the added user account access to the content item. Sharing module130can also be configured to remove user account identifiers from a content entry to restrict a user account's access to the content item.

To share content publicly, sharing module130can be configured to generate a custom network address, such as a uniform resource locator (URL), which allows any web browser to access the content in content management system106without any authentication. To accomplish this, sharing module130can be configured to include content identification data in the generated URL, which can later be used to properly identify and return the requested content item. For example, sharing module130can be configured to include the user account identifier and the content path in the generated URL. Upon selection of the URL, the content identification data included in the URL can be transmitted to content management system106which can use the received content identification data to identify the appropriate content entry and return the content item associated with the content entry.

In addition to generating the URL, sharing module130can also be configured to record that a URL to the content item has been created. In some embodiments, the content entry associated with a content item can include a URL flag indicating whether a URL to the content item has been created. For example, the URL flag can be a Boolean value initially set to 0 or false to indicate that a URL to the content item has not been created. Sharing module130can be configured to change the value of the flag to 1 or true after generating a URL to the content item.

In some embodiments, sharing module130can also be configured to deactivate a generated URL. For example, each content entry can also include a URL active flag indicating whether the content should be returned in response to a request from the generated URL. For example, sharing module130can be configured to only return a content item requested by a generated link if the URL active flag is set to 1 or true. Thus, access to a content item for which a URL has been generated can be easily restricted by changing the value of the URL active flag. This allows a user to restrict access to the shared content item without having to move the content item or delete the generated URL. Likewise, sharing module130can reactivate the URL by again changing the value of the URL active flag to 1 or true. A user can thus easily restore access to the content item without the need to generate a new URL.

While content management system106is presented with specific components, it should be understood by one skilled in the art, that the architectural configuration of system106is simply one possible configuration and that other configurations with more or less components are also possible. For example, the sharing module130may be an optional component if sharing data is not desired or necessary, or an additional component for interfacing with social networks may be included.

Having discussed the basic architecture of content management system106, the disclosure returns now to a discussion of a simplified and more flexible interface for handling incomplete database queries.FIG. 2shows an example configuration200of a web server with a database interface. In this configuration200, client device202, such as a desktop computer, smartphone, or tablet computing device, can access web server206via web browser204. Web server206can provide a web form to a user for submitting a database query through web browser204. The user can fill out as many fields in the form as the user is able, and submit the form to web server206through web browser204. Web server206can receive the form and can pass the submitted information to query processor208. Query processor208can include modules such as parser210, analyzer212, selector214, translator216, presenter218, and cache220. Parser210can parse the submitted fields to extract relevant information. For example, simple parser210can split a comma-delimited list by dividing the list into elements using commas as boundaries, whereas a more complex parser210can apply natural language processing to the fields to determine what the user intended based on the information submitted through the web form.

After parser210extracts information from the query, analyzer212can determine which pieces of information are missing or incomplete. For example, analyzer212can apply one of a set of templates of properly formed queries to determine which pieces of information are missing. In another example, analyzer212can attempt to execute a query against database222, and if the query is successful, query processor208can return those results to web browser204. If the query is unsuccessful, analyzer212can examine any errors or messages from database222to determine which pieces of information are missing or incomplete. When missing information is identified, such as a particular data source or a date range, selector214can examine other information to determine what the value of the missing information should be. For example, selector214can determine based on a search history for that user that a missing or unspecified date range is likely to be the second quarter of 2012, and use appropriate date ranges for the query. After values for missing information are determined and optionally satisfy a data quality threshold, query processor208can store the determined values in cache220for reuse with the same or similar queries. The data quality threshold can be determined based on relevance of the results to the query, based on user input indicating quality of the query results, or based on observing user behavior. For example, if the user submits a first query, receives results from that query, and immediately afterwards submits a query that corrects a guessed value for a piece of missing information, the system can determine that the guessed value was incorrect and discard that value from the cache.

In some cases, the query is submitted in a generic format or in some other format incompatible with database222. Translator216can adapt one or more portions of the query submitted from the user to be compatible with database222. After query processor208appropriately submits the query to database222and receives results, presenter218can coordinate with web server206to present the results to the user through web browser204. Presenter218can provide the results in other ways as well, such as sending an email with the results attached, or writing the query results in to a log file. In one example, presenter218can provide, in addition to query results, a complete version of the query that was submitted so that the user can view what changes or additions were made to the originally submitted query. In this case, the user can directly modify the complete version of the query and resubmit. This can serve as a way to train or teach users. A user may not know the format for a parameter or even that a particular parameter exists. However, when the user submits an incomplete query and can view a corresponding completed query, the user can learn how to submit better queries over time.

FIG. 3shows an example web browser300with uniform resource locator (URL)304in address bar302. In this example, the user submits a query as part of the URL, with the query parameters submitted as arguments in the URL. The user can manually enter the URL and arguments or the user can fill out a form to generate the URL. The URL can be programmatically generated on behalf of a user. When the URL including arguments is submitted to the web server, the web server serves a page in response, which includes at least part of the results of the query presented as various charts306,308,310, tables, images, video, or other output formats. When the results reflect multiple different types of data, the page served in response can include multiple different types of charts for the different data types. The system can determine which types of charts to present to the user based on the resulting data set, or based on user preferences, non-query arguments in the URL, and so forth. The system can determine not only the type of the charts to use for presenting the results, but can also determine a layout of the web page. For example, the system can generate a particular two-column view when the results are easily divisible into two sections. As another example, the system can generate a broad chart at the top of the page, a more detailed chart below that, and an even more detailed chart below that. In one example, the system can generate multiple potential layouts based on the results, and provide the user with an option to switch between the multiple potential layouts. Then the user can ‘pin’ one of the potential layouts as a preferred layout for presenting later results. The page can display charts as text in a table, as static elements such as bitmap or vector images, or as dynamic or interactive elements such as components authored using Adobe® Flash® or Microsoft® Silverlight™. The system can present the query results in a native format, such as if the query results are video, the system can present one or more of the video results so the user can browse the videos.

FIG. 4shows an example conversion of a uniform resource locator to a database query, such as translator216ofFIG. 2may perform. In this example, the user submits a URL400with a first argument of “signups” and a second argument of “Luxembourg”. Translator216can convert those arguments, based on order or label, to specific fields in database query402. In this example, the first argument “signups” is inserted into the SELECT FROM field, and the second argument is inserted into the WHERE signup.country=field. This example further shows the addition of a date range that was not specified in submitted URL400.

FIG. 5shows an example method embodiment for executing a database query based on an incomplete query. An example system configured to practice the method can receive a web request, wherein a uniform resource locator (URL) of the web request provides an argument, and extract the argument from the URL as a parameter for a database query (502). Arguments can include database query parameters or parameters describing how to display results, such as a data type, a data category, a time window, a priority, a graph type, a chart type, a table type, or a database. The system can identify an unspecified parameter in the database query (504), and select a likely value for the unspecified parameter (506) based on at least one of a predefined rule, a heuristic, an analysis of a statistical model, or information contained in the web request. An example statistical model can be based on past user input, user feedback, or log data. The system can select the likely value for the unspecified parameter further based on a data source associated with the database query, such as a production system, a logging module, an analytics module, or some other external source.

Then the system can execute the database query using the parameter and the likely value (508) for the unspecified parameter to yield a query result, and incorporate at least part of the query result in a web page served in response to the web request (510). The system can optionally select a presentation structure for the query result within the web page (512). The presentation structure can include at least one of a number of a statistical graphical representation, a layout of the statistical graphical representation, whether to stack the statistical graphical representation, or a type of the statistical graphical representation such as a graph, chart, table, or list. The system can cache the web request and the likely value for the unspecified parameter for later use514.

The query results can include additional data related to the web request but not specifically requested through the web request. The system can incorporate specifically requested query results in the web page so that more relevant data is presented in a more visible way than less relevant data, such as by presenting the relevant data in a larger chart, or placing the relevant data in a higher position on the web page.

FIGS. 6 and 7show exemplary possible system embodiments. The more appropriate embodiment will be apparent to those of ordinary skill in the art when practicing the present technology. Persons of ordinary skill in the art will also readily appreciate that other system embodiments are possible.

FIG. 6shows a conventional system bus computing system architecture600wherein the components of the system are in electrical communication with each other using a bus605. Exemplary system600includes a processing unit (CPU or processor)610and a system bus605that couples various system components including the system memory615, such as read only memory (ROM)620and random access memory (RAM)625, to the processor610. The system600can include a cache of high-speed memory connected directly with, in close proximity to, or integrated as part of the processor610. The system600can copy data from the memory615and/or the storage device630to the cache612for quick access by the processor610. In this way, the cache can provide a performance boost that avoids processor610delays while waiting for data. These and other modules can control or be configured to control the processor610to perform various actions. Other system memory615may be available for use as well. The memory615can include multiple different types of memory with different performance characteristics. The processor610can include any general purpose processor and a hardware module or software module, such as module1632, module2634, and module3636stored in storage device630, configured to control the processor610as well as a special-purpose processor where software instructions are incorporated into the actual processor design. The processor610may essentially be a completely self-contained computing system, containing multiple cores or processors, a bus, memory controller, cache, etc. A multi-core processor may be symmetric or asymmetric.

Storage device630is a non-volatile memory and can be a hard disk or other types of computer readable media which can store data that are accessible by a computer, such as magnetic cassettes, flash memory cards, solid state memory devices, digital versatile disks, cartridges, random access memories (RAMs)625, read only memory (ROM)620, and hybrids thereof.

The storage device630can include software modules632,634,636for controlling the processor610. Other hardware or software modules are contemplated. The storage device630can be connected to the system bus605. In one aspect, a hardware module that performs a particular function can include the software component stored in a computer-readable medium in connection with the necessary hardware components, such as the processor610, bus605, display635, and so forth, to carry out the function.

FIG. 7shows a computer system750having a chipset architecture that can be used in executing the described method and generating and displaying a graphical user interface (GUI). Computer system750is an example of computer hardware, software, and firmware that can be used to implement the disclosed technology. System750can include a processor755, representative of any number of physically and/or logically distinct resources capable of executing software, firmware, and hardware configured to perform identified computations. Processor755can communicate with a chipset760that can control input to and output from processor755. In this example, chipset760outputs information to output765, such as a display, and can read and write information to storage device770, which can include magnetic media, and solid state media, for example. Chipset760can also read data from and write data to RAM775. A bridge780for interfacing with a variety of user interface components785can be provided for interfacing with chipset760. Such user interface components785can include a keyboard, a microphone, touch detection and processing circuitry, a pointing device, such as a mouse, and so on. In general, inputs to system750can come from any of a variety of sources, machine generated and/or human generated.

Chipset760can also interface with one or more communication interfaces790that can have different physical interfaces. Such communication interfaces can include interfaces for wired and wireless local area networks, for broadband wireless networks, as well as personal area networks. Some applications of the methods for generating, displaying, and using the GUI disclosed herein can include receiving ordered datasets over the physical interface or be generated by the machine itself by processor755analyzing data stored in storage770or775. Further, the machine can receive inputs from a user via user interface components785and execute appropriate functions, such as browsing functions by interpreting these inputs using processor755.

It can be appreciated that exemplary systems600and750can have more than one processor610or be part of a group or cluster of computing devices networked together to provide greater processing capability.