Pattern recognition in application database queries with scheduled pre-cached data retrieval
Technologies directed to pattern recognition in application database queries with scheduled pre-cached data retrieval are described. One method identifies, using a machine learning (ML) model, a query pattern from a set of historical data queries directed to one or more target databases. Each of the historical data queries includes parameters, including a temporal range to retrieve data corresponding to a specific period. The method retrieves, according to the query pattern, pre-retrieved data from the one or more target databases, storing the pre-retrieved data in a cache server. The method receives a subsequent data query from an application after retrieving the pre-retrieved data. The method determines that the subsequent data query matches the query pattern. The method retrieves the pre-retrieved data corresponding to the subsequent data query from the cache server. The method sends the pre-retrieved data corresponding to the subsequent data query to the application.
1 . A method comprising:
receiving, by a computer system, a plurality of data queries from one or more applications directed to a target database, wherein each data query of the plurality of data queries comprises a plurality of parameters, wherein at least one parameter of the plurality of parameters comprises a temporal range to retrieve data corresponding to a specific period, wherein the receiving the plurality of data queries from one or more applications comprises receiving a plurality of application programming interface (API) calls from the one or more applications;
in response to receiving the plurality of data queries:
storing a copy of each data query of the plurality of data queries in a data store of the computer system;
identifying, using a machine learning (ML) model executed on the computer system and the plurality of parameters, a query pattern in the copies of the plurality of data queries in the data store;
creating, by the computer system, a scheduled task for the query pattern to retrieve pre-retrieved data from the target database;
retrieving, using the scheduled task, the pre-retrieved data from the target database and storing the pre-retrieved data in a cache server;
receiving a subsequent data query from an application after the retrieving the pre-retrieved data, wherein receiving the subsequent data query comprises receiving a subsequent API call of the plurality of API calls from the one or more applications;
determining that the subsequent data query matches the query pattern;
retrieving the pre-retrieved data corresponding to the subsequent data query from the cache server; and
sending the pre-retrieved data corresponding to the subsequent data query to the application.
2 . The method of claim 1 , wherein the temporal range comprises at least one of a time range or a date range.
3 . The method of claim 1 , further comprising:
identifying, using the ML model and the plurality of parameters, a second query pattern in the copies of the plurality of data queries in the data store;
creating a second scheduled task for the second query pattern to retrieve second pre-retrieved data from the target database; and
retrieving, using the second scheduled task, the second pre-retrieved data from the target database and storing the second pre-retrieved data in the cache server.
4 . The method of claim 3 , further comprising:
receiving a second subsequent data query from a second application after retrieving the second pre-retrieved data;
determining that the second subsequent data query matches the second query pattern;
retrieving the second pre-retrieved data corresponding to the second subsequent data query from the cache server; and
sending the second pre-retrieved data corresponding to the second subsequent data query to the second application.
5 . A computing system comprising:
one or more processors; and
one or more memories storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
receiving, by a computer system, a plurality of data queries from one or more applications directed to a target database, wherein each data query of the plurality of data queries comprises a plurality of parameters, wherein at least one parameter of the plurality of parameters comprises a temporal range to retrieve data corresponding to a specific period, and wherein receiving the plurality of data queries from one or more applications comprises receiving a plurality of application programming interface (API) calls from the one or more applications;
in response to receiving the plurality of data queries:
storing a copy of each data query of the plurality of data queries in a data store of the computer system;
identifying, using a machine learning (ML) model executed on the computer system and the plurality of parameters, a query pattern in the copies of the plurality of data queries in the data store;
creating, by the computer system, a scheduled task for the query pattern to retrieve pre-retrieved data from the target database;
retrieving, using the scheduled task, the pre-retrieved data from the target database and storing the pre-retrieved data in a cache server;
receiving a subsequent data query from an application after retrieving the pre-retrieved data, wherein receiving the subsequent data query comprises receiving a subsequent API call of the plurality of API calls from the one or more applications;
determining that the subsequent data query matches the query pattern;
retrieving the pre-retrieved data corresponding to the subsequent data query from the cache server; and
sending the pre-retrieved data corresponding to the subsequent data query to the application.
6 . The computing system of claim 5 , wherein the operations performed by the one or more processors are executed in an automation and analytics platform associated with a cellular network, the automation and analytics platform comprising the ML model.
7 . The computing system of claim 5 , wherein the temporal range comprises at least one of a time range or a date range.
8 . The computing system of claim 5 , wherein the instructions cause the one or more processors to perform further operations comprising:
identifying, using the ML model and the plurality of parameters, a second query pattern in the copies of the plurality of data queries in the data store;
creating a second scheduled task for the second query pattern to retrieve second pre-retrieved data from the target database; and
retrieving, using the second scheduled task, the second pre-retrieved data from the target database and storing the second pre-retrieved data in the cache server.
9 . The computing system of claim 8 , wherein the instructions cause the one or more processors to perform further operations comprising:
receiving a second subsequent data query from a second application after retrieving the second pre-retrieved data;
determining that the second subsequent data query matches the second query pattern;
retrieving the second pre-retrieved data corresponding to the second subsequent data query from the cache server; and
sending the second pre-retrieved data corresponding to the second subsequent data query to the second application.
10 . A device comprising:
a processor; and
memory storing instructions that, when executed by the processor, cause the processor to perform operations comprising:
receiving, by a computer system, a plurality of data queries from one or more applications directed to a target database, wherein each data query of the plurality of data queries comprises a plurality of parameters, wherein at least one parameter of the plurality of parameters comprises a temporal range to retrieve data corresponding to a specific period, and wherein receiving the plurality of data queries from one or more applications comprises receiving a plurality of application programming interface (API) calls from the one or more applications;
in response to receiving the plurality of data queries:
storing a copy of each data query of the plurality of data queries in a data store of the computer system;
identifying, using a machine learning (ML) model executed on the computer system and the plurality of parameters, a query pattern in the copies of the plurality of data queries in the data store;
creating, by the computer system, a scheduled task for the query pattern to retrieve pre-retrieved data from the target database;
retrieving, using the scheduled task, the pre-retrieved data from the target database and storing the pre-retrieved data in a cache server;
receiving a subsequent data query from an application after retrieving the pre-retrieved data, wherein receiving the subsequent data query comprises receiving a subsequent API call of the plurality of API calls from the one or more applications;
determining that the subsequent data query matches the query pattern;
retrieving the pre-retrieved data corresponding to the subsequent data query from the cache server; and
sending the pre-retrieved data corresponding to the subsequent data query to the application.
11 . The device of claim 10 , wherein the operations performed by the processor are executed in an automation and analytics platform associated with a cellular network, the automation and analytics platform comprising the ML model.
12 . The device of claim 10 , wherein the temporal range comprises at least one of a time range or a date range.
13 . The device of claim 10 , wherein the instructions cause the processor to perform further operations comprising:
identifying, using the ML model and the plurality of parameters, a second query pattern in the copies of the plurality of data queries in the data store;
creating a second scheduled task for the second query pattern to retrieve second pre-retrieved data from the target database; and
retrieving, using the second scheduled task, the second pre-retrieved data from the target database and storing the second pre-retrieved data in the cache server.
14 . The device of claim 13 , wherein the instructions cause the processor to perform further operations comprising:
receiving a second subsequent data query from a second application after retrieving the second pre-retrieved data;
determining that the second subsequent data query matches the second query pattern;
retrieving the second pre-retrieved data corresponding to the second subsequent data query from the cache server; and
sending the second pre-retrieved data corresponding to the second subsequent data query to the second application.