Techniques for making machine learning inference calls for database query processing are described. In some embodiments, a method of making machine learning inference calls for database query processing may include generating a first batch of machine learning requests based at least on a query to be performed on data stored in a database service, wherein the query identifies a machine learning service, sending the first batch of machine learning requests to an input buffer of an asynchronous request handler, the asynchronous request handler to generate a second batch of machine learning requests based on the first batch of machine learning requests, and obtaining a plurality of machine learning responses from an output buffer of the asynchronous request handler, the machine learning responses generated by the machine learning service using a machine learning model in response to receiving the second batch of machine learning requests.
Drawings
Claims20
A computer-implemented method comprising:
receiving a request at a database service, wherein the request includes a structured query language (SQL) query to be performed on at least a portion of data stored in the database service, and wherein the request identifies a machine learning (ML) service to be used in processing the SQL query using an application programming interface (API) call to the ML service, and wherein the ML service publishes the API to perform inference using a ML model in response to requests;
executing at least a portion of the SQL query on the data stored in the database service to generate a first batch of ML requests;
generating a second batch of ML requests based on the first batch of ML requests and based on the ML service;
and
obtaining ML responses generated by the ML service using the ML model in response to receiving the second batch of ML requests.
2 more elements
A computer-implemented method comprising:
generating a first batch of machine learning (ML) requests by executing at least a portion of a structured query language (SQL) query on data stored in a database service of a provider network, wherein the SQL query is to be processed by a machine learning (ML) service of the provider network in response to an application programming interface (API) call to the ML service, and wherein the ML service publishes the API to perform inference using a ML model in response to requests;
generating a second batch of ML requests based on the first batch of ML requests and based on the ML service;
and
obtaining ML responses generated by the ML service using the ML model in response to receiving the second batch of ML requests.
1 more element
A system comprising:
a machine learning (ML) service implemented by a first one or more electronic devices in a provider network;
and
a database service implemented by a second one or more electronic devices in the provider network, the second one or more electronic devices including one or more processors and memory, the database service including instructions stored in the memory that, upon execution by the one or more processors, cause the database service to:
generate a first batch of machine learning (ML) requests by executing at least a portion of a structured query language (SQL) query on data stored in the database service, wherein the SQL query is to be processed by the ML service in response to an application programming interface (API) call to the ML service, and wherein the ML service publishes the API to perform inference using a ML model in response to requests;
generate a second batch of ML requests based on the first batch of ML requests and based on the ML service;
and
obtain ML responses generated by the ML service using the ML model in response to receiving the second batch of ML requests.
20 Sep 2039Estimated · howhide20 years from earliest known nonprovisional domestic filing plus recorded patent term adjustment. Maintenance-fee lapses, terminal disclaimers and statutory extensions have not been checked. The continuity chain may be incomplete; this is not an enforceability determination.
About 12 years 11 months of term left · ends 20 Sep 2039 (estimated)
Priority20 Sep 2019
Filed10 Aug 2022
Granted3 Oct 2023
Today12 Oct 2026
Term ends20 Sep 2039
Priority20 Sep 2019
Granted3 Oct 2023
Term ends20 Sep 2039
Priority claimedParent application 16/578,060
Application filedUS 17/884,955
GrantedUS 11,775,868 B1
TodayWithin its term
Term endsEstimated
Description17,475 words
Summary249 words
#The field of machine learning has become widely acknowledged as a likely significant driver of the future of technology. Organizations everywhere now seek to use machine learning techniques to address a wide variety of problems, such as optimizing aspects of their products, processes, customer experience, etc. While the high-level view of machine learning sounds simple—e.g., provide training data to a computer, to allow the computer to automatically learn from the training data to generate a model that can make predictions for other data—implementing machine learning techniques in practice can be tremendously difficult.
#This difficulty is partially due to the underlying algorithmic and mathematical complexities of machine learning algorithms, which are typically developed by academic researchers or individuals at the forefront of the field. Additionally, it is also difficult to generate, update, and deploy useful models, which can be extremely time and resource consumptive and filled with complexities. Moreover, machine learning models tend to be extremely focused on particular use cases and operating environments, and thus any change to the underlying environment or use case may require a complete regeneration of a new model. Further, constructing and deploying machine learning technologies is quite different from traditional software engineering, and requires practices and architectures different from what traditional software engineering development teams are familiar with. While machine learning techniques provide many benefits to organizations, use of such machine learning techniques requires significant specialized knowledge that is not easy to use with traditional data processing using relational databases and other data stores.
Brief description of the drawings10 figures
#Various embodiments in accordance with the present disclosure will be described with reference to the drawings, in which:
#FIG. 1 is a diagram illustrating an environment for machine learning inference calls for database query processing according to some embodiments.
#FIG. 2 is a diagram illustrating an asynchronous request handler according to some embodiments.
Detailed description16,994 words
#The present disclosure relates to methods, apparatus, systems, and non-transitory computer-readable storage media for machine learning inference calls for database query processing According to some embodiments, machine learning inference calls can be integrated into database queries to enable the use of machine learning techniques without requiring specialized machine learning knowledge on the part of users. In some embodiments, machine learning calls can be integrated into database queries, such as structure query language (SQL) queries, or other popular query languages used to process structured data, without requiring significant changes to applications, database services, etc.
#FIG. 1 is a diagram illustrating an environment for machine learning inference calls for database query processing according to some embodiments. As shown in FIG. 1, a provider network 100 can include a database service 112. A user may have structured data which is stored in one or more database instances 110 of database service 112. The data may be added to the database service by the user, from user device 102 or may be added from services of provider network 100 or other services external to provider network 100. This data may be analyzed to obtain useful information for the user. A part of this analysis may include using machine learning techniques to perform inference on the data. For example, text data may be extracted from images stored in database service 112, text data may be analyzed to identify sentiments associated with snippets of the text data, and/or other specialized models may be used to perform inference on the user's data to obtain information about the data. However, as discussed, use of machine learning techniques often requires specialized knowledge and is not well integrated into data management services, such as database service 112. Embodiments address these issues by providing techniques for making machine learning inference calls for database query processing.
#A provider network 100 (or, “cloud” provider network) provides users with the ability to utilize one or more of a variety of types of computing-related resources such as compute resources (e.g., executing virtual machine (VM) instances and/or containers, executing batch jobs, executing code without provisioning servers), data/storage resources (e.g., object storage, block-level storage, data archival storage, databases and database tables, etc.), network-related resources (e.g., configuring virtual networks including groups of compute resources, content delivery networks (CDNs), Domain Name Service (DNS)), application resources (e.g., databases, application build/deployment services), access policies or roles, identity policies or roles, machine images, routers and other data processing resources, etc. These and other computing resources may be provided as services, such as a hardware virtualization service that can execute compute instances, a storage service that can store data objects, etc. The users (or “customers”) of provider networks 100 may utilize one or more user accounts that are associated with a customer account, though these terms may be used somewhat interchangeably depending upon the context of use. Users may interact with a provider network 100 across one or more intermediate networks 106 (e.g., the internet) via one or more interface(s) 104, such as through use of application programming interface (API) calls, via a console implemented as a website or application, etc. The interface(s) 104 may be part of, or serve as a front-end to, a control plane 102 of the provider network 100 that includes “backend” services supporting and enabling the services that may be more directly offered to customers.