WO2017201970A1 - Branch base database system and routing method therefor - Google Patents

Branch base database system and routing method therefor Download PDF

Info

Publication number
WO2017201970A1
WO2017201970A1 PCT/CN2016/104282 CN2016104282W WO2017201970A1 WO 2017201970 A1 WO2017201970 A1 WO 2017201970A1 CN 2016104282 W CN2016104282 W CN 2016104282W WO 2017201970 A1 WO2017201970 A1 WO 2017201970A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
operation request
sub
query condition
target fragment
Prior art date
Application number
PCT/CN2016/104282
Other languages
French (fr)
Chinese (zh)
Inventor
李秋伟
Original Assignee
乐视控股(北京)有限公司
乐视电子商务(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 乐视控股(北京)有限公司, 乐视电子商务(北京)有限公司 filed Critical 乐视控股(北京)有限公司
Publication of WO2017201970A1 publication Critical patent/WO2017201970A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the patent application relates to the field of database technology, and in particular relates to a database database system and a routing method thereof.
  • the traditional sub-division scheme is generally to set a fragmentation field in a database table, and configure the fragmentation strategy of the sub-library. When used, the calculation is based on the value of the application and the fragmentation strategy.
  • the fragmentation node ie, the target fragmentation database
  • the primary key field is the conditional field that is frequently operated by this database table. When the primary key field is used for querying, updating, etc., the database system will set the value of the primary key field.
  • the key value pair is stored in the local cache of the database server, and the corresponding target fragment database can be directly obtained from the local cache when used next time.
  • the routing method of the traditional sub-database database is described, which includes the following steps:
  • Step 101 Parse the query condition from the request from the client.
  • the parsed query condition includes a fragmentation field and/or a primary key field.
  • Step 102 Determine whether to hit the target fragment database in the local cache according to the parsed query condition. If the target is hit in the local cache, step 105 is performed; otherwise, if the corresponding data is not cached in the local cache (ie, the correspondence between the query condition and the target fragment database), step 103 is performed.
  • Step 103 Calculate the target fragment database according to the parsed query condition.
  • the target fragment database may be calculated according to the incoming value of the fragmentation field and the fragmentation strategy of the database database system, or may be executed in the entire database according to the primary key field, and the target fragmentation database is obtained.
  • Step 104 Save the correspondence between the target fragment database and the request to the local cache, so that the target fragment database can be directly hit in the local cache when the next operation request is performed.
  • Step 105 Send an operation request to the target shard database.
  • a clustering method is generally used to deploy a sub-database, and then a sub-database database system includes a plurality of sub-library servers, and each sub-library The server is respectively configured to calculate the target fragment database according to the query condition parsed in the operation request sent from the client. If the system's multiple sub-library servers are highly available, that is, each sub-library server is performing the routing task of the target fragmentation database at the same time, there will inevitably be multiple calculations or execution problems of the target fragmentation database, resulting in valuable CPU. Waste, reducing the effective utilization of hardware resources.
  • the purpose of some embodiments of the present invention is to provide a database database system and a routing method thereof, which can improve the processing efficiency of the database database system by reducing the repeated calculation of the target fragment database, thereby improving the system hardware usage efficiency.
  • an embodiment of the present invention provides a routing method of a database database system, where
  • the sub-database database system includes: L fragment databases and N sub-database servers, wherein the L and N are natural numbers greater than 1, and the method includes the following steps: the sub-database servers receive the client-side When the operation request is performed, the query condition carried by the operation request is obtained; when the target fragment database is to be calculated, the fragment database corresponding to the operation request is calculated according to the query condition; wherein each of the sub-database servers is stored Corresponding relationship between the query condition and the target fragment database, and synchronously updating the correspondence to at least one of the database servers in the database database that does not process the operation request; sending the operation request to the target Fragment database.
  • the embodiment of the present invention provides a sub-database database system, including: L fragment databases and N sub-database servers, wherein the L and N are natural numbers greater than 1;
  • the sub-library server includes parsing a module, a calculation module, a saving module, a synchronization module, and a sending module;
  • the parsing module is configured to parse the query condition carried by the operation request when the sub-database server receives an operation request from the client;
  • the saving module is configured to use the query condition and the target calculated by the calculation module
  • Corresponding relationship of the fragmentation database is saved to the local cache of the sub-database server;
  • the synchronization module is configured to synchronously update the correspondence relationship to at least one sub-database server in the sub-database database system that does not process the operation request;
  • the sending module is configured to send the operation request to the target fragment database.
  • an embodiment of the present invention provides a computer program, which is applied to a sub-database database system, where the computer program is configured to: when each sub-library server receives an operation request from a client, parsing the The query condition carried by the operation request; when the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; and each of the database servers saves the query condition and the target fragment database Corresponding the relationship, and synchronously updating the corresponding relationship to at least one of the sub-database database systems that does not process the operation request; and sending the operation request to the target fragment database.
  • an embodiment of the present invention provides a non-volatile computer storage medium, where Computer executable instructions, the computer executable instructions being applied to a library database system, the computer executable instructions being configured to: when each of the database servers receives an operation request from a client, parse the operation request to carry a query condition; when the target fragment database is to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; and each of the database servers stores a correspondence between the query condition and the target fragment database. And updating the corresponding relationship to at least one of the sub-database database systems that does not process the operation request; and sending the operation request to the target fragment database.
  • an embodiment of the present invention provides a database server system, including: L fragment databases and N database servers, wherein the L and N are natural numbers greater than 1;
  • the library server includes: a first communication component, at least one first processor communicatively coupled to the first communication component; and a first memory communicatively coupled to the at least one first processor; wherein the first memory is a first instruction executed by the at least one first processor, the first instruction being executed by the at least one first processor to enable the at least one first processor to: pass the first communication
  • the component receives the operation request from the client, the query obtains the query condition carried by the operation request; when the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; Querying a correspondence between the condition and the target fragmentation database, and transmitting the correspondence by the first communication component to synchronously update the correspondence to At least one sub-library server that does not process the operation request in the sub-database database system in which the library server is located; the operation request is sent by
  • the sub-database database system and the routing method thereof provided by the embodiments of the present invention are provided according to requirements
  • the operation request of the client is calculated and processed to be routed to the target shard database, and the corresponding relationship between the calculated operation request and the target shard database is locally saved, and simultaneously updated to at least one unprocessed operation in the database system.
  • the requested sub-library server reduces the double counting of the same operation request by means of data synchronization between the plurality of sub-database servers in the sub-database database system, which helps to improve the processing efficiency of the sub-database database system.
  • the corresponding relationship is synchronously updated to the at least one of the sub-database servers in the sub-database database system that does not process the operation request, and the corresponding relationship is synchronously updated to the sub-database database system. All sub-library servers for this operation request are not processed. Thereby the system has higher operating efficiency.
  • updating the corresponding relationship to the at least one of the sub-databases in the sub-database database system that does not process the operation request specifically: the sub-library server synchronously updates the corresponding relationship to the centralized a cache server; the centralized cache server synchronously updates the updated correspondence to at least one of the sub-library database systems that does not process the operation request.
  • Data update relaying through the centralized cache server is beneficial to reduce the burden on each database server, and on the other hand, it is beneficial to save the calculation results for a long time.
  • the centralized cache server synchronously updates the updated correspondence to at least one of the sub-database database systems that does not process the operation request, and specifically includes: the centralized cache The server issues an update message about the corresponding relationship; at least one of the database servers in the database database that has not processed the operation request performs synchronous update when listening to the update message issued by the centralized cache server. This allows data updates between the various library servers to be quickly synchronized.
  • FIG. 1 is a flow chart of a routing method of a database system according to the prior art
  • FIG. 2 is a flow chart of a routing method of a database database system according to an embodiment of the present invention
  • FIG. 3 is a flow chart of a routing method of a binary database system according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a three-part database system according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of each of the sub-database servers of the three-part database system according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a four-base database system according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a four-branch server according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a five-pack library server according to an embodiment of the present invention.
  • FIG. 9 is a block diagram showing the structure of a five-slice database according to an embodiment of the present invention.
  • Embodiment 1 of the present invention relates to a routing method of a database database system.
  • the routing method of the database database system can be applied to applications of e-commerce, finance, telecommunications, and the like.
  • the sub-database database system includes: L fragment databases and N branch servers, and L and N are natural numbers greater than 1.
  • the N sub-database servers adopt the cluster deployment mode to route the target fragmentation database to the received operation request.
  • the routing method of the database database system includes the following steps:
  • Step 201 When receiving the operation request from the client, each of the database servers parses the query condition carried by the operation request.
  • the operation request may carry an operation value for indicating an operation, a query condition for routing the fragmentation database, and a value corresponding to the query condition, etc.
  • the operational request may carry an operation value for indicating an operation, a query condition for routing the fragmentation database, and a value corresponding to the query condition, etc.
  • the operational request may carry an operation value for indicating an operation, a query condition for routing the fragmentation database, and a value corresponding to the query condition, etc.
  • Step 202 Locating the target fragment database in the local cache of the branch server according to the query condition.
  • Step 203 Determine whether the target fragment database is hit in the local cache.
  • the local cache of the database server for example, a key value pair in which the value of the primary key field and the corresponding relationship of the fragment are stored, when the value passed in is the primary key value and the corresponding target fragment database is available, Hit the target fragment database corresponding to the operation request in the local cache.
  • step 204 if the target fragment database is not hit in the local cache of the database server according to the query condition, step 204 is performed; if the target fragment database is hit in the local cache of the database server according to the query condition, step 209 is performed. .
  • Step 204 Determine whether the query condition includes a primary key field. If the query condition includes the primary key field, step 206 is performed. In this embodiment, if the query condition does not include the primary key field, and the default query condition includes the segmentation route, step 205 is performed.
  • Step 205 Calculate the target fragment database according to the field value of the fragmentation route and the fragmentation policy supported by the database server.
  • Step 206 Calculate a target fragment database corresponding to the query condition according to the input value of the primary key field.
  • Step 207 Each sub-database server saves the correspondence between the query condition and the fragment database.
  • each of the database servers saves the correspondence between the query condition and the target fragment database to the local cache. That is, the correspondence between the query condition and the target fragment database is saved according to the calculation result of step 205 or step 206.
  • Step 208 Synchronously update the correspondence to at least one of the sub-database servers in the sub-database database system that does not process the operation request.
  • the correspondence is synchronously updated to all the sub-database servers in the sub-database database system that have not processed the operation request.
  • the correspondence is updated synchronously to the L-1 database servers that have not processed the operation request.
  • the more sub-database servers the stronger the routing capability of the database system and the faster the response.
  • the number of repeated calculations when the system processes the same request can be reduced, which is equivalent to the synchronization to improve other sub-libraries.
  • the processing speed of the server when processing the same request thereby improving the processing speed of the system, and effectively saving valuable CPU resources and increasing the utilization rate of hardware resources in the case of high concurrent access.
  • Step 209 Send the operation request to the target shard database. That is, according to the operation request, the corresponding operations of adding, deleting, checking, changing, etc. are performed in the corresponding target fragment database (ie, a database in which the data tables are actually stored in the L fragment databases).
  • the corresponding target fragment database ie, a database in which the data tables are actually stored in the L fragment databases.
  • the client request may be forwarded by the load balancer to the branch server, so that the processing tasks of each branch server are better coordinated in a high concurrent scenario.
  • the routing method of the database database system further includes the following steps: dynamically cleaning the local cache of the database server according to the frequency of use of the updated correspondence in the database server. Due to the limited storage capacity of the local cache of each sub-database server, and the local cache of a sub-database server is also synchronized with the calculation results of other sub-library servers, the amount of data stored in the sub-library server will increase rapidly, when the data in the local cache is cached. When the data is accumulated to a certain extent, the update cannot be synchronized. Therefore, the data in the local cache needs to be cleaned up in time. In this embodiment, the data is cleaned according to the frequency of use of the data in the local cache, and other local caches are known to those skilled in the art. Cleanup strategy, no longer repeat here.
  • the calculation is performed according to the query condition parsed by the operation request, thereby obtaining the target fragment database corresponding to the query condition.
  • the calculation result can be locally cached, but also the calculation result can be synchronously updated to other sub-database servers, so that in the case of high concurrency, the same operation request can be performed once, which greatly reduces the amount of repetitive calculation.
  • the task volume of each sub-database server is reduced, thereby facilitating the processing efficiency of the sub-database database system.
  • Embodiment 2 of the present invention relates to a routing method of a database database system.
  • the second embodiment is substantially the same as the first embodiment.
  • the main difference is that in the first embodiment, the synchronization between the query condition and the target server is directly updated between the database servers.
  • the usage is centralized.
  • the cache server updates the correspondence between the request and the fragment database to other sub-library servers.
  • steps 301 to 307 are the same as steps 201 to 207 in the first embodiment, and step 309 is the same as step 209 in the second embodiment.
  • step 308 in the step of synchronously updating the correspondence to at least one of the sub-database servers in the sub-database system that does not process the operation request, the following sub-steps are included:
  • Sub-step 3080 Each of the library servers synchronizes the correspondence to the centralized cache server.
  • Sub-step 3081 Synchronously update the correspondence of the centralized cache server update to at least one of the sub-library database systems that does not process the operation request.
  • each of the library servers may save the correspondence to the centralized cache server in real time, and in sub-step 3081, the centralized cache server issues an update message regarding the corresponding relationship, which is not processed in the database system. All the sub-library servers of the operation request synchronize updates when they listen to the update message issued by the centralized cache server.
  • the centralized cache server is added in this embodiment, the newly added correspondence in the local cache of each branch server can be conveniently updated to the concentrator cache server, and the centralized cache server is responsible for synchronizing the correspondence to Other sub-library servers that have not processed the operation request, thereby freeing each sub-library server from the burden of data synchronization between other sub-library servers in real time, reducing the sub-library services The complexity of server data synchronization.
  • the data (the corresponding relationship of the storage) in the centralized cache server is increased, which results in a large amount of disk space. Therefore, in this embodiment, the centralized The corresponding relationship saved by the cache server is cleaned up.
  • the following preset conditions may be adopted, such as: reaching a preset cleaning period or reaching a preset amount of saved data.
  • the preset cleaning setting can be set to 1 month, so that the data in the centralized cache server is cleaned every month, when the preset condition is the preset save.
  • the preset amount of data is, for example, 500 GB, so that the amount of data in the centralized cache server is prevented from being excessive.
  • the centralized cache server saves the calculation result of each sub-database server, and then releases the update message to other sub-library servers, and the other sub-library servers can update the local cache when they are relatively idle, thereby making each Work can be done more harmoniously between the library servers.
  • the correspondence between the fragment database and the fragmentation field in a certain sub-database server may be changed when the entire sub-database database system performs sub-database and sub-table expansion. You can synchronize changes in one sub-library server to other sub-library servers through a centralized caching server.
  • a third embodiment of the present invention relates to a sub-database database system, comprising: L fragment databases 1 and N branch servers 2, wherein L and N are natural numbers greater than one.
  • the branch server 2 includes a parsing module 20, a computing module 21, a saving module 22, a synchronizing module 23, a transmitting module 24, and a local cache 25.
  • the parsing module is configured to parse the query condition carried by the operation request when the sub-database server receives the operation request from the client.
  • the calculation module is configured to calculate a target fragment database, in this embodiment, the calculation module is configured to calculate a target corresponding to the operation request according to the query condition when the database server does not hit the target fragment database in the local cache. Fragment database.
  • the saving module is configured to save the correspondence between the query condition and the target fragment database calculated by the calculation module to the local cache 25 of the branch server.
  • the synchronization module is configured to synchronously update the correspondence to at least one of the sub-library database systems that does not process the operation request. In this embodiment, the synchronization module is configured to synchronously update the corresponding relationship to all the sub-database servers in the sub-database database system that have not processed the operation request.
  • the sending module is used to send an operation request to the target shard database.
  • the embodiment is a system embodiment corresponding to the first embodiment, and the embodiment can be implemented in cooperation with the first embodiment.
  • the related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce the repetition.
  • the related technical details mentioned in this embodiment can also be applied in the first embodiment.
  • each module involved in this embodiment is a logic module.
  • a logical unit may be a physical unit, a part of a physical unit, or multiple physical entities. A combination of units is implemented.
  • the unit which is not closely related to solving the technical problem proposed by the present invention is not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
  • Embodiment 4 of the present invention relates to a sub-database database system.
  • the fourth embodiment is substantially the same as the third embodiment.
  • the database servers directly synchronize with each other.
  • the database database system further includes Centralized cache server 3.
  • the synchronization module of each sub-database server 2 is configured to synchronously update the correspondence between the query condition and the target fragmentation database 1 to the centralized cache server 3, and synchronously update the corresponding relationship of the centralized cache server 3 update to the sub-database database system. All sub-library servers 2 for this operation request are not processed.
  • the embodiment can be matched with the second embodiment.
  • the technical details mentioned in the second embodiment are still effective in this embodiment, and the technical effects that can be achieved in the second embodiment can also be implemented in the embodiment. To reduce the repetition, details are not described herein again.
  • the related technical details mentioned in this embodiment can also be applied in the second embodiment.
  • the branch server may include: a processor, a memory, and a transceiver, and the memory and the transceiver are both connected to the processor.
  • the processor parses the query condition from the operation request, and accesses the memory to determine whether the target fragment database corresponding to the query condition is stored in the memory, and is not checked in the memory.
  • the processor calculates the target fragment database according to the query condition. For example, the processor calculates the target fragment according to the incoming value of the fragment field in the query condition and the fragmentation strategy.
  • the database or the target fragment database is calculated according to the incoming value of the primary key field in the query condition, and the processor sends the operation request to the corresponding target fragment database through the transceiver.
  • the processor saves the correspondence between the query condition and the calculated target fragment database into the memory, and sends the correspondence to the centralized cache server through the transceiver, and the processor sends the correspondence to the centralized cache. server.
  • the centralized cache server stores the corresponding relationship and issues a message about the storage event to the other database server in the database database system that does not process the operation request, and the database server that listens to the message storing the event is centralized.
  • the corresponding relationship is obtained in the cache server, and the corresponding relationship is stored in the local storage.
  • a fifth embodiment of the present invention relates to a library server system, comprising: L fragment databases and N database servers, wherein L and N are natural numbers greater than one.
  • the branch server 800 includes: a first communication component 801, at least one first processor 802 communicatively coupled to the first communication component 801; and a first communication connection with the at least one first processor 801 Memory 803.
  • One processor 802 is taken as an example in FIG.
  • the processor 802, the memory 803, and the first communication component 801 may be connected by a bus or other means, and the bus connection is taken as an example in FIG.
  • the first memory 803 stores a first instruction that can be executed by one less first processor 802, and the first instruction is executed by the at least one first processor 802, so that the at least one first processor 802 can: pass the
  • the communication component 801 receives the operation request from the client, it parses the query condition carried by the operation request.
  • the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition.
  • the corresponding relationship between the query condition and the target fragment database is saved, and the corresponding relationship is sent by the first communication component 801 to synchronously update the correspondence relationship, and at least one of the sub-database database systems in which the sub-database server is located does not process the operation request. .
  • An operation request is sent by the first communication component to process the operation request by the target shard database.
  • the first memory 803 is used as a non-volatile computer readable storage medium, and can be used for storing a non-volatile software program, a non-volatile computer executable program, and a module, as in the routing method in the embodiment of the present invention.
  • Corresponding program instructions/modules for example, parsing module 20, computing module 21, saving module 22, synchronization module 23, and transmitting module 24 shown in FIG. 5.
  • the processor 802 executes various functional applications and data processing of the library server by running the non-volatile software programs, instructions, and modules stored in the first memory 803, that is, the processing method of the routing method of the foregoing method embodiment.
  • the first memory 803 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created by a processing method for the routing method, and the like.
  • the first memory 803 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device.
  • the first communication component includes a high speed local area network.
  • the one or more modules are stored in the first memory 803, and when executed by the one or more first processors 802, perform a processing method of the routing method in any of the above method embodiments.
  • the fragment database 900 includes: a second communication component 901, at least one second processor 903 communicatively coupled to the second communication component 902; and, with at least one second processor 902 is communicatively coupled to the second memory 903.
  • the second memory 903 stores a second instruction executable by the at least one second processor 902, and the second instruction is executed by the at least one second processor 902 to enable the at least one second processor 902 to: pass the second
  • the communication component receives and processes the operation request.
  • the one or more second processors 902 and the second memory 903 are exemplified by a second processor 902 in FIG.
  • the second processor 902, the second memory 903, and the second communication component 901 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
  • the above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
  • the query condition parsed according to the operation request is calculated, thereby obtaining the target fragment database corresponding to the query condition.
  • the calculation result not only can the calculation result be locally cached, but also the calculation result can be synchronously updated to other sub-database servers, so that in the case of high concurrency, the same operation request can be performed once, which greatly reduces the amount of repetitive calculation.
  • the task volume of each sub-database server is reduced, thereby facilitating the processing efficiency of the sub-database database system.
  • a ninth embodiment of the present invention is directed to a nonvolatile computer storage medium storing computer executable instructions that can execute the processing method of the routing method in any of the above method embodiments.
  • the calculation result can be locally cached, but also the calculation result can be synchronously updated to other sub-database servers, so that in the case of high concurrency, the same operation request can be performed once, which greatly reduces the amount of repetitive calculation.
  • the task volume of each sub-database server is reduced, thereby facilitating the processing efficiency of the sub-database database system.
  • a tenth embodiment of the present invention relates to a computer program capable of executing the routing method in any of the above method embodiments.
  • This embodiment can not only locally cache the calculation result, but also update the calculation result to other sub-library servers synchronously, so that in the case of high concurrency, the same operation request is performed once.
  • the calculation can be done, which greatly reduces the amount of repetitive calculation, thereby reducing the task amount of each sub-database server, thereby facilitating the processing efficiency of the sub-database database system.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a branch base database system and a routing method therefor. The branch base database system comprises L fragmentation databases and N branch base servers, wherein both L and N are natural numbers greater than 1. The routing method for the branch base database system comprises: when an operation request is received from a client, various branch base servers parsing and obtaining a query condition carried by the operation request (201, 301); when a target fragmentation database needs to be calculated, positioning, according to the query condition, the target fragmentation database in a local cache (202, 302); various branch base servers saving the correlation between the query condition and the target fragmentation database (207, 307), and synchronously updating the correlation to at least one branch base server, which does not process the operation request, in the branch base database system (208); and sending the operation request to the target fragmentation database (209). The branch base database system and the routing method therefor solve the problem of multiple calculations of fragmentation routing by reducing repetitive calculation of the fragmentation routing, thereby improving the processing efficiency of the branch base database system.

Description

一种分库数据库系统及其路由方法Sub-database database system and routing method thereof
本申请要求于2016年05月21日提交中国专利局、申请号为201610342340.1的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 20161034234, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本专利申请涉及数据库技术领域,特别涉及一种分库数据库系统及其路由方法。The patent application relates to the field of database technology, and in particular relates to a database database system and a routing method thereof.
背景技术Background technique
在互联网网络应用中,随着业务的发展,数据库积累的数据越来越多,那么在处理大量用户访问、高并发请求的时候,单个数据库的处理瓶颈很快就能显现出来,这时一台数据库将很快无法满足应用需求,因此,目前通常采用数据库分库分表的方案来提高数据库性能。In the Internet network application, as the business grows, the database accumulates more and more data. When dealing with a large number of user access and high concurrent requests, the processing bottleneck of a single database will soon be revealed. The database will soon be unable to meet the application requirements, so the current database partitioning scheme is often used to improve database performance.
传统的分库分表方案一般是设置一个数据库表中的分片字段,并配置分库的分片策略,在使用时,根据应用传入的值配合分片策略进行计算,通过计算得出使用的分片节点(即目标分片数据库),由此可知,分片字段在分库数据库系统中对目标分片数据库的路由起到关键作用。除可设置分片字段外,还可以设置一个主键字段,主键字段为此数据库表经常操作的条件字段,当使用主键字段进行查询、更新等操作后,分库数据库系统会将该主键字段的值和目标分片数据库对应关系,以键值对的方式保存在分库服务器的本地缓存中,下次使用时可直接从本地缓存中获得对应的目标分片数据库。现结合图1,对传统分库数据库的路由方法进行说明,其包括以下步骤: The traditional sub-division scheme is generally to set a fragmentation field in a database table, and configure the fragmentation strategy of the sub-library. When used, the calculation is based on the value of the application and the fragmentation strategy. The fragmentation node (ie, the target fragmentation database), from which it can be seen that the fragmentation field plays a key role in the routing of the target fragmentation database in the sub-database database system. In addition to setting the fragmentation field, you can also set a primary key field. The primary key field is the conditional field that is frequently operated by this database table. When the primary key field is used for querying, updating, etc., the database system will set the value of the primary key field. Corresponding to the target fragment database, the key value pair is stored in the local cache of the database server, and the corresponding target fragment database can be directly obtained from the local cache when used next time. Referring now to Figure 1, the routing method of the traditional sub-database database is described, which includes the following steps:
步骤101:从来自客户端的请求中解析出查询条件,比如,解析出的查询条件包括分片字段和/或主键字段。Step 101: Parse the query condition from the request from the client. For example, the parsed query condition includes a fragmentation field and/or a primary key field.
步骤102:根据解析出的查询条件判断是否在本地缓存中命中目标分片数据库。如果在本地缓存中命中目标,则执行步骤105;反之,如果本地缓存中没有缓存相应数据(即查询条件与目标分片数据库的对应关系),则执行步骤103。Step 102: Determine whether to hit the target fragment database in the local cache according to the parsed query condition. If the target is hit in the local cache, step 105 is performed; otherwise, if the corresponding data is not cached in the local cache (ie, the correspondence between the query condition and the target fragment database), step 103 is performed.
步骤103:根据解析出的查询条件计算得到目标分片数据库。本步骤中,可以根据分片字段的传入值配合分库数据库系统的分片策略计算得到目标分片数据库,或者根据主键字段在整个数据库中进行执行,计算得到目标分片数据库。Step 103: Calculate the target fragment database according to the parsed query condition. In this step, the target fragment database may be calculated according to the incoming value of the fragmentation field and the fragmentation strategy of the database database system, or may be executed in the entire database according to the primary key field, and the target fragmentation database is obtained.
步骤104:保存目标分片数据库和请求的对应关系至本地缓存,以便下次同样操作请求时可以在本地缓存中直接命中目标分片数据库。Step 104: Save the correspondence between the target fragment database and the request to the local cache, so that the target fragment database can be directly hit in the local cache when the next operation request is performed.
步骤105:将操作请求发送至目标分片数据库。Step 105: Send an operation request to the target shard database.
本申请的发明人在实现本发明的过程中发现现有技术中,为防止单点问题,通常采用集群方式部署分库,那么一个分库数据库系统就包括有多个分库服务器,各分库服务器分别用于根据从客户端发送的操作请求中解析出的查询条件计算目标分片数据库。如果系统的多个分库服务器实现高可用,即各个分库服务器同时在执行目标分片数据库的路由任务,那么必然会存在目标分片数据库的多次计算或执行的问题,造成宝贵的CPU的浪费,降低了硬件资源的有效利用率。In the process of implementing the present invention, the inventor of the present application finds that in the prior art, in order to prevent a single point problem, a clustering method is generally used to deploy a sub-database, and then a sub-database database system includes a plurality of sub-library servers, and each sub-library The server is respectively configured to calculate the target fragment database according to the query condition parsed in the operation request sent from the client. If the system's multiple sub-library servers are highly available, that is, each sub-library server is performing the routing task of the target fragmentation database at the same time, there will inevitably be multiple calculations or execution problems of the target fragmentation database, resulting in valuable CPU. Waste, reducing the effective utilization of hardware resources.
发明内容Summary of the invention
本发明部分实施例的目的在于提供一种分库数据库系统及其路由方法,通过减少目标分片数据库的重复计算以提高分库数据库系统的处理效率,进而提高系统硬件的使用效率。The purpose of some embodiments of the present invention is to provide a database database system and a routing method thereof, which can improve the processing efficiency of the database database system by reducing the repeated calculation of the target fragment database, thereby improving the system hardware usage efficiency.
第一方面,本发明实施例提供了一种分库数据库系统的路由方法,所述 分库数据库系统包括:L个分片数据库和N个分库服务器,所述L、N均为大于1的自然数,其特征在于,包括以下步骤:所述各分库服务器在接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;在需计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的分片数据库;其中,所述各分库服务器保存所述查询条件与目标分片数据库的对应关系,并将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器;将所述操作请求发送至所述目标分片数据库。In a first aspect, an embodiment of the present invention provides a routing method of a database database system, where The sub-database database system includes: L fragment databases and N sub-database servers, wherein the L and N are natural numbers greater than 1, and the method includes the following steps: the sub-database servers receive the client-side When the operation request is performed, the query condition carried by the operation request is obtained; when the target fragment database is to be calculated, the fragment database corresponding to the operation request is calculated according to the query condition; wherein each of the sub-database servers is stored Corresponding relationship between the query condition and the target fragment database, and synchronously updating the correspondence to at least one of the database servers in the database database that does not process the operation request; sending the operation request to the target Fragment database.
第二方面,本发明实施例提供了一种分库数据库系统,包括:L个分片数据库和N个分库服务器,所述L、N均为大于1的自然数;所述分库服务器包括解析模块、计算模块、保存模块、同步模块和发送模块;所述解析模块用于在所述分库服务器接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;所述计算模块用于在需要计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;所述所述保存模块用于将所述查询条件和所述计算模块计算出的目标分片数据库的对应关系保存至所述分库服务器的本地缓存;所述同步模块用于将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器;所述发送模块用于将所述操作请求发送至所述目标分片数据库。In a second aspect, the embodiment of the present invention provides a sub-database database system, including: L fragment databases and N sub-database servers, wherein the L and N are natural numbers greater than 1; the sub-library server includes parsing a module, a calculation module, a saving module, a synchronization module, and a sending module; the parsing module is configured to parse the query condition carried by the operation request when the sub-database server receives an operation request from the client; For calculating a target fragment database corresponding to the operation request according to the query condition when the target fragment database needs to be calculated; the saving module is configured to use the query condition and the target calculated by the calculation module Corresponding relationship of the fragmentation database is saved to the local cache of the sub-database server; the synchronization module is configured to synchronously update the correspondence relationship to at least one sub-database server in the sub-database database system that does not process the operation request; The sending module is configured to send the operation request to the target fragment database.
第三方面,本发明实施例提供了一种计算机程序,应用于分库数据库系统,所述计算机程序用于控制:所述各分库服务器在接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;在需计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;所述各分库服务器保存所述查询条件与目标分片数据库的对应关系,并将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器;将所述操作请求发送至所述目标分片数据库。In a third aspect, an embodiment of the present invention provides a computer program, which is applied to a sub-database database system, where the computer program is configured to: when each sub-library server receives an operation request from a client, parsing the The query condition carried by the operation request; when the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; and each of the database servers saves the query condition and the target fragment database Corresponding the relationship, and synchronously updating the corresponding relationship to at least one of the sub-database database systems that does not process the operation request; and sending the operation request to the target fragment database.
第四方面,本发明实施例提供了一种非易失性计算机存储介质,存储有 计算机可执行指令,所述计算机可执行指令应用于分库数据库系统,所述计算机可执行指令设置为:所述各分库服务器在接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;在需计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;所述各分库服务器保存所述查询条件与目标分片数据库的对应关系,并将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器;将所述操作请求发送至所述目标分片数据库。In a fourth aspect, an embodiment of the present invention provides a non-volatile computer storage medium, where Computer executable instructions, the computer executable instructions being applied to a library database system, the computer executable instructions being configured to: when each of the database servers receives an operation request from a client, parse the operation request to carry a query condition; when the target fragment database is to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; and each of the database servers stores a correspondence between the query condition and the target fragment database. And updating the corresponding relationship to at least one of the sub-database database systems that does not process the operation request; and sending the operation request to the target fragment database.
第五方面,本发明实施例提供了一种分库服务器系统,包括:L个分片数据库和N个分库服务器,所述L、N均为大于1的自然数;所述分库服务器包括:第一通信组件,至少一个通信连接于所述第一通信组件的第一处理器;以及,与所述至少一个第一处理器通信连接的第一存储器;其中,所述第一存储器存储有可被所述至少一个第一处理器执行的第一指令,所述第一指令被所述至少一个第一处理器执行,以使所述至少一个第一处理器能够:在通过所述第一通信组件接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;在需计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;保存所述查询条件与目标分片数据库的对应关系,并通过所述第一通信组件发送所述对应关系以同步更新所述对应关系至,所述分库服务器所在的分库数据库系统中至少一未处理该操作请求的分库服务器;通过所述第一通信组件发送所述操作请求以便所述目标分片数据库处理所述操作请求;所述分片数据库包括:第二通信组件,至少一个通信连接于所述第二通信组件的第二处理器;以及,与所述至少一个第二处理器通信连接的第二存储器;其中,所述第二存储器存储有可被所述至少一个第二处理器执行的第二指令,所述第二指令被所述至少一个第二处理器执行,以使所述至少一个第二处理器能够:通过所述第二通信组件接收并处理所述操作请求。In a fifth aspect, an embodiment of the present invention provides a database server system, including: L fragment databases and N database servers, wherein the L and N are natural numbers greater than 1; the library server includes: a first communication component, at least one first processor communicatively coupled to the first communication component; and a first memory communicatively coupled to the at least one first processor; wherein the first memory is a first instruction executed by the at least one first processor, the first instruction being executed by the at least one first processor to enable the at least one first processor to: pass the first communication When the component receives the operation request from the client, the query obtains the query condition carried by the operation request; when the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; Querying a correspondence between the condition and the target fragmentation database, and transmitting the correspondence by the first communication component to synchronously update the correspondence to At least one sub-library server that does not process the operation request in the sub-database database system in which the library server is located; the operation request is sent by the first communication component to process the operation request by the target fragment database; the fragmentation The database includes: a second communication component, at least one second processor communicatively coupled to the second communication component; and a second memory communicatively coupled to the at least one second processor; wherein the second memory Storing a second instruction executable by the at least one second processor, the second instruction being executed by the at least one second processor to enable the at least one second processor to: pass the The second communication component receives and processes the operation request.
本发明实施例提供的分库数据库系统及其路由方法,针对需要根据来自 客户端的操作请求进行计算处理以路由到目标分片数据库的情形,将计算得到的操作请求与目标分片数据库的对应关系进行本地保存,同时同步更新至分库数据库系统中至少一未处理该操作请求的分库服务器,从而通过分库数据库系统中的多个分库服务器之间的数据同步的方式减少相同操作请求的重复计算,有助于提高分库数据库系统的处理效率。The sub-database database system and the routing method thereof provided by the embodiments of the present invention are provided according to requirements The operation request of the client is calculated and processed to be routed to the target shard database, and the corresponding relationship between the calculated operation request and the target shard database is locally saved, and simultaneously updated to at least one unprocessed operation in the database system. The requested sub-library server reduces the double counting of the same operation request by means of data synchronization between the plurality of sub-database servers in the sub-database database system, which helps to improve the processing efficiency of the sub-database database system.
在一个实施例中,在将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器中,将所述对应关系同步更新至所述分库数据库系统中未处理该操作请求的所有分库服务器。从而使得系统具有较高的运行效率。In an embodiment, the corresponding relationship is synchronously updated to the at least one of the sub-database servers in the sub-database database system that does not process the operation request, and the corresponding relationship is synchronously updated to the sub-database database system. All sub-library servers for this operation request are not processed. Thereby the system has higher operating efficiency.
在一个实施例中,将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器,具体包括:所述分库服务器将所述对应关系同步更新至集中式缓存服务器;所述集中式缓存服务器将更新的所述对应关系,同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器。通过集中式缓存服务器进行数据更新中转,一方面有利于降低各分库服务器的负担,另一方面,有利于对计算结果进行较长时间的保存。In an embodiment, updating the corresponding relationship to the at least one of the sub-databases in the sub-database database system that does not process the operation request, specifically: the sub-library server synchronously updates the corresponding relationship to the centralized a cache server; the centralized cache server synchronously updates the updated correspondence to at least one of the sub-library database systems that does not process the operation request. Data update relaying through the centralized cache server is beneficial to reduce the burden on each database server, and on the other hand, it is beneficial to save the calculation results for a long time.
在一个实施例中,所述集中式缓存服务器将更新的所述对应关系,同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器,具体包括:所述集中式缓存服务器发布关于所述对应关系的更新消息;所述分库数据库系统中至少一未处理该操作请求的分库服务器在监听到所述集中式缓存服务器发布的更新消息时进行同步更新。从而使得各分库服务器之间的数据更新可以快速同步。In an embodiment, the centralized cache server synchronously updates the updated correspondence to at least one of the sub-database database systems that does not process the operation request, and specifically includes: the centralized cache The server issues an update message about the corresponding relationship; at least one of the database servers in the database database that has not processed the operation request performs synchronous update when listening to the update message issued by the centralized cache server. This allows data updates between the various library servers to be quickly synchronized.
附图说明DRAWINGS
图1是根据现有技术分库数据库系统的路由方法的流程图;1 is a flow chart of a routing method of a database system according to the prior art;
图2是根据本发明实施例一分库数据库系统的路由方法的流程图; 2 is a flow chart of a routing method of a database database system according to an embodiment of the present invention;
图3是根据本发明实施例二分库数据库系统的路由方法的流程图;3 is a flow chart of a routing method of a binary database system according to an embodiment of the present invention;
图4是根据本发明实施例三分库数据库系统的结构示意图;4 is a schematic structural diagram of a three-part database system according to an embodiment of the present invention;
图5是根据本发明实施例三分库数据库系统各分库服务器的结构示意图;FIG. 5 is a schematic structural diagram of each of the sub-database servers of the three-part database system according to an embodiment of the present invention; FIG.
图6是根据本发明实施例四分库数据库系统的结构示意图;6 is a schematic structural diagram of a four-base database system according to an embodiment of the present invention;
图7是根据本发明实施例四分库服务器的结构示意图;7 is a schematic structural diagram of a four-branch server according to an embodiment of the present invention;
图8是根据本发明实施例五分库服务器的结构示意图;FIG. 8 is a schematic structural diagram of a five-pack library server according to an embodiment of the present invention; FIG.
图9是根据本发明实施例五分片数据库的结构示意图。9 is a block diagram showing the structure of a five-slice database according to an embodiment of the present invention.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本发明部分实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请各所要求保护的技术方案。In order to make the objects, technical solutions and advantages of the present application more clear, some embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be apparent to those skilled in the art that, in the various embodiments of the present invention, numerous technical details are set forth in order to provide a better understanding of the application. However, the technical solutions claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
本发明的实施例一涉及一种分库数据库系统的路由方法,作为举例而非限制,该分库数据库系统的路由方法可以应用于电子商务、金融、电信等的应用。其中,分库数据库系统包括:L个分片数据库和N个分库服务器,L、N均为大于1的自然数。N个分库服务器采用集群部署方式,对接收到的操作请求进行目标分片数据库的路由。 Embodiment 1 of the present invention relates to a routing method of a database database system. By way of example and not limitation, the routing method of the database database system can be applied to applications of e-commerce, finance, telecommunications, and the like. The sub-database database system includes: L fragment databases and N branch servers, and L and N are natural numbers greater than 1. The N sub-database servers adopt the cluster deployment mode to route the target fragmentation database to the received operation request.
如图2所示,该分库数据库系统的路由方法的包括以下步骤:As shown in FIG. 2, the routing method of the database database system includes the following steps:
步骤201:各分库服务器在接收到来自客户端的操作请求时,解析得到操作请求携带的查询条件。比如,操作请求中可以携带用于指示操作的操作值,用于对分片数据库进行路由的查询条件,以及查询条件对应的值等,当 然,本领域技术人员可以知晓操作请求携带的信息的其他变形。Step 201: When receiving the operation request from the client, each of the database servers parses the query condition carried by the operation request. For example, the operation request may carry an operation value for indicating an operation, a query condition for routing the fragmentation database, and a value corresponding to the query condition, etc. However, those skilled in the art will be aware of other variations of the information carried by the operational request.
步骤202:根据查询条件在分库服务器的本地缓存中定位目标分片数据库。Step 202: Locating the target fragment database in the local cache of the branch server according to the query condition.
步骤203:判断在本地缓存中是否命中到目标分片数据库。Step 203: Determine whether the target fragment database is hit in the local cache.
具体而言,分库服务器的本地缓存中比如存储有主键字段的值与分片对应关系的键值对,则当传入的值为主键值且有对应的目标分片数据库时,即可在本地缓存中命中该操作请求对应的目标分片数据库。本实施例中如果根据查询条件未在分库服务器的本地缓存中命中目标分片数据库,则执行步骤204;如果根据查询条件在分库服务器的本地缓存中命中目标分片数据库,则执行步骤209。Specifically, in the local cache of the database server, for example, a key value pair in which the value of the primary key field and the corresponding relationship of the fragment are stored, when the value passed in is the primary key value and the corresponding target fragment database is available, Hit the target fragment database corresponding to the operation request in the local cache. In this embodiment, if the target fragment database is not hit in the local cache of the database server according to the query condition, step 204 is performed; if the target fragment database is hit in the local cache of the database server according to the query condition, step 209 is performed. .
步骤204:判断查询条件是否包括主键字段。如果查询条件包括主键字段,则执行步骤206,本实施例中,如果查询条件不包括主键字段,则默认查询条件包含分段路由,则执行步骤205。Step 204: Determine whether the query condition includes a primary key field. If the query condition includes the primary key field, step 206 is performed. In this embodiment, if the query condition does not include the primary key field, and the default query condition includes the segmentation route, step 205 is performed.
步骤205:根据分片路由的字段值以及分库服务器支持的分片策略计算得到目标分片数据库。Step 205: Calculate the target fragment database according to the field value of the fragmentation route and the fragmentation policy supported by the database server.
步骤206:根据主键字段的传入值计算查询条件对应的目标分片数据库。Step 206: Calculate a target fragment database corresponding to the query condition according to the input value of the primary key field.
本领域技术人员知晓在步骤205、206中可以采用现有分库数据库路由的计算方法进行路由计算,此处不再赘述。值得一提的是,在根据主键字段的传入值计算得到查询条件对应的目标分片数据库时,将该主键字段与该目标分片数据库的对应关系保存为键值对。Those skilled in the art are aware that in the steps 205, 206, the calculation method of the existing database database routing can be used for route calculation, and details are not described herein again. It is worth mentioning that when the target fragment database corresponding to the query condition is calculated according to the input value of the primary key field, the correspondence between the primary key field and the target fragment database is saved as a key value pair.
步骤207:各分库服务器保存查询条件与分片数据库的对应关系。本实施例中,各分库服务器将查询条件与目标分片数据库的对应关系保存至本地缓存。即根据步骤205或者步骤206的计算结果将查询条件与目标分片数据库的对应关系进行保存。 Step 207: Each sub-database server saves the correspondence between the query condition and the fragment database. In this embodiment, each of the database servers saves the correspondence between the query condition and the target fragment database to the local cache. That is, the correspondence between the query condition and the target fragment database is saved according to the calculation result of step 205 or step 206.
步骤208:将对应关系同步更新至分库数据库系统中至少一未处理该操作请求的分库服务器。Step 208: Synchronously update the correspondence to at least one of the sub-database servers in the sub-database database system that does not process the operation request.
作为举例而非限制,本实施例中将对应关系同步更新至分库数据库系统中未处理该操作请求的所有分库服务器。换句话说,即是将该对应关系同步更新至未处理该操作请求的L-1个分库服务器。在集群式分库部署方案中,分库服务器越多,数据库系统的路由能力越强,响应速度越快。通过将各分库服务器实时计算得到的操作请求与分片数据库的对应结果同步至系统中其他的分库服务器,就可以减少系统处理相同请求时的重复计算次数,相当于同步提高了其他分库服务器在处理相同请求时的处理速度,从而提高系统的处理速度,在高并发的访问情况下可以有效节省宝贵的CPU资源,提高硬件资源的使用率。By way of example and not limitation, in this embodiment, the correspondence is synchronously updated to all the sub-database servers in the sub-database database system that have not processed the operation request. In other words, the correspondence is updated synchronously to the L-1 database servers that have not processed the operation request. In a clustered sub-library deployment scenario, the more sub-database servers, the stronger the routing capability of the database system and the faster the response. By synchronizing the operation request calculated by each sub-database server in real time with the corresponding result of the fragment database to other sub-library servers in the system, the number of repeated calculations when the system processes the same request can be reduced, which is equivalent to the synchronization to improve other sub-libraries. The processing speed of the server when processing the same request, thereby improving the processing speed of the system, and effectively saving valuable CPU resources and increasing the utilization rate of hardware resources in the case of high concurrent access.
步骤209:将操作请求发送至目标分片数据库。即根据操作请求在对应的目标分片数据库(即L个分片数据库中实际存放数据表的一个数据库)执行相应的增、删、查、改等的操作。Step 209: Send the operation request to the target shard database. That is, according to the operation request, the corresponding operations of adding, deleting, checking, changing, etc. are performed in the corresponding target fragment database (ie, a database in which the data tables are actually stored in the L fragment databases).
需要说明的是,本实施例中客户端请求可以由负载均衡器转发至分库服务器,从而在高并发场景下,较好地协调各分库服务器地处理任务。It should be noted that, in this embodiment, the client request may be forwarded by the load balancer to the branch server, so that the processing tasks of each branch server are better coordinated in a high concurrent scenario.
值得一提的是,本实施例中,分库数据库系统的路由方法还包括以下步骤:根据分库服务器中更新的对应关系的使用频率对分库服务器的本地缓存进行动态清理。由于各分库服务器本地缓存的存储能力有限,并且一个分库服务器本地缓存还要与其他分库服务器的计算结果同步,导致分库服务器中存储的数据量会快速增加,当本地缓存中的数据积累到一定程度时,将无法同步更新,因此,就需要对本地缓存中的数据进行及时清理,本实施例中,根据本地缓存中数据的使用频率进行清理,本领域技术人员亦知晓其他本地缓存的清理策略,此处不再赘述。It is worth mentioning that, in this embodiment, the routing method of the database database system further includes the following steps: dynamically cleaning the local cache of the database server according to the frequency of use of the updated correspondence in the database server. Due to the limited storage capacity of the local cache of each sub-database server, and the local cache of a sub-database server is also synchronized with the calculation results of other sub-library servers, the amount of data stored in the sub-library server will increase rapidly, when the data in the local cache is cached. When the data is accumulated to a certain extent, the update cannot be synchronized. Therefore, the data in the local cache needs to be cleaned up in time. In this embodiment, the data is cleaned according to the frequency of use of the data in the local cache, and other local caches are known to those skilled in the art. Cleanup strategy, no longer repeat here.
本实施例中,当未在分库服务器的本地缓存中命中来自客户端的操作请 求的目标分片数据库时,根据操作请求解析出的查询条件进行计算,从而得到查询条件对应的目标分片数据库。本实施例不仅能够对计算结果进行本地缓存,而且可以将计算结果同步更新至其他分库服务器,从而在高并发的情况下,相同的操作请求进行一次计算即可,大大减小了重复计算量,进而减少各分库服务器的任务量,从而有利于提高分库数据库系统的处理效率。In this embodiment, when the operation from the client is not hit in the local cache of the database server, please When the target fragment database is obtained, the calculation is performed according to the query condition parsed by the operation request, thereby obtaining the target fragment database corresponding to the query condition. In this embodiment, not only can the calculation result be locally cached, but also the calculation result can be synchronously updated to other sub-database servers, so that in the case of high concurrency, the same operation request can be performed once, which greatly reduces the amount of repetitive calculation. In turn, the task volume of each sub-database server is reduced, thereby facilitating the processing efficiency of the sub-database database system.
本发明的实施例二涉及一种分库数据库系统的路由方法。实施例二与实施例一大致相同,主要区别之处在于:在实施例一中,各分库服务器之间直接进行查询条件和目标服务器的对应关系的同步更新,在实施例二中,利用集中式缓存服务器将请求和分片数据库的对应关系同步更新至其他分库服务器。 Embodiment 2 of the present invention relates to a routing method of a database database system. The second embodiment is substantially the same as the first embodiment. The main difference is that in the first embodiment, the synchronization between the query condition and the target server is directly updated between the database servers. In the second embodiment, the usage is centralized. The cache server updates the correspondence between the request and the fragment database to other sub-library servers.
如图3所示,本实施例中,步骤301至步骤307与第一实施方式中步骤201至步骤207对应相同,步骤309与实施例二步骤209对应相同。在步骤308中,在将对应关系同步更新至分库数据库系统中至少一未处理该操作请求的分库服务器的步骤之中,包括以下子步骤:As shown in FIG. 3, in this embodiment, steps 301 to 307 are the same as steps 201 to 207 in the first embodiment, and step 309 is the same as step 209 in the second embodiment. In step 308, in the step of synchronously updating the correspondence to at least one of the sub-database servers in the sub-database system that does not process the operation request, the following sub-steps are included:
子步骤3080:各分库服务器将对应关系同步更新至集中式缓存服务器。Sub-step 3080: Each of the library servers synchronizes the correspondence to the centralized cache server.
子步骤3081:将集中式缓存服务器更新的对应关系同步更新至分库数据库系统中至少一未处理该操作请求的分库服务器。Sub-step 3081: Synchronously update the correspondence of the centralized cache server update to at least one of the sub-library database systems that does not process the operation request.
在子步骤3080中,各分库服务器可以实时地将对应关系保存至集中式缓存服务器,而在子步骤3081中,集中式缓存服务器发布关于对应关系的更新消息,分库数据库系统中未处理该操作请求的所有分库服务器在监听到集中式缓存服务器发布的更新消息时进行同步更新。由于本实施例增加了集中式缓存服务器,从而可以方便地将各分库服务器中本地缓存中新增的对应关系同步更新至集中器缓存服务器,并由集中式缓存服务器负责将该对应关系同步至其他未处理该操作请求的分库服务器,从而将各分库服务器还需要实时与其他分库服务器之间进行数据同步的负担中解放出来,降低了各分库服 务器数据同步的复杂度。In sub-step 3080, each of the library servers may save the correspondence to the centralized cache server in real time, and in sub-step 3081, the centralized cache server issues an update message regarding the corresponding relationship, which is not processed in the database system. All the sub-library servers of the operation request synchronize updates when they listen to the update message issued by the centralized cache server. Since the centralized cache server is added in this embodiment, the newly added correspondence in the local cache of each branch server can be conveniently updated to the concentrator cache server, and the centralized cache server is responsible for synchronizing the correspondence to Other sub-library servers that have not processed the operation request, thereby freeing each sub-library server from the burden of data synchronization between other sub-library servers in real time, reducing the sub-library services The complexity of server data synchronization.
需要说明的是,本实施例中,集中式缓存服务器中的数据(存储的对应关系)会不断增加,导致占用较多的磁盘空间,因此,本实施例中还可以根据预设条件对集中式缓存服务器保存的对应关系进行清理。具体而言,可以采用以下预设条件,比如:达到预设清理周期或者达到预设的保存数据量。当预设条件为达到预设清理周期时,预设清理设置可以设置为1个月,这样,每个月会对集中式缓存服务器中的数据进行清理,当预设条件为达到预设的保存数据量时,预设数据量比如为500GB,这样可以避免集中式缓存服务器中的数据量过大。It should be noted that, in this embodiment, the data (the corresponding relationship of the storage) in the centralized cache server is increased, which results in a large amount of disk space. Therefore, in this embodiment, the centralized The corresponding relationship saved by the cache server is cleaned up. Specifically, the following preset conditions may be adopted, such as: reaching a preset cleaning period or reaching a preset amount of saved data. When the preset condition is that the preset cleaning period is reached, the preset cleaning setting can be set to 1 month, so that the data in the centralized cache server is cleaned every month, when the preset condition is the preset save. When the amount of data is limited, the preset amount of data is, for example, 500 GB, so that the amount of data in the centralized cache server is prevented from being excessive.
本实施例通过集中式缓存服务器对于各分库服务器的计算结果进行保存,然后再向其他分库服务器发布更新消息,而其他分库服务器则可以在较为空闲时对本地缓存进行更新,从而使得各分库服务器之间可以更加协调地进行工作。并且,由于增加了集中式缓存服务器,在整个分库数据库系统进行分库、分表扩展时,某个分库服务器中的分片数据库和分片字段之间的对应关系可能会发生变更,从而可以通过集中式缓存服务器将一个分库服务器中的变化同步至其他分库服务器。In this embodiment, the centralized cache server saves the calculation result of each sub-database server, and then releases the update message to other sub-library servers, and the other sub-library servers can update the local cache when they are relatively idle, thereby making each Work can be done more harmoniously between the library servers. Moreover, due to the addition of the centralized cache server, the correspondence between the fragment database and the fragmentation field in a certain sub-database server may be changed when the entire sub-database database system performs sub-database and sub-table expansion. You can synchronize changes in one sub-library server to other sub-library servers through a centralized caching server.
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包含包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided for the sake of clarity of description. The implementation may be combined into one step or split into certain steps and decomposed into multiple steps, as long as the inclusion of the same logical relationship is within the scope of protection of this patent. The core design of adding insignificant modifications or introducing insignificant designs to an algorithm or process without changing its algorithms and processes is within the scope of this patent.
本发明第三实施方式涉及一种分库数据库系统,包括:L个分片数据库1和N个分库服务器2,L、N均为大于1的自然数。如图4、5所示,分库服务器2包括解析模块20、计算模块21、保存模块22、同步模块23、发送模块24和本地缓存25。 A third embodiment of the present invention relates to a sub-database database system, comprising: L fragment databases 1 and N branch servers 2, wherein L and N are natural numbers greater than one. As shown in FIGS. 4 and 5, the branch server 2 includes a parsing module 20, a computing module 21, a saving module 22, a synchronizing module 23, a transmitting module 24, and a local cache 25.
解析模块用于在分库服务器接收到来自客户端的操作请求时,解析得到操作请求携带的查询条件。计算模块用于在需要计算目标分片数据库时,本实施例中,计算模块用于在该分库服务器未在本地缓存中命中目标分片数据库时,根据查询条件计算所述操作请求对应的目标分片数据库。保存模块用于将查询条件和计算模块计算出的目标分片数据库的对应关系保存至分库服务器的本地缓存25。同步模块用于将对应关系同步更新至分库数据库系统中至少一未处理该操作请求的分库服务器。本实施例中,同步模块用于将对应关系同步更新至分库数据库系统中所有未处理该操作请求的分库服务器。发送模块用于将操作请求发送至目标分片数据库。The parsing module is configured to parse the query condition carried by the operation request when the sub-database server receives the operation request from the client. The calculation module is configured to calculate a target fragment database, in this embodiment, the calculation module is configured to calculate a target corresponding to the operation request according to the query condition when the database server does not hit the target fragment database in the local cache. Fragment database. The saving module is configured to save the correspondence between the query condition and the target fragment database calculated by the calculation module to the local cache 25 of the branch server. The synchronization module is configured to synchronously update the correspondence to at least one of the sub-library database systems that does not process the operation request. In this embodiment, the synchronization module is configured to synchronously update the corresponding relationship to all the sub-database servers in the sub-database database system that have not processed the operation request. The sending module is used to send an operation request to the target shard database.
不难发现,本实施例为与实施例一相对应的系统实施例,本实施例可与实施例一互相配合实施。实施例一中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在实施例一中。It is not difficult to find that the embodiment is a system embodiment corresponding to the first embodiment, and the embodiment can be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce the repetition. Correspondingly, the related technical details mentioned in this embodiment can also be applied in the first embodiment.
值得一提的是,本实施例中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本发明的创新部分,本实施例中并没有将与解决本发明所提出的技术问题关系不太密切的单元引入,但这并不表明本实施例中不存在其它的单元。It is worth mentioning that each module involved in this embodiment is a logic module. In practical applications, a logical unit may be a physical unit, a part of a physical unit, or multiple physical entities. A combination of units is implemented. In addition, in order to highlight the innovative part of the present invention, the unit which is not closely related to solving the technical problem proposed by the present invention is not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
本发明实施例四涉及一种分库数据库系统。实施例四与实施例三大致相同,主要区别之处在于:在实施例三中,各分库服务器之间直接进行同步,在实施例四中,如图6所示,分库数据库系统还包括集中式缓存服务器3。各分库服务器2的同步模块用于将查询条件和目标分片数据库1的对应关系同步更新至集中式缓存服务器3,并将集中式缓存服务器3更新的对应关系同步更新至分库数据库系统中未处理该操作请求的所有分库服务器2。Embodiment 4 of the present invention relates to a sub-database database system. The fourth embodiment is substantially the same as the third embodiment. The main difference is that in the third embodiment, the database servers directly synchronize with each other. In the fourth embodiment, as shown in FIG. 6, the database database system further includes Centralized cache server 3. The synchronization module of each sub-database server 2 is configured to synchronously update the correspondence between the query condition and the target fragmentation database 1 to the centralized cache server 3, and synchronously update the corresponding relationship of the centralized cache server 3 update to the sub-database database system. All sub-library servers 2 for this operation request are not processed.
由于实施例二与本实施例相互对应,因此本实施例可与实施例二互相配 合实施。实施例二中提到的相关技术细节在本实施例中依然有效,在实施例二中所能达到的技术效果在本实施例中也同样可以实现,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在实施例二中。Since the second embodiment and the embodiment correspond to each other, the embodiment can be matched with the second embodiment. Implementation. The technical details mentioned in the second embodiment are still effective in this embodiment, and the technical effects that can be achieved in the second embodiment can also be implemented in the embodiment. To reduce the repetition, details are not described herein again. Correspondingly, the related technical details mentioned in this embodiment can also be applied in the second embodiment.
在实际应用中,如图7所示,分库服务器可以包含:处理器、存储器和收发器,存储器和收发器均连接于处理器。在分库服务器接收到来自客户端的操作请求时,处理器从操作请求中解析出查询条件,并访问存储器,判断存储器中是否存储有与查询条件对应的目标分片数据库,当在存储器中未查到与查询条件对应的目标分片数据库时,则处理器根据查询条件计算得到目标分片数据库,比如,处理器根据查询条件中的分片字段的传入值与分片策略计算得到目标分片数据库或者根据查询条件中的主键字段的传入值计算得到目标分片数据库,处理器通过收发器将操作请求发送至对应的目标分片数据库。同时,处理器将查询条件与计算得到的目标分片数据库的对应关系保存入存储器,并通过收发器将该对应关系发送至集中式缓存服务器,同时,处理器将该对应关系发送至集中式缓存服务器。集中式缓存服务器对该对应关系进行存储并向分库数据库系统中其他未处理该操作请求的分库服务器发布关于该存储事件的消息,监听到该存储事件的消息的分库服务器则从集中式缓存服务器中获取该对应关系,并将该对应关系存储在本地存储器中。In a practical application, as shown in FIG. 7, the branch server may include: a processor, a memory, and a transceiver, and the memory and the transceiver are both connected to the processor. When the database server receives the operation request from the client, the processor parses the query condition from the operation request, and accesses the memory to determine whether the target fragment database corresponding to the query condition is stored in the memory, and is not checked in the memory. When the target fragment database corresponding to the query condition is obtained, the processor calculates the target fragment database according to the query condition. For example, the processor calculates the target fragment according to the incoming value of the fragment field in the query condition and the fragmentation strategy. The database or the target fragment database is calculated according to the incoming value of the primary key field in the query condition, and the processor sends the operation request to the corresponding target fragment database through the transceiver. At the same time, the processor saves the correspondence between the query condition and the calculated target fragment database into the memory, and sends the correspondence to the centralized cache server through the transceiver, and the processor sends the correspondence to the centralized cache. server. The centralized cache server stores the corresponding relationship and issues a message about the storage event to the other database server in the database database system that does not process the operation request, and the database server that listens to the message storing the event is centralized. The corresponding relationship is obtained in the cache server, and the corresponding relationship is stored in the local storage.
本发明第五实施方式涉及分库服务器系统,包括:L个分片数据库和N个分库服务器,所述L、N均为大于1的自然数。A fifth embodiment of the present invention relates to a library server system, comprising: L fragment databases and N database servers, wherein L and N are natural numbers greater than one.
如图8所示,分库服务器800包括:第一通信组件801,至少一个通信连接于第一通信组件801的第一处理器802;以及,与至少一个第一处理器801通信连接的第一存储器803。图8中以一个处理器802为例。处理器802、存储器803、第一通信组件801可以通过总线或者其他方式连接,图8中以通过总线连接为例。 As shown in FIG. 8, the branch server 800 includes: a first communication component 801, at least one first processor 802 communicatively coupled to the first communication component 801; and a first communication connection with the at least one first processor 801 Memory 803. One processor 802 is taken as an example in FIG. The processor 802, the memory 803, and the first communication component 801 may be connected by a bus or other means, and the bus connection is taken as an example in FIG.
其中,第一存储器803存储有可被少一个第一处理器802执行的第一指令,第一指令被至少一个第一处理器802执行,以使至少一个第一处理器802能够:在通过第一通信组件801接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件。在需计算目标分片数据库时,根据查询条件计算操作请求对应的目标分片数据库。保存查询条件与目标分片数据库的对应关系,并通过第一通信组件801发送对应关系以同步更新对应关系至,分库服务器所在的分库数据库系统中至少一未处理该操作请求的分库服务器。通过第一通信组件发送操作请求以便目标分片数据库处理操作请求。The first memory 803 stores a first instruction that can be executed by one less first processor 802, and the first instruction is executed by the at least one first processor 802, so that the at least one first processor 802 can: pass the When the communication component 801 receives the operation request from the client, it parses the query condition carried by the operation request. When the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition. The corresponding relationship between the query condition and the target fragment database is saved, and the corresponding relationship is sent by the first communication component 801 to synchronously update the correspondence relationship, and at least one of the sub-database database systems in which the sub-database server is located does not process the operation request. . An operation request is sent by the first communication component to process the operation request by the target shard database.
其中,第一存储器803作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本发明实施例中的路由方法对应的对应的程序指令/模块(例如,附图5所示的解析模块20、计算模块21、保存模块22、同步模块23和发送模块24)。处理器802通过运行存储在第一存储器803中的非易失性软件程序、指令以及模块,从而执行分库服务器的各种功能应用以及数据处理,即实现上述方法实施例路由方法的处理方法。The first memory 803 is used as a non-volatile computer readable storage medium, and can be used for storing a non-volatile software program, a non-volatile computer executable program, and a module, as in the routing method in the embodiment of the present invention. Corresponding program instructions/modules (for example, parsing module 20, computing module 21, saving module 22, synchronization module 23, and transmitting module 24 shown in FIG. 5). The processor 802 executes various functional applications and data processing of the library server by running the non-volatile software programs, instructions, and modules stored in the first memory 803, that is, the processing method of the routing method of the foregoing method embodiment.
第一存储器803可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储用于路由方法的处理方法所创建的数据等。此外,第一存储器803可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。第一通信组件包括高速局域网。The first memory 803 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created by a processing method for the routing method, and the like. . Further, the first memory 803 may include a high speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. The first communication component includes a high speed local area network.
所述一个或者多个模块存储在所述第一存储器803中,当被所述一个或者多个第一处理器802执行时,执行上述任意方法实施例中的路由方法的处理方法。The one or more modules are stored in the first memory 803, and when executed by the one or more first processors 802, perform a processing method of the routing method in any of the above method embodiments.
如图9所示,分片数据库900包括:第二通信组件901,至少一个通信连接于第二通信组件902的第二处理器903;以及,与至少一个第二处理器 902通信连接的第二存储器903。其中,第二存储器903存储有可被至少一个第二处理器902执行的第二指令,第二指令被至少一个第二处理器902执行,以使至少一个第二处理器902能够:通过第二通信组件接收并处理操作请求。其中,一个或多个第二处理器902以及第二存储器903,图9中以一个第二处理器902为例。第二处理器902、第二存储器903和第二通信组件901可以通过总线或者其他方式连接,图9中以通过总线连接为例。As shown in FIG. 9, the fragment database 900 includes: a second communication component 901, at least one second processor 903 communicatively coupled to the second communication component 902; and, with at least one second processor 902 is communicatively coupled to the second memory 903. The second memory 903 stores a second instruction executable by the at least one second processor 902, and the second instruction is executed by the at least one second processor 902 to enable the at least one second processor 902 to: pass the second The communication component receives and processes the operation request. The one or more second processors 902 and the second memory 903 are exemplified by a second processor 902 in FIG. The second processor 902, the second memory 903, and the second communication component 901 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
上述产品可执行本发明实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的方法。The above product can perform the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiments of the present invention.
本实施例中,当未在分库服务器的本地缓存中命中来自客户端的操作请求的目标分片数据库时,根据操作请求解析出的查询条件进行计算,从而得到查询条件对应的目标分片数据库。本实施例不仅能够对计算结果进行本地缓存,而且可以将计算结果同步更新至其他分库服务器,从而在高并发的情况下,相同的操作请求进行一次计算即可,大大减小了重复计算量,进而减少各分库服务器的任务量,从而有利于提高分库数据库系统的处理效率。In this embodiment, when the target fragment database of the operation request from the client is not hit in the local cache of the database server, the query condition parsed according to the operation request is calculated, thereby obtaining the target fragment database corresponding to the query condition. In this embodiment, not only can the calculation result be locally cached, but also the calculation result can be synchronously updated to other sub-database servers, so that in the case of high concurrency, the same operation request can be performed once, which greatly reduces the amount of repetitive calculation. In turn, the task volume of each sub-database server is reduced, thereby facilitating the processing efficiency of the sub-database database system.
本发明第九实施方式涉及一种非易失性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的路由方法的处理方法。A ninth embodiment of the present invention is directed to a nonvolatile computer storage medium storing computer executable instructions that can execute the processing method of the routing method in any of the above method embodiments.
本实施例不仅能够对计算结果进行本地缓存,而且可以将计算结果同步更新至其他分库服务器,从而在高并发的情况下,相同的操作请求进行一次计算即可,大大减小了重复计算量,进而减少各分库服务器的任务量,从而有利于提高分库数据库系统的处理效率。In this embodiment, not only can the calculation result be locally cached, but also the calculation result can be synchronously updated to other sub-database servers, so that in the case of high concurrency, the same operation request can be performed once, which greatly reduces the amount of repetitive calculation. In turn, the task volume of each sub-database server is reduced, thereby facilitating the processing efficiency of the sub-database database system.
本发明第十实施方式涉及一种计算机程序,能够执行上述任意方法实施例中的路由方法。A tenth embodiment of the present invention relates to a computer program capable of executing the routing method in any of the above method embodiments.
本实施例不仅能够对计算结果进行本地缓存,而且可以将计算结果同步更新至其他分库服务器,从而在高并发的情况下,相同的操作请求进行一次 计算即可,大大减小了重复计算量,进而减少各分库服务器的任务量,从而有利于提高分库数据库系统的处理效率。This embodiment can not only locally cache the calculation result, but also update the calculation result to other sub-library servers synchronously, so that in the case of high concurrency, the same operation request is performed once. The calculation can be done, which greatly reduces the amount of repetitive calculation, thereby reducing the task amount of each sub-database server, thereby facilitating the processing efficiency of the sub-database database system.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on such understanding, the above technical solutions may be embodied in the form of software products in essence or in the form of software products, which may be stored in a computer readable storage medium such as a ROM/RAM or a disk. , an optical disk, etc., includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments or portions of the embodiments.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments are modified, or the equivalents of the technical features are replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (13)

  1. 一种分库数据库系统的路由方法,应用于分库数据库系统,所述分库数据库系统包括:L个分片数据库和N个分库服务器,所述L、N均为大于1的自然数;A routing method of a sub-database database system is applied to a sub-database database system, the sub-database database system comprises: L fragment databases and N sub-database servers, wherein the L and N are natural numbers greater than 1;
    所述路由方法包括:The routing method includes:
    所述各分库服务器在接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;When receiving the operation request from the client, each of the database servers parses the query condition carried by the operation request;
    在需计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;所述各分库服务器保存所述查询条件与目标分片数据库的对应关系,并将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器;When the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; the each database server stores the correspondence between the query condition and the target fragment database, and the The corresponding relationship is synchronously updated to at least one of the sub-database servers in the sub-database database system that does not process the operation request;
    将所述操作请求发送至所述目标分片数据库。The operation request is sent to the target shard database.
  2. 根据权利要求1所述的分库数据库系统的路由方法,其中,The routing method of the database database system according to claim 1, wherein
    在将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器中,将所述对应关系同步更新至所述分库数据库系统中未处理该操作请求的所有分库服务器。Updating the corresponding relationship to the at least one of the sub-database servers in the sub-database database system that does not process the operation request, and updating the corresponding relationship to the un-processed database system All sub-library servers.
  3. 根据权利要求1或者2所述的分库数据库系统的路由方法,其中,将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器,具体包括:The routing method of the sub-database database system according to claim 1 or 2, wherein the updating of the correspondence to the at least one of the sub-databases in the sub-database database system that does not process the operation request comprises:
    所述分库服务器将所述对应关系同步更新至集中式缓存服务器;The branch server synchronously updates the correspondence to a centralized cache server;
    所述集中式缓存服务器将更新的所述对应关系,同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器。The centralized cache server synchronously updates the updated correspondence to at least one of the sub-database databases that does not process the operation request.
  4. 根据权利要求3所述的分库数据库系统的路由方法,其中, The routing method of the database database system according to claim 3, wherein
    所述集中式缓存服务器将更新的所述对应关系,同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器,具体包括:The centralized cache server synchronously updates the updated correspondence to at least one of the sub-library database systems that does not process the operation request, and specifically includes:
    所述集中式缓存服务器发布关于所述对应关系的更新消息;The centralized cache server issues an update message regarding the correspondence relationship;
    所述分库数据库系统中至少一未处理该操作请求的分库服务器在监听到所述集中式缓存服务器发布的更新消息时进行同步更新。At least one of the sub-database servers in the database database system that does not process the operation request performs synchronous update when listening to the update message issued by the centralized cache server.
  5. 根据权利要求1到4任一项所述的分库数据库系统的路由方法,其中,还包括:The routing method of the database database system according to any one of claims 1 to 4, further comprising:
    在所述解析得到所述操作请求携带的查询条件后,根据所述查询条件在所述分库服务器的本地缓存中定位所述目标分片数据库;After the parsing obtains the query condition carried by the operation request, locate the target fragment database in a local cache of the branch server according to the query condition;
    如果根据所述查询条件未在所述本地缓存中命中所述目标分片数据库,则需计算目标分片数据库;If the target fragment database is not hit in the local cache according to the query condition, the target fragment database needs to be calculated;
    如果根据所述查询条件在所述本地缓存中命中所述目标分片数据库,则将所述操作请求发送至所述目标分片数据库。If the target shard database is hit in the local cache according to the query condition, the operation request is sent to the target shard database.
  6. 根据权利要求1到5任一项所述的分库数据库系统的路由方法,其中,在根据所述查询条件计算所述操作请求对应的目标分片数据库前,还包括:The routing method of the database database system according to any one of claims 1 to 5, further comprising: before calculating the target fragment database corresponding to the operation request according to the query condition,
    判断所述查询条件是否包括主键字段;Determining whether the query condition includes a primary key field;
    如果所述查询条件未包括主键字段,则根据所述查询条件中的分片路由的字段值以及所述分库服务器支持的分片策略计算得到所述目标分片数据库;If the query condition does not include a primary key field, the target fragment database is calculated according to the field value of the fragmentation route in the query condition and the fragmentation policy supported by the database server;
    如果所述查询条件包括主键字段,则根据所述主键字段的传入值计算所述主键字段对应的目标分片数据库。If the query condition includes a primary key field, the target fragment database corresponding to the primary key field is calculated according to the incoming value of the primary key field.
  7. 根据权利要求6所述的分库数据库系统的路由方法,其中,The routing method of the database database system according to claim 6, wherein
    在根据所述主键字段的传入值计算所述主键字段对应的目标分片数据 库后,还包括:Calculating target fragment data corresponding to the primary key field according to an incoming value of the primary key field After the library, it also includes:
    将所述主键字段和所述主键字段对应的目标分片数据库保存为键值对。The target fragment database corresponding to the primary key field and the primary key field is saved as a key value pair.
  8. 根据权利要求3到7任一项所述的分库数据库系统的路由方法,其中,在将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器后,还包括:The routing method of the sub-database database system according to any one of claims 3 to 7, wherein after the correspondence is synchronously updated to at least one of the sub-database servers in the sub-database system that has not processed the operation request ,Also includes:
    根据预设条件对所述集中式缓存服务器保存的对应关系进行清理;其中,所述预设条件包括:达到预设清理周期或者达到预设保存数据量。The corresponding relationship saved by the centralized cache server is cleared according to a preset condition, where the preset condition includes: reaching a preset cleaning period or reaching a preset saved data amount.
  9. 一种分库数据库系统,包括:L个分片数据库和N个分库服务器,所述L、N均为大于1的自然数;其中,所述分库服务器包括解析模块、计算模块、保存模块、同步模块和发送模块;A sub-database database system, comprising: L fragment databases and N sub-database servers, wherein the L and N are natural numbers greater than 1; wherein the sub-database server comprises a parsing module, a computing module, a saving module, Synchronization module and transmission module;
    所述解析模块用于在接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;The parsing module is configured to parse the query condition carried by the operation request when receiving an operation request from a client;
    所述计算模块用于在需要计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;The calculating module is configured to calculate, according to the query condition, a target fragment database corresponding to the operation request when the target fragment database needs to be calculated;
    所述保存模块用于将所述计算模块计算出的查询条件与目标分片数据库的对应关系保存至本分库服务器的本地缓存;The saving module is configured to save the correspondence between the query condition calculated by the calculating module and the target fragment database to the local cache of the library server;
    所述同步模块用于将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器;The synchronization module is configured to synchronously update the correspondence relationship to at least one of the sub-database database systems that does not process the operation request;
    所述发送模块用于将所述操作请求发送至所述目标分片数据库。The sending module is configured to send the operation request to the target fragment database.
  10. 根据权利要求9所述的分库数据库系统,其中,所述分库数据库系统还包括集中式缓存服务器;The sub-database database system according to claim 9, wherein said sub-database database system further comprises a centralized cache server;
    所述同步模块用于将所述对应关系同步更新至集中式缓存服务器,所述集中式缓存服务器将更新的所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器。 The synchronization module is configured to synchronously update the correspondence to a centralized cache server, and the centralized cache server synchronously updates the updated correspondence to at least one unprocessed operation request in the database system. Sub-library server.
  11. 一种计算机程序,应用于分库数据库系统,所述计算机程序用于控制:A computer program for use in a sub-database database system for controlling:
    所述各分库服务器在接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;When receiving the operation request from the client, each of the database servers parses the query condition carried by the operation request;
    在需计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;所述各分库服务器保存所述查询条件与目标分片数据库的对应关系,并将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器;When the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; the each database server stores the correspondence between the query condition and the target fragment database, and the The corresponding relationship is synchronously updated to at least one of the sub-database servers in the sub-database database system that does not process the operation request;
    将所述操作请求发送至所述目标分片数据库。The operation request is sent to the target shard database.
  12. 一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令应用于分库数据库系统,所述计算机可执行指令设置为:A non-volatile computer storage medium storing computer-executable instructions, the computer-executable instructions being applied to a sub-database database system, the computer-executable instructions being set to:
    所述各分库服务器在接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;When receiving the operation request from the client, each of the database servers parses the query condition carried by the operation request;
    在需计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;所述各分库服务器保存所述查询条件与目标分片数据库的对应关系,并将所述对应关系同步更新至所述分库数据库系统中至少一未处理该操作请求的分库服务器;When the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition; the each database server stores the correspondence between the query condition and the target fragment database, and the The corresponding relationship is synchronously updated to at least one of the sub-database servers in the sub-database database system that does not process the operation request;
    将所述操作请求发送至所述目标分片数据库。The operation request is sent to the target shard database.
  13. 一种分库服务器系统,包括:L个分片数据库和N个分库服务器,A library server system, comprising: L fragment databases and N database servers,
    所述L、N均为大于1的自然数;The L and N are both natural numbers greater than one;
    所述分库服务器包括:第一通信组件,至少一个通信连接于所述第一通信组件的第一处理器;以及,与所述至少一个第一处理器通信连接的第一存储器;其中,The library server includes: a first communication component, at least one first processor communicatively coupled to the first communication component; and a first memory communicatively coupled to the at least one first processor;
    所述第一存储器存储有可被所述至少一个第一处理器执行的第一指令, 所述第一指令被所述至少一个第一处理器执行,以使所述至少一个第一处理器能够:The first memory stores a first instruction executable by the at least one first processor, The first instruction is executed by the at least one first processor to enable the at least one first processor to:
    在通过所述第一通信组件接收到来自客户端的操作请求时,解析得到所述操作请求携带的查询条件;When receiving an operation request from the client by using the first communication component, parsing the query condition carried by the operation request;
    在需计算目标分片数据库时,根据所述查询条件计算所述操作请求对应的目标分片数据库;When the target fragment database needs to be calculated, the target fragment database corresponding to the operation request is calculated according to the query condition;
    保存所述查询条件与目标分片数据库的对应关系,并通过所述第一通信组件发送所述对应关系以同步更新所述对应关系至,所述分库服务器所在的分库数据库系统中至少一未处理该操作请求的分库服务器;Saving a correspondence between the query condition and the target fragment database, and sending the correspondence by the first communication component to synchronously update the correspondence to at least one of the database system in which the database server is located The sub-library server that did not process the operation request;
    通过所述第一通信组件发送所述操作请求以便所述目标分片数据库处理所述操作请求;Transmitting the operation request by the first communication component to process the operation request by the target fragment database;
    所述分片数据库包括:第二通信组件,至少一个通信连接于所述第二通信组件的第二处理器;以及,与所述至少一个第二处理器通信连接的第二存储器;其中,The fragment database includes: a second communication component, at least one second processor communicatively coupled to the second communication component; and a second memory communicatively coupled to the at least one second processor;
    所述第二存储器存储有可被所述至少一个第二处理器执行的第二指令,所述第二指令被所述至少一个第二处理器执行,以使所述至少一个第二处理器能够:The second memory stores a second instruction executable by the at least one second processor, the second instruction being executed by the at least one second processor to enable the at least one second processor to :
    通过所述第二通信组件接收并处理所述操作请求。 The operation request is received and processed by the second communication component.
PCT/CN2016/104282 2016-05-21 2016-11-01 Branch base database system and routing method therefor WO2017201970A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610342340.1 2016-05-21
CN201610342340.1A CN106055587A (en) 2016-05-21 2016-05-21 Partitioning database system and routing method thereof

Publications (1)

Publication Number Publication Date
WO2017201970A1 true WO2017201970A1 (en) 2017-11-30

Family

ID=57176512

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/104282 WO2017201970A1 (en) 2016-05-21 2016-11-01 Branch base database system and routing method therefor

Country Status (2)

Country Link
CN (1) CN106055587A (en)
WO (1) WO2017201970A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309810A (en) * 2020-02-20 2020-06-19 苏宁云计算有限公司 Library and table dividing method and system based on small sample KEY value
CN112711572A (en) * 2019-10-25 2021-04-27 北京沃东天骏信息技术有限公司 Online capacity expansion method and device suitable for sub-warehouse and sub-meter
CN113204535A (en) * 2021-05-20 2021-08-03 中国工商银行股份有限公司 Routing method and device, electronic equipment and computer readable storage medium
CN113486023A (en) * 2021-07-27 2021-10-08 中国银行股份有限公司 Database and table dividing method and device
CN113590609A (en) * 2021-06-22 2021-11-02 北京旷视科技有限公司 Database partitioning method and device, storage medium and electronic equipment
CN113645304A (en) * 2021-08-13 2021-11-12 恒生电子股份有限公司 Data service processing method and related equipment

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106055587A (en) * 2016-05-21 2016-10-26 乐视控股(北京)有限公司 Partitioning database system and routing method thereof
CN108874837B (en) * 2017-05-16 2021-09-03 北京京东尚科信息技术有限公司 Database partitioning method and device, middleware, storage medium and electronic equipment
CN109254880B (en) * 2017-07-12 2022-07-19 苏宁易购集团股份有限公司 Method and device for processing database downtime
CN107729370A (en) * 2017-09-12 2018-02-23 上海艾融软件股份有限公司 Micro services multi-data source connects implementation method
CN107943832A (en) * 2017-10-23 2018-04-20 中国联合网络通信集团有限公司 Method for processing business and device
CN110851474A (en) * 2018-07-26 2020-02-28 深圳市优必选科技有限公司 Data query method, database middleware, data query device and storage medium
CN109460409A (en) * 2018-11-01 2019-03-12 泰康保险集团股份有限公司 Data access method and device
CN109669951B (en) * 2018-11-09 2020-12-04 金蝶软件(中国)有限公司 Object query method and device, computer equipment and storage medium
CN110324403A (en) * 2019-05-23 2019-10-11 平安科技(深圳)有限公司 Dynamic divides library method for routing, device, server and storage medium
CN110457342B (en) * 2019-07-02 2023-01-06 网联清算有限公司 Transaction processing method and device
CN111131040A (en) * 2019-11-29 2020-05-08 京东数字科技控股有限公司 Route configuration method, device and system, storage medium and electronic device
CN110955664A (en) * 2019-12-03 2020-04-03 中国建设银行股份有限公司 Method and device for routing messages in different banks and tables
CN111597160A (en) * 2020-04-21 2020-08-28 中国人民财产保险股份有限公司 Distributed database system, distributed data processing method and device
CN111782549A (en) * 2020-07-31 2020-10-16 北京字节跳动网络技术有限公司 Test method and device and electronic equipment
CN112231501A (en) * 2020-10-20 2021-01-15 浙江大华技术股份有限公司 Portrait library data storage and retrieval method and device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010037065A2 (en) * 2008-09-26 2010-04-01 Cmi Corporate Marketing D/B/A Prelude Innovations, Inc. Scalable relational database replication
US7702614B1 (en) * 2007-03-30 2010-04-20 Google Inc. Index updating using segment swapping
CN103207919A (en) * 2013-04-26 2013-07-17 北京亿赞普网络技术有限公司 Method and device for quickly inquiring and calculating MangoDB cluster
CN103853718A (en) * 2012-11-28 2014-06-11 纽海信息技术(上海)有限公司 Fragmentation database access method and database system
CN106055587A (en) * 2016-05-21 2016-10-26 乐视控股(北京)有限公司 Partitioning database system and routing method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8676834B2 (en) * 2011-02-16 2014-03-18 International Business Machines Corporation Set-level comparisons in dynamically formed groups
CN102281330B (en) * 2011-08-03 2014-04-02 深圳市科迪特信息技术有限公司 Data storage, communication access and control method for software as a service (SAAS) platform
CN103473229A (en) * 2012-06-06 2013-12-25 深圳市世纪光速信息技术有限公司 Memory retrieval system and method, and real-time retrieval system and method
CN103714097B (en) * 2012-10-09 2017-08-08 阿里巴巴集团控股有限公司 A kind of method and apparatus for accessing database
CN103096126B (en) * 2012-12-28 2015-09-30 中国科学院计算技术研究所 Towards the cooperative caching method and system of video-on-demand service in cooperative caching cluster

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7702614B1 (en) * 2007-03-30 2010-04-20 Google Inc. Index updating using segment swapping
WO2010037065A2 (en) * 2008-09-26 2010-04-01 Cmi Corporate Marketing D/B/A Prelude Innovations, Inc. Scalable relational database replication
CN103853718A (en) * 2012-11-28 2014-06-11 纽海信息技术(上海)有限公司 Fragmentation database access method and database system
CN103207919A (en) * 2013-04-26 2013-07-17 北京亿赞普网络技术有限公司 Method and device for quickly inquiring and calculating MangoDB cluster
CN106055587A (en) * 2016-05-21 2016-10-26 乐视控股(北京)有限公司 Partitioning database system and routing method thereof

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711572A (en) * 2019-10-25 2021-04-27 北京沃东天骏信息技术有限公司 Online capacity expansion method and device suitable for sub-warehouse and sub-meter
CN112711572B (en) * 2019-10-25 2024-04-05 北京沃东天骏信息技术有限公司 Online capacity expansion method and device suitable for database and table division
CN111309810A (en) * 2020-02-20 2020-06-19 苏宁云计算有限公司 Library and table dividing method and system based on small sample KEY value
CN111309810B (en) * 2020-02-20 2022-11-18 苏宁云计算有限公司 Library and table dividing method and system based on small sample KEY value
CN113204535A (en) * 2021-05-20 2021-08-03 中国工商银行股份有限公司 Routing method and device, electronic equipment and computer readable storage medium
CN113204535B (en) * 2021-05-20 2024-02-02 中国工商银行股份有限公司 Routing method and device, electronic equipment and computer readable storage medium
CN113590609A (en) * 2021-06-22 2021-11-02 北京旷视科技有限公司 Database partitioning method and device, storage medium and electronic equipment
CN113486023A (en) * 2021-07-27 2021-10-08 中国银行股份有限公司 Database and table dividing method and device
CN113645304A (en) * 2021-08-13 2021-11-12 恒生电子股份有限公司 Data service processing method and related equipment
CN113645304B (en) * 2021-08-13 2023-06-16 恒生电子股份有限公司 Data service processing method and related equipment

Also Published As

Publication number Publication date
CN106055587A (en) 2016-10-26

Similar Documents

Publication Publication Date Title
WO2017201970A1 (en) Branch base database system and routing method therefor
US11044314B2 (en) System and method for a database proxy
US10212228B2 (en) Implementing synchronization of state information betweeen instances of an application as well as between different applications in an efficient, scalable manner
WO2018184491A1 (en) Resource obtaining method, apparatus and system
US20070050491A1 (en) Cache system
CN106104525B (en) Event processing system
CN111459418B (en) RDMA (remote direct memory Access) -based key value storage system transmission method
WO2017016336A1 (en) Method and apparatus for data processing and query
CN102006330A (en) Distributed cache system, data caching method and inquiring method of cache data
US20150142845A1 (en) Smart database caching
GB2510192A (en) Intermediate proxy server caching buffer searched with key (URI hash)
CN106940696B (en) Information query method and system for SDN multi-layer controller
US10210200B2 (en) Action-based routing of a transaction in an online transaction processing system
CN111259060A (en) Data query method and device
CN113271359A (en) Method and device for refreshing cache data, electronic equipment and storage medium
Coady et al. Using embedded network processors to implement global memory management in a workstation cluster
CN116756177B (en) Multi-table index maintenance method and system for mysql database
US9710533B2 (en) Efficient buffer pool page pre-fetching for database clusters
CN117539915B (en) Data processing method and related device
Eldakiky et al. Transkv: A networking support for transaction processing in distributed key-value stores
KR100303308B1 (en) Mib(management information base)searching method using cashing
Wu et al. Data-driven memory management for stream join
CN117714541A (en) iOS application network data caching method and system based on request link interception
CN117834584A (en) Flow table refreshing method for network address conversion and related equipment
CN115993942A (en) Data caching method, device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16902954

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16902954

Country of ref document: EP

Kind code of ref document: A1