Handling complex database queries

By combining the cache and the database in the database system, using the cache to quickly respond to the non-last query and verify the data validity of the last query, the problem of complex database request response time delay is solved, and data accuracy and response time are improved. optimization.

CN113490931BActive Publication Date: 2024-09-24AMADEUS SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080017149.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-02-14
Filing Date
2020-02-13
Publication Date
2024-09-24
Estimated Expiration
2040-02-13

AI Technical Summary

Technical Problem

When the existing technology handles complex database requests, it is difficult to reduce the response time without damaging the validity of the data. Especially in multiple database query scenarios, the inconsistency between cache data and database data leads to response delays.

Method used

By combining the cache and the database in the database system, the cache is used to quickly respond to the non-last query, and the validity of the cached data is verified at the time of the last query to ensure the accuracy of the returned data and the optimization of the response time.

Benefits of technology

It effectively reduces the total response time of complex database requests, ensures the accuracy and validity of data, and saves database computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113490931B_ABST
    Figure CN113490931B_ABST
Patent Text Reader

Abstract

A plurality of database queries forming a complex database request are processed. A first query and a second query are answered by a first response and a second response based on a cache storing cache data. A third query related to the second query is answered based on a database storing current data corresponding to the cache data. A selected subset of the cache data returned with the second response is validated by corresponding current data stored in the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present description relates generally to database technology and, more particularly, to systems and methods for processing complex database requests that include multiple separate database queries. Background Art

[0002] Various systems are known for receiving database queries from clients and forwarding or distributing the queries to further back-end systems. An example is a load handling engine that distributes incoming queries to databases that are less loaded than other databases. Another example is a search platform, such as described by EP 2908255 A1, which is either based on a cache with pre-collected search results and / or responds to queries from a primary data source.

[0003] WO 2015 / 110133 A1 describes an example of a system that uses a complex database request including more than one database query. Here, the complex database query includes a pricing request from a client, a pricing response returned to the client, a reservation request from the client, and a reservation response returned to the client.

[0004] There is a need to reduce the response time of such complex database requests without compromising the validity of the returned database results. Summary of the invention

[0005] In this regard, according to one aspect, a method for processing data queries is provided. The method is performed by a database system, the database system including a database storing current data that is continuously updated and a cache storing cache data corresponding to at least a subset of the current data stored in the database. The method includes, at the database system: in response to receiving a first query including a first search parameter set specifying data to be retrieved, returning a first cache data set from the cache according to the first search parameter; in response to receiving a second query related to the first query, the second query including a second search parameter set specifying data to be retrieved and indicating a selected subset of the first cache data set to be returned, returning a second cache data set from the cache according to the second search parameter set; in response to receiving a third query related to the second query, the third query including a third search parameter set specifying data to be retrieved, the third search parameter set indicating a selected subset of the second cache data set to be returned; retrieving a third current data set from the database according to the third search parameter set; validating the selected subset of the returned second cache data set with the corresponding current data stored in the database; and returning the retrieved third current data set according to the third search parameter set and the validated selected subset of the returned second cache data.

[0006] In some embodiments, the database system also includes a front-end module for processing at least the second query and the third query, and the method also includes, at the front-end module: in response to receiving the second query, directing the second query to the cache to retrieve a second cache data set; in response to receiving the third query, determining that the third query is related to the previous second request and directing the third query to the database to retrieve a third current data set and verifying a selected subset of the returned second cache data set.

[0007] In some embodiments, the method also includes, at the front-end module: receiving a second cache data set from the cache and sending a response message with the second cache data set to the query client; receiving a retrieved third current data set and a verified selected subset of the returned second cache data set from the database, and sending a response message with the retrieved third current data set and a verified selected subset of the returned second cache data set to the query client.

[0008] In some embodiments, verifying the selected subset of the returned second cache data set with corresponding current data stored in a database includes determining whether the current data stored in the database corresponding to the selected subset of the returned second cache data set is exactly the same as the selected subset of the returned second cache data set, and the method also includes: in response to determining that the current data stored in the database corresponding to the selected subset of the returned second cache data set is exactly the same as the selected subset of the returned second cache data set, returning a validity indicator as the verified selected subset of the returned second cache data set.

[0009] In some embodiments, the method further includes, in response to determining that current data stored in a database corresponding to a selected subset of the returned second cache data set is different from the selected subset of the returned second cache data set, returning the determined difference between the returned second cache data set and the current data stored in the database corresponding to the selected subset of the returned second cache data set as a verified selected subset of the returned second cache data set.

[0010] In some embodiments, the cache and database store data about a communication network infrastructure, the communication network infrastructure including network nodes of the communication network, links between nodes of the communication network, and technical information about nodes of the communication network and links between nodes of the communication network, and wherein the first, second, and third queries are part of a network routing request. A first search parameter set for the first query specifies network node characteristics of a potential target network node to be communicated with, and the first cache data set includes identification information and characteristic information of a plurality of network nodes that meet the specified network characteristics. A second search parameter set for the second query includes an identification of a selected target network node of the plurality of network nodes, and the second cache data set includes identification information and technical information about a plurality of forward network paths from a source network node to a selected target network via links between nodes of the communication network. A third search parameter set includes an identification of a selected forward network path of a plurality of forward network paths from a source network node to a selected target network via links between nodes of the communication network, and a third current data set includes identification information and technical information about a plurality of reverse network paths from a target network node to a source network node via links between nodes of the communication network.

[0011] According to another aspect, a database system for processing data queries is provided. The database system includes: a database storing current data that is continuously updated; a cache storing cache data corresponding to at least a subset of the current data stored in the database; at least one processor; and at least one memory containing instructions that, when executed by the at least one processor, cause the database system to perform operations. These operations include: in response to receiving a first query including a first set of search parameters specifying data to be retrieved, returning a first set of cached data from a cache based on the first search parameters; in response to receiving a second query related to the first query, the second query including a second set of search parameters specifying data to be retrieved and indicating a selected subset of the first set of cached data to be returned, returning a second set of cached data from the cache based on the second set of search parameters; in response to receiving a third query related to the second query, the third query including a third set of search parameters specifying data to be retrieved, the third set of search parameters indicating a selected subset of the second set of cached data to be returned; retrieving a third set of current data from a database based on the third set of search parameters; validating the selected subset of the returned second set of cached data using corresponding current data stored in the database; and returning the retrieved third set of current data based on the third set of search parameters and the validated selected subset of the returned second set of cached data.

[0012] Additionally, in some embodiments, the operations include any of the further optional method aspects mentioned above.

[0013] According to yet another aspect, a computer program product is provided, comprising program code instructions stored on a computer readable medium for performing the method according to any of the above-mentioned aspects when said program is executed on a computer. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Embodiments are described with reference to the following drawings, in which:

[0015] Figure 1 A database system according to various aspects presented herein is described.

[0016] Figure 2 The message sequence for a complex database request is shown.

[0017] Figure 3 Visualize the functional structure of the front-end module as described in this article.

[0018] Figure 4 Depicted Figure 2 A condensed version of the message sequence.

[0019] Figure 5 The diagram illustrates a network routing use case for the approach described herein.

[0020] Figure 6 Shown are the internal components of a computer machine that implements the functions described herein. DETAILED DESCRIPTION

[0021] The presented mechanism for handling data queries involves a communication system 1 having a database system 2 . Figure 1 An illustrative example is shown in FIG. The database system 2 comprises a database 5 storing at least current data that is continuously updated and a cache 4 storing cache data corresponding to at least a subset of the current data stored in the database 5. The term "database" is intended to cover any type of structured information storage system, such as a standard stand-alone database such as SQL (SQL = Structured Query Language) or Databases and more complex distributed and / or proprietary storage systems (e.g. or or Horton Hadoop, Spark, Hive, Apache The database 5 may include a relational database or an object-oriented database including a distributed file system (HDFS), etc. The database 5 utilizes processing and memory resources to process and respond to database queries and store data. The database 5 may be executed by one or more computing machines.

[0022] The cache 4 may be implemented as an additional database (in addition to the database 5) on a different and / or the same computing machine as the database 5. In some embodiments, the cache 4 may also be a logical cache, i.e., the data of the cache 4 is stored in a respectively assigned area of ​​the memory of the hardware machine(s) hosting the database 5.

[0023] The database 5 stores data that are generally the latest and thus form original or valid data. For this reason, the database 5 can be equipped with an interface to update the data stored in the database 5. This interface can be the same as the interface that receives and responds to database queries. The data stored by the database 5 is continuously kept updated, which means that any change of the data is actually implemented in the database 5, for example, based on events or periodically. Therefore, the database 5 is either an original data source itself, such as an inventory database or a database that maintains any type of original and generally valid results, or accesses one or more original data sources to store the original results in exactly the same (mirror) or processed form. An example of the latter is a computing platform for travel recommendations based on the fare calculation pricing stored in the fare database and a search engine that accesses an Internet website. If the database 5 generates / calculates / collects original results by accessing other / additional original data sources to prepare the original results, then the database 5 provides the result of the current content of the original response data that generally accurately reflects.

[0024] On the other hand, the cache 4 stores cache data corresponding to at least a subset of the data stored in the database 5. In other words, the cache 4 maintains a pool of results that have been processed via the database 5, or is for example a server holding a repository of the contents of crawled websites, or the second platform 4 is for example a search platform maintaining pre-computed priced travel recommendations, such as described in WO 2014 / 026753 A1.

[0025] Generally speaking, the database 5 providing the original response data and the cache 4 maintaining the cached results differ from each other in technical terms as follows: the cache 4 provides cheaper (in terms of computational cost) and faster (in terms of response time) access to the results than the database 5. This relationship between the database 5 and the cache 4 can also be expressed in reverse, i.e. the database 5 generally responds more slowly and the responses from the database 5 involve higher computational costs than the responses from the cache 4, e.g. because the database 5 still needs to compute the results at the time of the query (e.g. retrieving the requested content from the original Internet website, or calculating the requested priced travel recommendations given the fares held in the fare database). Since the computational resources of the database 5 are limited, the number of accesses to the database 5 should be kept within certain limits. For example, the CPU consumption (CPU = Central Processing Unit) or the memory burden of the database 5 should not exceed given limits.

[0026] However, on the other hand, the cache data stored in the cache 4 is not necessarily completely synchronized with the original results provided by the database 5. In general, the cache data of the cache 4 represents an older version of the original results provided by the database 5, and the corresponding version of the original results provided by the database 5 may have changed since the corresponding cache data maintained in the cache 4 was last updated. In addition, the cache 4 does not necessarily store prepared results corresponding to all existing original results, that is, data may be missing in the cache 4.

[0027] Therefore, a technical problem arises of minimizing the response time of database requests while not compromising the accuracy and validity of the data returned.

[0028] The database environment 1 is also coupled to at least one but generally a plurality of clients 6. The client 6, such as an application on a user terminal, retrieves results from the database environment 1 by directing data requests to the database environment 1 via an interface 7. The technical characteristics of the interface 7 depend on the specific implementation of the database environment 1. For example, the interface 7 covers wireless communications, including 2G / 3G / 4G (including packet-oriented mobile data exchange and SMS, Short Message Service) and / or Wi-Fi communications in the case where the client 6 is located on a mobile communication device. Alternatively or in addition, the interface 7 is characterized by wired communications using standard network protocols employed in local area networks and / or wide area networks including the Internet, such as Ethernet, TCP / IP (Transmission Control Protocol / Internet Protocol), SMTP (Simple Mail Transfer Protocol) with POP3 (Post Office Protocol) or IMAP (Internet Message Access Protocol), HTTP (Hypertext Transfer Protocol), protocols related to web services (such as SOAP (Simple Object Access Protocol)), etc.

[0029] The sequence of individual messages that make up a complex database request is represented by Figure 2 . The term "database request" is used herein as a generic term for logical data retrieval from the database system 2. The present mechanism specifically relates to complex database requests, according to which the data retrieved from the database system 2 includes two, three or more subsequent individual database queries sent from the data requesting client 6 and received at the database system 2. The multiple database queries that constitute the complex database request can be any type of transaction query, request for batch calculation, SQL query and other forms. In general, in response to receiving a database query, the database system 2 processes the database query, searches the cache 4 and / or the database 5 and returns a database response to the client 6 that issued the request.

[0030] More specifically, refer to Figure 2, the database system 2 receives a first query 20 from a client 6. For example, the database system 2 stores travel data for retrieval and booking, such as pre-computed priced travel recommendations, such as described in WO 2015 / 124275, with departure and return data in the cache 4 and current departure and return data in the database 5. In this example, the first query 20 requests a list of priced travel recommendations from an origin location to a destination location within a specific time window (e.g., a trip from Nice to Munich departing on day X and returning on day X+6 or X+7). Thus, the first query 20 includes a first set of search parameters that specify the characteristics of the priced travel recommendations sought. In response to receiving the first query 20, the database system 2 processes the first query 20 and recognizes that this is the first query of a complex database request that will be responded to based on the cache 4. Therefore, the database system 2 retrieves the data specified by the first set of search parameters included in the first query 20 from the cache, and returns the retrieved data from the cache 4 as a first cache data set according to the first search parameters by means of a first cache data response 24. In the given example, the first cached data set returned is, for example, a list of 10 priced travel recommendations that satisfy the search parameters in the first query 20 .

[0031] Since the cached data returned by the first response 24 originates from the cache 4, there is a possibility that the cached data is out of date and therefore inconsistent with the current data stored in the database 5. On the other hand, by using the cache 4, the first response 24 is returned faster than a hypothetical response based on the database 5, thus reducing the response time of the first query 20.

[0032] After receiving the first cache data response 24, the client 6 can present the received response data to the user, and the user can select one or more of the first cache data set. In the given example, the user can select one of the priced travel recommendations. The selection can also be made in an automatic manner without any user interaction. The selection at the client 6 then triggers the next database query, i.e., the second query 26.

[0033] The second query 26 comprises a second set of search parameters specifying the data to be retrieved and indicating a selected subset of the first cached data set to be returned. In the given example, the second query 26 contains parameters identifying one or more priced travel recommendations selected at the client 6 and constitutes, for example, an availability query for the outbound leg of the selected priced travel recommendations. Thus, the second query 26 is related to the first query 20, since, in the given example, the second query 26 relates to at least a subset of the data retrieved by means of the first query 20.

[0034] In response to receiving the second query 26, the database system 2 also processes the second query 26 and recognizes that this is a second query of a complex database request, which will again be answered based on the cache 4. Therefore, the database system 2 retrieves the data specified by the second search parameter set included in the second query 26 from the cache 4 and returns the retrieved data from the cache 4 according to the second search parameters as a second cache data set by means of a second cache data response 30. In the given example, the returned second cache data set is, for example, an availability indication for the outbound leg of the selected priced trip recommendation, possibly accompanied by additional information such as booking class options and associated prices.

[0035] Again, because the cached data returned by the second response 30 originates from the cache 4, there is a possibility that the cached data is out of date and therefore inconsistent with the current data stored in the database 5. On the other hand, by using the cache 4, the second response 30 is returned faster than the hypothetical response based on the database 5, and therefore, the response time of the second query 20 is also reduced.

[0036] Similar to the reception of the first cached data response 24, the client 6 processes the received second cached data response 30 and displays the result, for example, to the user. Again, the user can make a selection, such as a confirmation, or, if several alternatives are given, select one of the alternatives. For example, if the second cached data response 30 indicates more than one subscription level, the user can select one of them. Again, the selection can also be performed in an automatic manner. The selection at the client 6 then triggers the next database query (i.e., the third query 32).

[0037] The third query 32 comprises a third set of search parameters specifying data to be retrieved, which indicates a selected subset of the returned second cache data set. In the given example, the third query 32 contains parameters identifying the booking class option confirmed or selected at the client 6, and constitutes, for example, an availability query for the return trip of the selected priced travel recommendation. The third query 32 is therefore related to the second query 26 (and therefore also indirectly to the first query 20), because in the given example, the third query 32 relates to at least a subset of the data retrieved by means of the second query 26.

[0038] In response to receiving the third query 32, the database system 2 also processes the third query 32 and recognizes that this is a third query of a complex database request to be answered based on the database 5 (i.e. based on the current data stored in the database 5). Therefore, the database system 2 retrieves 34 from the database 5 the data specified by the third set of search parameters included in the third query 32 and returns the data retrieved according to the third search parameters as a third set of data (i.e. current data from the database 5) by means of a third response 38. In the given example, the third set of current data returned is, for example, an availability indication of the return trip for the selected priced trip recommendation, possibly accompanied by further information such as booking class options and associated prices.

[0039] Since the third data set returned by the third response 38 originates from the database, it is ensured that the data is valid. This is particularly beneficial if the third response is the final response to a complex database request. On the other hand, by now using the database 5, the third response 38 takes more time than a hypothetical response based on the cache 5.

[0040] As a cooperative measure, the retrieval of the third data set from the database 5 is accompanied by a validation 36 of the selected subset of the returned second cached data set identified by the third set of search parameters. To this end, the selected subset of the second cached data set is compared with the corresponding current data stored in the database 5. If the two data sets are identical, then the selected subset of the second cached data set returned to the client by the second response 30 is valid and no further action is required by the database system 2 (although a confirmation of the positive result of the validation may be included in the third response 38).

[0041] On the other hand, if the comparison produces a difference between the selected subset of the second cached data set and the corresponding current data stored in the database, then the selected subset of the second cached data set returned to the client with the second response 30 is invalid (or at least invalid at the current point in time, as data updates may have recently occurred within a period of time after the second response 30 was returned) and an updated (i.e., current) version of the selected subset of the second cached data set as stored in the database 5 is retrieved from the database 2 and returned to the client 6 with the third response 38 as the returned verified selected subset of the second cached data set. Returning the returned verified selected subset of the second cached data set may be implemented in different forms, such as returning the complete updated (i.e., current) version of the selected subset of the second cached data set stored in the database 5 or returning only the difference between the complete updated version of the selected subset of the second cached data set stored in the database 5 and the previously returned subset of the second cached data set.

[0042] In this way, a lookup of the database 5 (which is relatively slower than a lookup of the cache 4) in response to receipt of the third query 32 is utilized to ensure the validity not only of the third returned data set, but also of a portion of the second data set previously returned based on the cache 4 (which was selected at the client 6 after transmission of the second response 30). Compared to an alternative approach of also ensuring the validity of both returned data sets, i.e., the second data requested by the second query 26 has been retrieved from the database 5, the overall response time of the complex database request including all three responses 24, 30, 38 is reduced. Moreover, validating 36 the selected subset of the returned second cache data set identified by the third set of search parameters has a further technical advantage in that this validation 36 is achieved by a more specific database query of the database 5 than a hypothetical database query to retrieve the overall response data to the second query 26 from the database 5. This more specific validation query of the database 5 therefore also saves computational resources of the database 5 in this respect.

[0043] Return to reference Figure 1 In some embodiments, the database system 2 further comprises a front-end module for processing at least the second query and the third query. In these embodiments, the database query issued by the client 6 is processed by another entity of the database system 2, the front-end module 3 ( Figure 1 ), received. Generally speaking, the front-end module 3 processes the incoming database query to decide whether to retrieve the response data from the database 5 and / or from the cache 4. To this end, the front-end module 3 acts as an intermediate unit that controls the data flow within the database system 2 and the response data returned to the client 6 that issued the request.

[0044] The internal functional structure of the front-end module 3 according to some embodiments is composed of Figure 3 As shown. A database query arriving from a client 6 via a communication interface 7 is received at a query input module 10. The query input module 10 may implement a standardized communication protocol across the layers of the OS1 reference model, as has been exemplarily listed above. Among other things, the query input module 10 may employ initial processing mechanisms, such as error identification and correction, packet assembly, and determining whether a valid database query has been received. For security and performance reasons, invalid messages may have been discarded by the query input module 10.

[0045] Valid database queries are relayed from the query input module 10 to the query processing module 11. The query processing module 11 processes the received queries at the entity level, i.e., checks the received queries to determine whether to respond to the queries based on the cache 4 or based on the database 5. To this end, in some embodiments, the query processing module 11 checks whether the received query is the first, second, etc. query of a complex database request, or whether the received query is the third or last query of a complex database request.

[0046] As a general rule, in response to determining that the received query is the last query of a complex database request, queries based on database 5 and previously received queries of the same complex database request (more specifically: cached results returned in response to queries of previously received complex database requests) can be verified using database 5. Non-last queries of complex database requests are responded to based on cache 4. Therefore, query processing module 11 directs the non-last query to cache 4 and directs the last query to database 5.

[0047] The query processing module 11 identifies whether the received database query is the last one of the complex database request in various ways, depending on the implementation of the protocol of the complex database request. For example, a database query belonging to a complex database query may carry a unique (or pseudo-unique) identifier of the complex database request and a query number. In other examples, the database query may include a query type field indicating the type of query (e.g., the first, second, or third query), and the query processing module 11 maintains context data for each received and processed query. In these examples, the query processing module 11 is able to determine the relationship of the subsequent query to the previously received query, thereby identifying the complex database request of the received subsequent query based on the stored context data and the information included in the subsequent query (e.g., the second search parameter set indicates a selected subset of the first cache data set returned, as explained above).

[0048] In some embodiments, the interface 7 between the front-end module 3 and the client 6 may adopt a database platform (e.g., query language, a certain database standard) different from the database platform adopted inside the cache 4 and / or the database 5. For example, the latter may be based on a proprietary implementation, while the external interface 7 may be based on a standardized implementation. In addition, even the cache 4 and the database 5 may adopt different database query technologies. In such embodiments, the query processing module 11 directing the query to the cache 4 or the database 5 may also include transforming or converting the received query into other forms of database query (which may be referred to as a database system internal query) according to the database implementation of the cache 4 and the database 5. It is beneficial to use the front-end module 3 in such a setting because it provides a unified and therefore simplified database protocol for the client 6 (compared to the client 6 directly accessing the database 5 and the cache 4).

[0049] The query processing module 11 also implements verification of previously returned cached results with current data stored in the database 5. Therefore, in response to determining that the received query is the last query of a pending complex request, the query processing module 11 can also generate a verification query for verifying previously returned cached data and direct the verification query to the database 5. The previously returned cached data to be verified is identified by the received query, possibly in combination with the stored context data. For example, the received query may include one or more identifiers (e.g., keys) that identify a selected subset of the previously returned cached data, the latter being stored as part of the context data.

[0050] Continue to refer Figure 3 , the responses from the cache 4 and from the database 5 are received by another component of the front-end module, the response processing module 12. In general, the response processing module 12 performs the opposite actions of the query processing module 11, such as converting the cache and database responses back to the format and / or message stream used on the communication interface 7, and associating the responses with the upper-level complex database request, for example, as mentioned above, by including the corresponding identifier in the response to the client 6. The association function can also make use of context data stored by the query processing module. In addition, the response processing module 12 can also update or expand the context data stored by the query processing module 11, for example, by adding information about the response data to be returned to the client together with the current response. To this end, in some embodiments, the response processing module 12 has a functional connection to the query processing module 11. For example, this connection can be implemented by a memory inside or outside the front-end module 3, where both modules 11, 12 access context data specifying the current state of the pending complex database request. Other entities outside the front-end module 3 can also access this context data storage device.

[0051] The response processed by the response processing module 12 is then relayed to the response output module 13, which is responsible for sending the response to the requesting client 6. Generally speaking, the response output module 13 performs the opposite actions of the query input module 10, i.e., for example, receiving the response data from the output module 13 and implementing the OSI layer communication protocol in order to send the response back to the requesting client 6.

[0052] Note that in some embodiments, not all queries from the client 6 directed to the database system 2 need to be processed by the front-end module 3. There may be other interfaces between the client 6 and the cache 4 and / or the database 5 that allow the client 6 to bypass the front-end module 3 to access the cache 4 and / or the database 5, for example, for independent database queries outside of complex database requests. In some embodiments, such independent database queries that are not part of a complex database request may also be processed by the front-end module 3. In these embodiments, the front-end module 3 is able to recognize that the received query is not related to a complex database request, and is equipped with logic that directs such independent queries to either the cache 4 or the database 5 depending on the use case (for example, in the manner taught by EP 2908255 A1).

[0053] Figure 4 By additionally referring to the relay and processing functions of the front-end module 3, Figure 2 A condensed version of the message sequence. Figure 2 The explanation also applies to Figure 4 However, in Figure 4 At this more specific level, the sequence also includes: receiving a first query 20 at the front-end module 3 and the front-end module 3 retrieving 22 first cache data from the cache 4. The front-end module 3 also sends back a first response 24 to the requesting client 6, for example, as described above with reference to Figure 3 The way is explained by the example.

[0054] Additionally, in a similar manner, in response to receiving the second query 26, the front-end module 3 directs the second query 26 to the cache 4 to retrieve 28 the second cached data set. Likewise, the front-end module 3 sends a second response 30 to the client 6. Additionally, in response to receiving the third query 32, the front-end module 3 determines that the third query 32 is related to the previous second query 26, and, for example, the third query is the last query of a complex database request that includes at least the second query 26 and the third query 32, and directs the third query 32 to the database 5 to retrieve 34 a third current data set and validate 36 a selected subset of the returned second cached data set. The front-end module 3 then sends a third response 38 with the third current data set and the validated selected subset of the returned second cached data set back to the client 6.

[0055] The above method can be used for various use cases. One application is in the field of network routing technology, where routing decisions are made by requesting routing data from a routing server. In this exemplary application, the routing server includes a cache 4 and a database 5, which store data about the communication network infrastructure, including network nodes of the communication network, links between nodes of the communication network, and technical information about the communication network nodes and links between the communication network nodes. The first, second and third queries mentioned above are part of a complex network routing request.

[0056] The first search parameter set of the first query specifies, for example, a source network node and network node characteristics of a potential target network node to be communicated with, and the first cache data set includes identification information and characteristic information of multiple network nodes that meet the specified network characteristics. The second search parameter set of the second query includes an identification of a selected target network node from the multiple network nodes, and the second cache data set includes identification information and technical information about multiple forward network paths from the source network node to the selected target network via links between nodes of the communication network. The third search parameter set includes an identification of a selected forward network path of the multiple forward network paths from the source network node to the selected target network via links between nodes of the communication network, and the third current data set includes identification information and technical information about multiple reverse network paths from the target network node to the source network node via links between nodes of the communication network.

[0057] Figure 5 A more specific (and for reasons of simplicity of presentation) example of this use case is illustrated. Here, a database 5 stores current data about various mirror servers (including mirror servers that specifically store Linux operating system distribution packages that can be accessed via the Internet). The mirror servers form a collection of potential target network nodes, while the routers and gateways of the Internet form additional network nodes interconnected by network links. The data stored by the database 5 may include identifiers, names, URLs (Uniform Resource Locators) and quality of service data (such as data rate, number of parallel uploads / downloads, etc.) of the mirror servers. The cache 4 may store a portion, an aggregated version of a portion, or all of the current data of the database 5, and may be updated regularly (e.g. once a day).

[0058] In order to make a routing decision for uploading and / or downloading Linux distribution data to a mirror server, the client 6 issues a complex database request to the database system 2 (here: routing server), which includes at least three database queries, similar to what has been described above. For the first query 20, the client 6 indicates the source node by including its own IP address 93.23.153.1 in the query. In addition, the first query 20 includes an indication of the nature of the routing target, i.e., looking for a Linux distribution mirror server.

[0059] The database system 2 processes and responds to the first query 20 (and other subsequent queries) in the manner described above. More specifically, the first query 20 is answered based on the cache 4, and the first response 24 indicates three servers that meet the search parameters of the first query 20, for example, the server S1 of Chongqing University in China, the server S2 hosted by the Technical University of Chemnitz in Germany, and the server S3 located at the Massachusetts Institute of Technology in Cambridge, USA. The first response 24 also indicates the corresponding technical details of the mirror servers, such as the data rate of communication with the server (e.g., averaged over 24 hours).

[0060] After the selection at the client 6, a second query 26 is returned to one of the mirror servers (in the example, S2: TUChemnitz), i.e. one of the target network nodes has been determined by the client 6. As mentioned above, this selection can be made manually by the user or automatically, for example by a default mechanism (here: select the server with the highest data rate).

[0061] The database system 2 then returns a cache-based second response 30 indicating quality of service parameters for a plurality of forward paths (FR) through the network, e.g. a variable bit rate (VBR) service with up to 2 Mbit / s for a first forward path (FR1) and a guaranteed bit rate service with a guaranteed transmission rate of 0.5 Mbit / s for a second forward path (FR2). Again, one of the paths is selected at the client and transmitted back to the database system 2 together with a third response 32. In the given example, the second forward path FR2 is selected.

[0062] The database system 2 then returns a third response 38 based on the current data stored in the database. On the one hand, the third response 38 includes a list of return paths with corresponding quality of service indications, namely a VBR service of up to 2.5 Mbit / s for the first return path (RR1) and a GBR service of 0.4 Mbit / s for the second return path (RR2). These data are retrieved 34 from the database 5. Furthermore, the quality of service data for the forward path FR2 previously selected at the client 6 is verified 36 with the current data stored in the database 5. Figure 5In the example of , the verification 36 results in that the GBR commitment of 0.5 Mbit / s held in the cache 5 is in fact no longer valid and the current GBR for FR2 is 0.4 Mbit / s. This is additionally included in the third response 38 and transmitted to the client 6.

[0063] The client 6 may then make a routing selection for uploading and / or downloading the Linux distribution data to the selected mirror server based on the network routing and the quality of service data retrieved from the database system 2 .

[0064] at last, Figure 6 is a diagrammatic representation of a computer system 100 that provides Figure 1 , implements the activities / functions described above, including, for example, a hosted cache 4 and a database 5. Within the database system 2, an instruction set 110 can be executed to cause the computer system 100 to perform any of the methods discussed herein. The database system 2 includes at least one processor 102 (implementing a computing node 6 as explained above), a main memory 104, and a network interface device 108. The main memory 104 includes a user space 104' associated with applications run by a user and a kernel space 104" reserved for an operating system and applications associated with the operating system and hardware. The computer system components 102 to 109 are interconnected by a data bus 101 (implementing interface 8), and optionally, may also include a static memory 106, such as a non-removable flash memory and / or a solid-state drive and / or a removable micro or mini SD card, which permanently stores software that enables the computer system 100 to perform the functions of the computer system 100, and there may be additional I / O interfaces 109 (such as a card reader and a USB interface). A video display 103, a user interface control module 107, and / or a word Numeric input device 105. Network interface device 108 connects database system 2 to other stations, including client 6, the Internet and / or any other network. In the case where database system 2 is distributed among multiple computer systems 100 interconnected by a network via network interface device 108, computer system 100 may also represent only a portion of database system 2. An instruction set (i.e., software) 110 implementing any or all of the above methods resides completely or at least partially in or on a machine-readable medium (e.g., main memory 104 and / or processor 102). Software 110 may also be transmitted or received as a propagated signal 111 via the Internet through network interface device 108.

[0065] In general, routines executed to implement embodiments of the present invention, whether as part of an operating system or as a specific application, component, program, object, module or sequence of instructions, or even as a subset thereof, may be referred to herein as "computer program code" or simply "program code". Program code typically includes computer-readable instructions that reside in various memories and storage devices in a computer at different times, and when read and executed by one or more processors in a computer, causes that computer to perform the operations and / or elements necessary to implement various aspects of embodiments of the present invention. Computer-readable program instructions for performing operations of embodiments of the present invention may be, for example, source code or object code written in assembly language or in any combination of one or more programming languages.

[0066] Various program codes described herein can be identified based on the application implemented in a specific embodiment of the present invention. However, it should be appreciated that any particular program nomenclature below is merely for convenience, and therefore the present invention should not be limited to being used in any specific application identified and / or implied by such nomenclature. In addition, given the general infinite variety of ways in which a computer program can be organized into routines, processes, methods, modules, objects, etc., and the various ways in which program functions can be distributed between various software layers (e.g., operating systems, libraries, APIs, applications, applets, etc.) residing in a typical computer, it should be appreciated that embodiments of the present invention are not limited to the specific organization and distribution of program functions described herein.

[0067] The program code implemented in any application / module described herein can be distributed separately or together in various forms as a program product. In particular, a computer-readable storage medium having computer-readable program instructions for causing a processor to perform various aspects of an embodiment of the present invention can be used to distribute the program code.

[0068] Computer-readable program instructions stored in a computer-readable medium can be used to direct a computer, other types of programmable data processing devices, or other devices to function in a particular manner, so that the instructions stored in the computer-readable medium produce an article of manufacture, which includes instructions that implement the functions, actions, and / or operations specified in the flowchart, sequence diagram, and / or block diagram. The computer program instructions can be provided to one or more processors of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, so that the instructions executed by the one or more processors cause a series of calculations to be performed to implement the functions, actions, and / or operations specified in the flowchart, sequence diagram, and / or block diagram.

[0069] In some alternative embodiments, consistent with embodiments of the present invention, the functions, actions and / or operations specified in the flow chart, sequence diagram and / or block diagram can be reordered, processed serially and / or processed concurrently. Moreover, consistent with embodiments of the present invention, any one of the flow chart, sequence diagram and / or block diagram can include more or less blocks than those illustrated.

[0070] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to limit embodiments of the present invention. It will also be understood that when used in this specification, the term "comprising" specifies the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. In addition, within the scope of using the terms "comprising", "having", "with", "consisting of..." or their variations, such terms are intended to be inclusive in a manner similar to the term "comprising".

[0071] Although the entirety of the present invention has been illustrated by the description of various embodiments, and although these embodiments have been described in considerable detail, it is not intended to constrain or limit the scope in any way to such details. Additional advantages and modifications will be readily apparent to those skilled in the art. Therefore, the present invention in its broader aspects is not limited to the specific details, representative devices and methods, and illustrative examples shown and described. Thus, these details may be deviated from without departing from the scope of the overall inventive concept.

Claims

1. A method for processing data query, the method being performed by a database system, the database system comprising: A database that stores current data that is continuously updated; a cache storing cache data corresponding to at least a subset of current data stored in the database; The method includes, at a database system: In response to receiving a first query including a first set of search parameters specifying data to be retrieved, returning a first set of cached data from the cache according to the first search parameters; in response to receiving a second query related to the first query, the second query including a second set of search parameters specifying data to be retrieved and indicating a selected subset of the first cached data set to be returned, returning a second set of cached data from the cache in accordance with the second set of search parameters, In response to receiving a third query related to the second query, the third query including a third set of search parameters specifying data to be retrieved, the third set of search parameters indicating a selected subset of the second set of cached data to be returned, retrieving a third current data set from the database according to a third set of search parameters, validating a selected subset of the returned second cache data set with corresponding current data stored in the database, and returning a third current set of data retrieved based on a third set of search parameters and the validated selected subset of the returned second cached data, Wherein validating the selected subset of the returned second cache data set with corresponding current data stored in the database comprises: determining whether current data stored in the database corresponding to the selected subset of the returned second cache data set is identical to the selected subset of the returned second cache data set, The method further comprises: In response to determining that current data stored in a database corresponding to a selected subset of the returned second cache data set is different from the selected subset of the returned second cache data set, returning the determined difference between the returned second cache data set and the current data stored in the database corresponding to the selected subset of the returned second cache data set as a verified selected subset of the returned second cache data set.

2. The method of claim 1, wherein the database system further comprises a front-end module for processing at least the second query and the third query, and the method further comprises, at the front-end module: in response to receiving the second query, directing the second query to the cache to retrieve a second set of cached data; In response to receiving the third query, determining that the third query is related to the previous second request and directing the third query to the database to retrieve a third current data set and verifying the selected subset of the returned second cache data set.

3. The method of claim 2, further comprising, at the front end module: receiving a second cache data set from the cache and sending a response message with the second cache data set to the querying client; The retrieved third current data set and the returned validated selected subset of the second cached data set are received from the database, and a response message with the retrieved third current data set and the returned validated selected subset of the second cached data set is sent to the querying client.

4. The method according to any one of claims 1 to 3, wherein the method further comprises: In response to determining that current data stored in the database corresponding to the returned selected subset of the second cached data set is identical to the returned selected subset of the second cached data set, returning a validity indicator as a verified selected subset of the returned second cached data set.

5. The method of any one of claims 1 to 3, wherein the cache and the database store data about a communication network infrastructure, the communication network infrastructure comprising network nodes of the communication network, links between nodes of the communication network and technical information about nodes of the communication network and links between nodes of the communication network, and wherein the first query, the second query and the third query are part of a network routing request, wherein The first search parameter set of the first query specifies network node characteristics of potential target network nodes to communicate with, and the first cache data set includes identification information and characteristic information of a plurality of network nodes that satisfy the specified network characteristics; the second set of search parameters for the second query includes an identification of a selected target network node of the plurality of network nodes, and the second set of cached data includes identification information and technical information regarding a plurality of forward network paths from the source network node to the selected target network node via links between nodes of the communications network; The third search parameter set includes an identification of a selected forward network path of the multiple forward network paths from the source network node to the selected target network via links between nodes of the communication network, and the third current data set includes identification information and technical information about multiple reverse network paths from the target network node to the source network node via links between nodes of the communication network.

6. A database system for processing data queries, comprising: A database that stores current data that is continuously updated; a cache storing cache data corresponding to at least a subset of current data stored in the database; at least one processor; as well as at least one memory containing instructions that, when executed by the at least one processor, cause the database system to perform operations comprising: In response to receiving a first query including a first set of search parameters specifying data to be retrieved, returning a first set of cached data from the cache according to the first search parameters; in response to receiving a second query related to the first query, the second query including a second set of search parameters specifying data to be retrieved and indicating a selected subset of the first cached data set to be returned, returning a second set of cached data from the cache in accordance with the second set of search parameters, In response to receiving a third query related to the second query, the third query including a third set of search parameters specifying data to be retrieved, the third set of search parameters indicating a selected subset of the second set of cached data to be returned, retrieving a third current data set from the database according to a third set of search parameters, validating a selected subset of the returned second cache data set with corresponding current data stored in the database, and returning a third current set of data retrieved based on a third set of search parameters and the validated selected subset of the returned second cached data, Wherein validating the selected subset of the returned second cache data set with corresponding current data stored in the database comprises: determining whether current data stored in the database corresponding to the selected subset of the returned second cache data set is identical to the selected subset of the returned second cache data set, The operations also include: In response to determining that current data stored in the database corresponding to the selected subset of the returned second cache data set is different from the selected subset of the returned second cache data set, the difference between the determined returned second cache data set and the current data stored in the database corresponding to the selected subset of the returned second cache data set is returned as the verified selected subset of the returned second cache data set.

7. The database system according to claim 6, wherein the operation comprises the method according to any one of claims 2 to 5.

8. A computer program product comprising program code instructions stored on a computer readable medium for performing the steps of the method according to any one of claims 1 to 5 when said program is executed on a computer.