WO2016206192A1 - 数据库的数据处理方法及装置 - Google Patents

数据库的数据处理方法及装置 Download PDF

Info

Publication number
WO2016206192A1
WO2016206192A1 PCT/CN2015/089383 CN2015089383W WO2016206192A1 WO 2016206192 A1 WO2016206192 A1 WO 2016206192A1 CN 2015089383 W CN2015089383 W CN 2015089383W WO 2016206192 A1 WO2016206192 A1 WO 2016206192A1
Authority
WO
WIPO (PCT)
Prior art keywords
data block
data
parameter
heat
server
Prior art date
Application number
PCT/CN2015/089383
Other languages
English (en)
French (fr)
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 WO2016206192A1 publication Critical patent/WO2016206192A1/zh

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/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data

Definitions

  • the present invention relates to the field of data storage technologies, and in particular, to a data processing method and apparatus for a database.
  • HBase is a implementation of Not only Structured Query Language (NoSQL) on Hadoop, a distributed system infrastructure. It is also a distributed, column-oriented open source database. It provides powerful scalability and data manipulation performance. In HBase, as the table record data continues to increase and gradually split into and eventually form a data block, different data blocks are allocated to the corresponding data block server block server for management.
  • NoSQL Structured Query Language
  • HBase cannot process services in time, which affects the performance of HBase, resulting in low efficiency of HBase. Even when a large number of read and write requests are concentrated in a certain number of data block servers, the data block server may be down. At this time, HBase will transfer the read and write requests to other data block servers, which may cause continuous stagnation of other data block servers, and eventually cause the services corresponding to the read and write requests to be completely interrupted.
  • the embodiment of the invention provides a data processing method and device for a database, which aims to solve the problem that a large number of read and write requests in HBase are concentrated in some data blocks of a certain data block server, so that HBase cannot perform business processing in time. problem.
  • the data processing method of the database includes the following steps:
  • the data request in the first data block is exchanged with the data processing request in the second data block.
  • the steps of the second smallest data block server include:
  • the traffic parameter includes the written data traffic and/or the read data traffic
  • the data block server with the highest heat parameter is used as the first data block server, and the data block server with the lowest heat parameter is used as the second data block server.
  • the method further includes:
  • the method further includes:
  • the method further includes:
  • the method further includes:
  • the data request of the third data block is exchanged with the data processing request of the fourth data block.
  • an embodiment of the present invention further provides a data processing device for a database, where the data processing device of the database includes:
  • a first acquiring module configured to acquire a first data block server with the largest data traffic in each data block server and a second data block server with the smallest data traffic;
  • a second acquiring module configured to acquire a first data block with the largest data traffic in each data block corresponding to the first data block server, and second data with the smallest data traffic in each data block corresponding to the second data block server Piece;
  • the first switching module is configured to exchange the data request in the first data block with the data processing request in the second data block.
  • the first obtaining module includes:
  • a first acquiring unit configured to acquire a traffic parameter of the data block in the preset time, where the traffic parameter includes the written data traffic and/or the read data traffic;
  • a second acquiring unit configured to acquire a locality parameter corresponding to the traffic parameter of the data block, a historical heat parameter of the data block, and a distribution parameter of the data block server;
  • a calculating unit configured to calculate a heat parameter of the data block server based on the flow parameter, the locality parameter, the historical heat parameter, and the distribution parameter;
  • the setting unit is configured to use the data block server with the highest heat parameter as the first data block server, and the data block server with the lowest heat parameter as the second data block server.
  • the data processing device of the database further includes:
  • a third obtaining module configured to acquire a first heat degree parameter of the first data block server and a second heat degree parameter of the second data block server;
  • a first determining module configured to determine whether a first difference between the first heat parameter and the second heat parameter is greater than a preset threshold
  • the second obtaining module is further configured to: when the first difference between the first heat parameter and the second heat parameter is greater than a preset threshold, obtain the largest data traffic in each data block corresponding to the first data block server. First data block, and a second data block with the smallest data traffic in each data block corresponding to the second data block server.
  • the data processing device of the database further includes:
  • a second determining module configured to determine whether the first heat parameter of the first data block server is greater than a preset heat
  • the first determining module is further configured to determine, when the first heat parameter of the first data block server is greater than a preset heat, whether the first difference between the first heat parameter and the second heat parameter is greater than a pre Set the threshold.
  • the data processing device of the database further includes:
  • a generating module configured to generate an adjustment plan based on the first data block and the second data block, wherein the configuration parameter of the database in the adjustment plan is to request the data in the first data block and the second data block
  • a fourth obtaining module configured to obtain a third data block server with the highest heat parameter in the adjustment plan and a fourth data block server with the lowest heat parameter, and obtain the third heat parameter and the fourth data block of the third data block server The fourth heat parameter of the server;
  • a third determining module configured to determine whether the second difference between the third heat parameter and the fourth heat parameter is greater than the preset threshold
  • a fifth acquiring module configured to acquire, when the second difference is greater than the preset threshold, a third data block with the largest data traffic in each data block corresponding to the third data block server, and the fourth data a fourth data block with the smallest data traffic in each data block corresponding to the block server;
  • the second switching module is configured to exchange the data request of the third data block with the data processing request of the fourth data block.
  • the first data block with the largest data traffic in the first data block server with the largest data traffic and the second data block with the smallest data traffic in the second data block server with the smallest data traffic are obtained, and then exchanged.
  • Data request in the first data block and data request in the second data block; exchange of data request of the first data block and data processing request of the second data block is implemented, so that the first data block server and the second data data
  • the data traffic between the block servers is more balanced, so that the database can process the service corresponding to the data request of the first data block in time, effectively avoiding the data block server downtime when the flow parameter of the data block is too large, and improving The performance and productivity of the database.
  • FIG. 1 is a schematic flowchart of a first embodiment of a data processing method of a database according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a process of acquiring a first data block server and a second data block server according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a second embodiment of a data processing method of a database according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart of a third embodiment of a data processing method of a database according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of a data processing apparatus of a database according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of a refinement function module of the calculation module in FIG. 5;
  • FIG. 7 is a schematic diagram of functional modules of a second embodiment of a data processing apparatus of a database according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of functional modules of a third embodiment of a data processing apparatus of a database according to an embodiment of the present invention.
  • Embodiments of the present invention provide a data processing method for a database.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a data processing method of a database according to an embodiment of the present invention.
  • the data processing method of the database includes:
  • Step S10 Obtain a first data block server with the largest data traffic in each data block server and a second data block server with the smallest data traffic;
  • a set of read/write pressure collection service is added to each data block server of the database, and data traffic of each data block server in a preset time is periodically collected, and then the data traffic with the largest data flow in a preset time is determined.
  • a data block server and a second data block server with the smallest data traffic; a set of read and write pressure collection services may also be added to the data block of each data block server of the database, and each data block of the preset time is periodically collected.
  • Data traffic then calculate the data traffic of the data block server, and then determine the first data block server with the largest data traffic in the preset time and the second data block server with the smallest data traffic.
  • Step S20 Acquire a first data block with the largest data traffic in each data block corresponding to the first data block server, and a second data block with the smallest data traffic in each data block corresponding to the second data block server;
  • the obtained first data block is the data block with the largest data traffic in the first data block server
  • the obtained second data block is the data block with the smallest data traffic in the second data block server
  • the row key determines the first data block or the second data block.
  • the subsequent process of the embodiment is terminated, that is, the data request with the second data block is not required when the first data block belongs to the meta table or the nameSpace table.
  • Exchange because the read and write access of the meta table or the nameSpace table is relatively small, that is, the data traffic written by the meta table or the nameSpace table and/or the read data traffic can effectively avoid the situation of less read and write traffic. Move the internal tables of these two systems frequently.
  • Step S30 exchanging data requests in the first data block with data processing requests in the second data block.
  • the data request in the first data block is a processing request for writing data and/or reading data received by the first data block within a preset time
  • the data processing request in the second data block is a preset time a processing request of the write data and/or the read data received by the two data blocks
  • setting the data request of the first data block on the second data block, and setting the data processing request of the second data block in the first data block Interchanging the data traffic written by the first data block and/or the read data traffic with the data traffic written by the second data block and/or the read data traffic, thereby reducing the first data block server
  • the heat parameter improves the heat parameter of the second data block server, so that the data traffic of the data block server of the database is more balanced.
  • the database is HBase
  • the data block server is RegionServe in HBase
  • the data block is Region in RegionServe.
  • the first data block with the largest data traffic in the first data block server with the largest data traffic and the second data block with the smallest data traffic in the second data block server with the smallest data traffic are obtained, and then the second data block is exchanged.
  • Data request in a data block and data request in the second data block; exchange of data request of the first data block and data processing request of the second data block is implemented, so that the first data block server and the second data block
  • the data traffic between the servers is more balanced, so that the database can process the service corresponding to the data request of the first data block in time, thereby effectively avoiding the data block server downtime when the flow parameter of the data block is too large, thereby improving the database. Database performance and productivity.
  • FIG. 2 is a schematic flowchart of a process of acquiring a first data block server and a second data block server according to an embodiment of the present invention.
  • step S10 includes:
  • Step S11 Obtain a traffic parameter of the data block in a preset time, where the traffic parameter includes the written data traffic and/or the read data traffic.
  • the data traffic written refers to the sum of the packet sizes corresponding to all the write requests of the data block, and the sum of the size of the data packets corresponding to all the read requests of the data block. Therefore, the traffic parameter of the data block obtained in the preset time is specifically Refers to the sum of the packet size corresponding to all the write requests of the data block and/or the sum of the sizes of the data packets corresponding to all the read requests of the data block.
  • the traffic parameters of the data block in the preset time period may be acquired periodically, or may be acquired according to a preset time interval.
  • a set of read and write pressure collection services is added to the data block of each data block server data block server of the database, and the read and write traffic of each data block is periodically collected in a preset time.
  • Step S12 acquiring a locality parameter corresponding to the traffic parameter of the data block, a historical heat parameter of the data block, and a distribution parameter of the data block server;
  • the locality parameter LocalPercent corresponding to the traffic parameter of the data block refers to the locality ratio weight of the data written by the data block and/or the read data, and the data written by the data block and/or the read data.
  • the proportion of data occupied by the data block server to which the data block belongs which is in the range of [0, 1].
  • the historical heat parameter HistoryPercent of the data block refers to the historical heat trend weight of the data block, and its value range is [0, 1]. According to the latest X (by parameter configuration, default 3) historical period access requests on the data block. The curve slope trend is calculated, wherein the larger the slope indicates that the access request has been showing a positive growth trend.
  • the distribution parameter TablePercent of the data block server refers to the equalization distribution rate of the table Table, that is, the equalization distribution rate of the table corresponding to the data block of the data block server.
  • Step S13 Calculate a heat parameter of the data block server based on the traffic parameter, the locality parameter, the historical heat parameter, and the distribution parameter.
  • the calculation formula for the heat parameter of the data block server is:
  • HotScorer ⁇ [(1- ⁇ ) ⁇ LastQualityScorer+ ⁇ CurQualityScorer] ⁇ (1/LocalPercent) ⁇ (1+HistorySlope) ⁇ (1+TablePerCent)
  • the LastQualityScorer is the data traffic and/or the read data traffic of the data block in the last preset time
  • CurQualityScorer is the traffic parameter of the data block in the current preset time
  • represents the data block of the last data block server.
  • the heat weight value is in the range of [0, 1]. If it is set to 0, it does not consider the last heat access. In general, the value of ⁇ is 0.5, which means that the heat on the data block is also considered. With the heat of the last data block.
  • step S14 the data block server with the highest heat parameter is used as the first data block server, and the data block server with the lowest heat parameter is used as the second data block server.
  • the data block server with the highest heat parameter in the database is set as the first data block server according to the heat parameter of the data block server, and the data block server with the lowest heat parameter in the database is set as the two data block server.
  • the first data block server or the second data block server is selected in the order of the machine name lexicographic order of the data block server.
  • the heat parameter of the data block server is obtained according to the obtained traffic parameter, locality parameter, historical heat parameter, and distribution parameter, and then the data block server with the highest heat parameter is used as the first data block server, and the heat is generated.
  • the data block server with the smallest parameter is used as the second data block server, thereby ensuring that the first data block server and the second data block server are respectively the hottest data block server and the coldest data block server of the database, thereby improving the first
  • the accuracy of the data block and the second data block further improves the performance and efficiency of the database.
  • FIG. 3 is a schematic flowchart diagram of a second embodiment of a data processing method of a database according to an embodiment of the present invention.
  • a second embodiment of the data processing method of the database of the present invention is proposed based on the second embodiment.
  • the data processing method of the database before the step S20, the data processing method of the database further includes:
  • Step S40 acquiring a first heat degree parameter of the first data block server and a second heat degree parameter of the second data block server;
  • Step S50 determining whether the first difference between the first heat parameter and the second heat parameter is greater than a preset threshold
  • the first heat degree parameter is greater than the second heat degree parameter
  • the first difference between the first heat degree parameter and the second heat degree parameter that is, the difference between the first heat degree parameter minus the second heat degree parameter is greater than zero
  • the preset threshold value is The maximum value of the heat parameter between the hottest data block server and the coldest data block server in the database.
  • the step S20 is replaced by: when the first difference between the first heat parameter and the second heat parameter is greater than a preset threshold, acquiring the first data traffic in each data block corresponding to the first data block server. a data block, and a second data block with the smallest data traffic in each data block corresponding to the second data block server.
  • the data traffic of the data block server further improves the performance and efficiency of the database.
  • FIG. 4 is a schematic flowchart diagram of a third embodiment of a data processing method of a database according to an embodiment of the present invention.
  • a third embodiment of the data processing method of the database of the present invention is proposed based on the third embodiment.
  • the data processing method of the database further includes: between step S40 and step S50:
  • Step S60 determining whether the first heat parameter of the first data block server is greater than a preset heat
  • the corresponding preset heat may be set for the data block server in the database.
  • the heat parameter of the data block server does not exceed the preset heat
  • the data block server does not exceed its own data processing.
  • the capability that is, the data block in the data block server does not need to be balanced, and it is easy to understand that when it is determined that the first heat parameter of the first data block server is greater than the preset heat, the data processing capability of the first data block server has exceeded Its own endurance needs to be adjusted by the data blocks in the first data block server and the data blocks in the other data block servers to balance the data traffic of the data block server in the database.
  • the first heat parameter of the first data block server does not exceed the preset heat
  • the first data block server does not exceed the tolerance of its own data processing, and thus the implementation can be ended. The flow of the example.
  • step S50 is replaced by determining whether the first difference between the first heat parameter and the second heat parameter is greater than a preset threshold when the first heat parameter of the first data block server is greater than a preset heat.
  • determining whether the first heat degree parameter of the first data block server is greater than a preset heat degree and then determining the first heat degree parameter and the second heat degree parameter when the first heat degree parameter is greater than the preset heat degree a step of the difference being greater than the preset threshold, thereby determining whether the first data block server needs to be adjusted through the data block and the data block in the other data block server, thereby further avoiding unnecessary balance adjustment of the data traffic of the data block server in the database. , improve the efficiency of the database.
  • a fourth embodiment of the data processing method of the database of the present invention is proposed based on the foregoing embodiment.
  • the data processing method of the database further includes: between step S20 and step S30:
  • the data request in the first data block is interchanged with the data request in the second data block, that is, the data traffic of the first data block of the first data block server and the data data of the second data block of the second data block server.
  • an adjustment plan is generated according to the configuration parameters of the database after the interchange is completed.
  • the heat parameter of the first data block server and the second data block server in the adjustment plan is the recalculated heat parameter to avoid the first
  • the data block server and the second data block server have errors in obtaining the data block server with the largest or smallest heat parameter in the database after the exchange.
  • determining the third data block The server's heat parameter is greater than the preset heat to avoid unnecessary balancing of data traffic between the block servers in the database.
  • the method further includes:
  • the data request of the third data block is exchanged with the data processing request of the fourth data block.
  • the balance plan may be updated based on the third data block and the fourth data block, and the loop is continuously determined to determine whether there are two in the database. If the absolute value of the difference between the heat parameters is greater than the preset threshold, continue the above steps until there is no data block server in the database where the absolute difference between the two heat parameters is greater than the preset threshold, and then sequentially according to the balance plan.
  • the link exchange of data blocks makes the data traffic between the various data block servers of the database more balanced. It is easy to understand that there is a second-level service pause in the database when the link exchange of the data block is performed. Therefore, the data block for each link exchange cannot be too much, so as to avoid long-term service suspension and affect the user experience.
  • the third data block server having the highest heat parameter and the fourth data block server having the lowest heat parameter are determined according to the adjustment plan, and then determining the third data block when determining that the second difference is greater than the preset threshold.
  • a third data block with the largest data traffic in the server and a fourth data block with the smallest data traffic in the fourth data block server, and finally, after step S30, the data request of the third data block and the data processing request of the fourth data block are exchanged; Realizing the exchange of the data traffic written by the third data block and/or the read data traffic with the data traffic written by the fourth data block and/or the read data traffic, thereby reducing the third data block server
  • the heat improves the heat of the fourth data block server, so that the data traffic between the third data block server and the fourth data block server is more balanced, so that the database can process the data corresponding to the data request of the third data block in time, effectively Avoiding the third data block server downtime when the traffic parameter of the third data block in the database is too large, further improving The performance and efficiency
  • the database data processing method can also perform load balancing based on the table, and the process includes: acquiring data traffic written by the table in the database and/or reading data traffic, data traffic written and/or read based on the table.
  • the data flow calculation obtains the hottest table and the coldest table; determines whether the hottest table writes the data traffic and/or the read data traffic exceeds the table's load heat threshold; writes on the hottest table
  • the hottest data block in the table and the coldest data block in the coldest table are obtained, and then the data of the hottest data block is obtained.
  • the link corresponding to the data request of the coldest data block is requested to be exchanged.
  • the process of load balancing based on the table table can also be cyclically executed in the manner of the foregoing embodiment to implement parallel migration of data blocks in multiple tables, and this table-based load balancing is compared to data block migration in the data block server.
  • the method is more applicable when there are not many "hot meters” and "cold tables".
  • the heat meter means that the data flow of the table exceeds the load heat threshold of the table.
  • the embodiment of the invention further provides a data processing device for the database.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of a data processing apparatus of a database according to an embodiment of the present invention.
  • the data processing device of the database includes:
  • the first obtaining module 10 is configured to acquire a first data block server with the largest data traffic in each data block server. And a second data block server with the smallest data traffic;
  • a set of read/write pressure collection service is added to each data block server of the database, and data traffic of each data block server in a preset time is periodically collected, and then the data traffic with the largest data flow in a preset time is determined.
  • a data block server and a second data block server with the smallest data traffic; a set of read and write pressure collection services may also be added to the data block of each data block server of the database, and each data block of the preset time is periodically collected.
  • Data traffic then calculate the data traffic of the data block server, and then determine the first data block server with the largest data traffic in the preset time and the second data block server with the smallest data traffic.
  • the second obtaining module 20 is configured to acquire a first data block with the largest data traffic in each data block corresponding to the first data block server, and a second data flow with the smallest data flow in each data block corresponding to the second data block server. data block;
  • the first data block acquired by the second obtaining module 20 is the data block with the largest data traffic in the first data block server, and the obtained second data block is the data block with the smallest data traffic in the second data block server;
  • the first data block or the second data block is determined according to the row key rowkey of the data block.
  • the first switching module 30 is configured to exchange data requests in the first data block with data processing requests in the second data block.
  • the data request is a request for writing data and/or reading data received by the data block within a preset time
  • the first switching module 30 sets the data request of the first data block on the second data block
  • the second data block The data processing request is set on the first data block such that the data traffic written by the first data block and/or the read data traffic is related to the data traffic written by the second data block and/or the read data traffic.
  • the heat parameter of the first data block server is lowered, and the heat parameter of the second data block server is improved, so that the data traffic of the data block server of the database is more balanced.
  • the first data block with the largest data traffic in the first data block server with the largest data traffic and the second data block with the smallest data traffic in the second data block server with the smallest data traffic are obtained by the second acquiring module 20.
  • the first switching module 30 exchanges the data request in the first data block with the data processing request in the second data block; the exchange of the data request of the first data block with the data processing request of the second data block is implemented,
  • the data traffic between the first data block server and the second data block server is more balanced, so that the database can process the service corresponding to the data request of the first data block in time, thereby effectively avoiding the traffic parameter of the data block in the database.
  • the data block server is down, which improves the performance and work efficiency of the database.
  • FIG. 6 is a schematic diagram of a refinement function module of the computing module in FIG.
  • the first obtaining module 10 includes:
  • the first obtaining unit 11 is configured to acquire a traffic parameter of the data block in the preset time, where the traffic parameter includes the written data traffic and/or the read data traffic;
  • the data traffic written refers to the sum of the packet sizes corresponding to all the write requests of the data block, and the sum of the size of the data packets corresponding to all the read requests of the data block. Therefore, the traffic parameter of the data block obtained in the preset time is specifically Refers to the sum of the packet size corresponding to all the write requests of the data block and/or the sum of the sizes of the data packets corresponding to all the read requests of the data block.
  • the traffic parameters of the data block in the preset time period may be acquired periodically, or may be acquired according to a preset time interval.
  • a set of read and write pressure collection services is added to the data block of each data block server data block server of the database, and the read and write traffic of each data block is periodically collected in a preset time.
  • the second obtaining unit 12 is configured to acquire a locality parameter corresponding to the traffic parameter of the data block, a historical heat parameter of the data block, and a distribution parameter of the data block server;
  • the locality parameter LocalPercent corresponding to the traffic parameter of the data block refers to the locality ratio weight of the data written by the data block and/or the read data, and the data written by the data block and/or the read data.
  • the proportion of data occupied by the data block server to which the data block belongs which is in the range of [0, 1].
  • the historical heat parameter HistoryPercent of the data block refers to the historical heat trend weight of the data block, and its value range is [0, 1]. According to the latest X (by parameter configuration, default 3) historical period access requests on the data block. The curve slope trend is calculated, wherein the larger the slope indicates that the access request has been showing a positive growth trend.
  • the distribution parameter TablePercent of the data block server refers to the equalization distribution rate of the table Table, that is, the equalization distribution rate of the table Table corresponding to the data block of the data block server.
  • the calculating unit 13 is configured to obtain a heat parameter of the data block server based on the traffic parameter, the locality parameter, the historical heat parameter, and the distribution parameter;
  • the calculation formula for the heat parameter of the data block server is:
  • HotScorer ⁇ [(1- ⁇ ) ⁇ LastQualityScorer+ ⁇ CurQualityScorer] ⁇ (1/LocalPercent) ⁇ (1+HistorySlope) ⁇ (1+TablePerCent)
  • the LastQualityScorer is the data traffic and/or the read data traffic of the data block in the last preset time
  • CurQualityScorer is the traffic parameter of the data block in the current preset time
  • represents the data block of the last data block server.
  • the heat weight value is in the range of [0, 1]. If it is set to 0, it does not consider the last heat access. In general, the value of ⁇ is 0.5, which means that the heat on the data block is also considered. With the heat of the last data block.
  • the setting unit 14 is configured to use the data block server having the highest heat parameter as the first data block server, and the data block server having the lowest heat parameter as the second data block server.
  • the calculation unit 13 calculates the heat parameter of the data block server according to the obtained flow parameter, locality parameter, historical heat parameter and distribution parameter, and then the setting unit 14 takes the data block server with the highest heat parameter as the first.
  • the data block server and the data block server with the lowest heat parameter as the second data block server thereby ensuring that the first data block server and the second data block server are respectively the hottest data block server and the coldest data block of the database.
  • the server improves the accuracy of the first data block and the second data block, further improving the performance and working efficiency of the database.
  • FIG. 7 is a schematic diagram of functional modules of a second embodiment of a data processing apparatus of a database according to an embodiment of the present invention.
  • a second embodiment of the data processing apparatus of the database of the present invention is proposed based on the second embodiment.
  • the data processing apparatus of the database further includes:
  • the third obtaining module 40 is configured to acquire a first heat degree parameter of the first data block server and a second heat degree parameter of the second data block server;
  • the first determining module 50 is configured to determine whether the first difference between the first heat parameter and the second heat parameter is greater than a preset threshold
  • the second obtaining module 20 is further configured to: when the first difference between the first heat parameter and the second heat parameter is greater than a preset threshold, obtain the largest data traffic in each data block corresponding to the first data block server. a first data block, and a second data block having the smallest data traffic among the respective data blocks corresponding to the second data block server.
  • the first heat degree parameter of the first data block server and the second heat degree parameter of the second data block server are obtained by the third obtaining module 40, and then the second obtaining module 20 determines in the first determining module 50 Acquiring the first data block of the first data block server and the second data block of the second data block server when the first difference between the heat parameter and the second heat parameter is greater than a preset threshold; And performing data request of the first data block and data request of the second data block when the first difference between the first heat parameter and the second heat parameter does not exceed the preset threshold, thereby avoiding unnecessary balancing of the data block server in the database Data traffic further improves database performance and productivity.
  • FIG. 8 is a schematic diagram of functional modules of a third embodiment of a data processing apparatus of a database according to an embodiment of the present invention.
  • a third embodiment of the data processing apparatus of the database of the present invention is proposed based on the third embodiment.
  • the data processing apparatus of the database further includes:
  • the second determining module 60 is configured to determine whether the first heat parameter of the first data block server is greater than a preset heat
  • the first determining module is further configured to determine, when the first heat parameter of the first data block server is greater than a preset heat, whether the first difference between the first heat parameter and the second heat parameter is greater than a pre Set the threshold.
  • the first determining module 60 determines that the first heat parameter of the first data block server is greater than a preset heat, and then the first heat parameter of the first determining module 60 is greater than the When the heat is set, determining that the first difference between the first heat parameter and the second heat parameter is greater than a preset threshold; and determining whether the first data block server needs to pass the data block and the data block in the other data block server Make adjustments to further avoid unnecessary balance adjustments to the data traffic of the data block server in the database, and improve the efficiency of the database.
  • a fourth embodiment of the data processing apparatus of the database of the present invention is proposed based on the above embodiment.
  • the data processing apparatus of the database further includes:
  • a generating module configured to generate an adjustment plan based on the first data block and the second data block, wherein the configuration parameter of the database in the adjustment plan is to request the data in the first data block and the second data block
  • Data request exchange The heat parameter of each subsequent data block server and the corresponding traffic parameter of the corresponding data block
  • an adjustment plan is generated according to the configuration parameters of the database after the interchange is completed.
  • the heat parameter of the first data block server and the second data block server in the adjustment plan is the recalculated heat parameter to avoid the first data.
  • the block server and the second data block server have errors in obtaining the data block server with the largest or smallest heat parameter in the database after the exchange.
  • a fourth obtaining module configured to obtain a third data block server with the highest heat parameter in the adjustment plan and a fourth data block server with the lowest heat parameter, and obtain the third heat parameter and the fourth data block of the third data block server The fourth heat parameter of the server;
  • a third determining module configured to determine whether the second difference between the third heat parameter and the fourth heat parameter is greater than the preset threshold
  • the third determining module determines that the third difference between the third heat parameter of the third data block server and the fourth heat parameter of the fourth data block server is greater than a preset threshold.
  • the heat parameter of the third data block server is greater than the preset heat to avoid unnecessary balancing of data traffic between the data block servers in the database.
  • a fifth acquiring module configured to acquire, when the second difference is greater than the preset threshold, a third data block with the largest data traffic in each data block corresponding to the third data block server, and the fourth data a fourth data block with the smallest data traffic in each data block corresponding to the block server;
  • the second switching module is configured to exchange the data request of the third data block with the data processing request of the fourth data block.
  • the second switching module sets the data request of the third data block on the fourth data block, and sets the data processing request of the fourth data block on the third data block, so that the data flow written by the third data block and/or The read data traffic is exchanged with the data traffic written by the fourth data block and/or the read data traffic.
  • the third data module server with the highest heat parameter and the fourth data block server with the lowest heat parameter are determined by the fourth obtaining module, and then the third determining module determines that the second difference is greater than the preset.
  • the fifth obtaining module determines a third data block with the largest data traffic in the third data block server and a fourth data block with the smallest data traffic in the fourth data block server, and finally the second switching module exchanges the third data block.
  • Data request and data processing request of the fourth data block data traffic written by the third data block and/or read data traffic and data traffic written by the fourth data block and/or read data traffic Interchange, thereby reducing the heat of the third data block server and improving the heat of the fourth data block server, so that the data traffic between the third data block server and the fourth data block server is more balanced, so that the database can be processed in time.
  • the data corresponding to the data request of the three data blocks effectively avoids the excessive flow parameter of the third data block in the database.
  • a third block server downtime and further improve the performance and efficiency of the database.
  • the foregoing embodiments of the present invention can be applied to the field of communications, and solve the problem that a continuous downtime of other data block servers may be caused, and finally the service corresponding to the read and write requests is completely interrupted, so that each data block server in the database is The data traffic between the two is more balanced, which improves the performance and efficiency of the database.

Landscapes

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

Abstract

一种数据库的数据处理方法以及装置,包括:获取各个数据块服务器中数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器;获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块;将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换。本方案使得数据库中的各个数据块服务器之间的数据流量更加均衡,提高了数据库的性能和工作效率。

Description

数据库的数据处理方法及装置 技术领域
本发明涉及数据存储技术领域,尤其涉及一种数据库的数据处理方法及装置。
背景技术
随着社交应用平台及电子商务类互联网应用的不断出现,标志着人们已经步入更高级的生活时代。在这种海量数据、高并发访问的情况下,数据库能提供稳定、可靠的性能是至关重要的。但传统的数据库已经不能满足这种大数据的问题,在这种技术背景下,分布式的数据库应运而生。HBase是分布式系统基础架构Hadoop上的一个非关系类数据库(Not only Structured Query Language,简称为NoSQL)的实现,同时也是一个分布式的、面向列的开源数据库。它提供了强大的可扩展性和数据操作性能。在HBase中,随着表记录数据不断增加而逐渐分裂成、并最终形成为数据块,不同的数据块会被主机分配给相应的数据块服务器数据块服务器进行管理。
但是,在实际的应用中,常常会因为数据块服务器的负载不均衡或者每个数据块服务器中的服务请求数量不均衡,大量读、写请求集中在某几个数据块服务器的某几个数据块中,使得HBase无法及时进行业务处理,进而影响HBase的性能,导致HBase的工作效率低;甚至,在大量读、写请求集中在某几个数据块服务器时,可能会造成数据块服务器宕机,此时,HBase会将读、写请求转移到其他的数据块服务器,进而可能引起其他的数据块服务器的连续宕机,最终导致读、写请求对应的业务完全中断。
发明内容
本发明实施例提供一种数据库的数据处理方法及装置,旨在解决HBase中大量读、写请求集中在某几个数据块服务器的某几个数据块中而造成HBase无法及时进行业务处理的技术问题。
为实现上述目的,本发明实施例提供的一种数据库的数据处理方法,所述数据库的数据处理方法包括以下步骤:
获取各个数据块服务器中数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器;
获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块;
将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换。
进一步地,所述获取各个数据块服务器中数据流量最大的第一数据块服务器以及数据流 量最小的第二数据块服务器的步骤包括:
获取预设时间内数据块的流量参数,其中,所述流量参数包括写入的数据流量和/或读取的数据流量;
获取所述数据块的流量参数对应的本地性参数、数据块的历史热度参数及数据块服务器的分布参数;
基于所述流量参数、本地性参数、历史热度参数及分布参数计算获得所述数据块服务器的热度参数;
将热度参数最大的数据块服务器作为第一数据块服务器,并将热度参数最小的数据块服务器作为第二数据块服务器。
进一步地,在所述获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块的步骤之前,所述方法还包括:
获取所述第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数;
确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值;
在所述第一热度参数与所述第二热度参数的第一差值大于预设阈值时,执行所述获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块的步骤。
进一步地,在获取所述第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数与所述确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值的步骤之间,所述方法还包括:
确定所述第一数据块服务器的第一热度参数是否大于预设热度;
在所述第一数据块服务器的第一热度参数大于预设热度时,执行所述确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值的步骤。
进一步地所述获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块的步骤与所述将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换的步骤之间,所述方法还包括:
基于所述第一数据块及第二数据块生成调整计划,其中,调整计划中的所述数据库的配置参数为将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换后的各个数据块服务器的热度参数及其对应的数据块对应的流量参数;
获取调整计划中热度参数最大的第三数据块服务器以及热度参数最小的第四数据块服务器,并获取所述第三数据块服务器的第三热度参数及第四数据块服务器的第四热度参数;
确定所述第三热度参数与所述第四热度参数的第二差值是否大于所述预设阈值;
在所述第二差值大于所述预设阈值时,获取第三数据块服务器对应的各个数据块中的数据流量最大的第三数据块,以及所述第四数据块服务器对应的各个数据块中数据流量最小的第四数据块;
在所述将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换的步骤之后,所述方法还包括:
将所述第三数据块的数据请求与第四数据块的数据处理请求互换。
此外,为实现上述目的,本发明实施例还提供一种数据库的数据处理装置,所述数据库的数据处理装置包括:
第一获取模块,设置为获取各个数据块服务器中数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器;
第二获取模块,设置为获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块;
第一交换模块,设置为将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换。
进一步地,第一获取模块包括:
第一获取单元,设置为获取预设时间内数据块的流量参数,其中,所述流量参数包括写入的数据流量和/或读取的数据流量;
第二获取单元,设置为获取所述数据块的流量参数对应的本地性参数、数据块的历史热度参数及数据块服务器的分布参数;
计算单元,设置为基于所述流量参数、本地性参数、历史热度参数及分布参数计算获得所述数据块服务器的热度参数;
设置单元,设置为将热度参数最大的数据块服务器作为第一数据块服务器,并将热度参数最小的数据块服务器作为第二数据块服务器。
进一步地,所述数据库的数据处理装置还包括:
第三获取模块,设置为获取所述第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数;
第一确定模块,设置为确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值;
所述第二获取模块还设置为在所述第一热度参数与所述第二热度参数的第一差值大于预设阈值时,获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及 所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块。
进一步地,所述数据库的数据处理装置还包括:
第二确定模块,设置为确定所述第一数据块服务器的第一热度参数是否大于预设热度;
所述第一确定模块还设置为在所述第一数据块服务器的第一热度参数大于预设热度时,确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值。
进一步地,所述数据库的数据处理装置还包括:
生成模块,设置为基于所述第一数据块及第二数据块生成调整计划,其中,调整计划中的所述数据库的配置参数为将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换后的各个数据块服务器的热度参数及其对应的数据块对应的流量参数;
第四获取模块,设置为获取调整计划中热度参数最大的第三数据块服务器以及热度参数最小的第四数据块服务器,并获取所述第三数据块服务器的第三热度参数及第四数据块服务器的第四热度参数;
第三确定模块,设置为确定所述第三热度参数与所述第四热度参数的第二差值是否大于所述预设阈值;
第五获取模块,设置为在所述第二差值大于所述预设阈值时,获取第三数据块服务器对应的各个数据块中的数据流量最大的第三数据块,以及所述第四数据块服务器对应的各个数据块中数据流量最小的第四数据块;
第二交换模块,设置为将所述第三数据块的数据请求与第四数据块的数据处理请求互换。
本发明实施例中,通过获取数据流量最大的第一数据块服务器中的数据流量最大的第一数据块以及数据流量最小的第二数据块服务器中数据流量最小的第二数据块,然后互换第一数据块中的数据请求与第二数据块中的数据请求;实现了第一数据块的数据请求与第二数据块的数据处理请求的互换,使得第一数据块服务器与第二数据块服务器之间的数据流量更加均衡,进而使数据库能够及时处理第一数据块的数据请求对应的业务,有效地避免了在数据库存在数据块的流量参数过大时造成数据块服务器宕机,提高了数据库的性能和工作效率。
附图说明
图1为本发明实施例数据库的数据处理方法第一实施例的流程示意图;
图2为本发明实施例获取第一数据块服务器及第二数据块服务器的步骤的细化流程示意图;
图3为本发明实施例数据库的数据处理方法第二实施例的流程示意图;
图4为本发明实施例数据库的数据处理方法第三实施例的流程示意图;
图5为本发明实施例数据库的数据处理装置第一实施例的功能模块示意图;
图6为图5中计算模块的细化功能模块示意图;
图7为本发明实施例数据库的数据处理装置第二实施例的功能模块示意图;
图8为本发明实施例数据库的数据处理装置第三实施例的功能模块示意图。
本发明实施例目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明实施例提供一种数据库的数据处理方法。
参照图1,图1为本发明实施例数据库的数据处理方法第一实施例的流程示意图。
在本实施例中,该数据库的数据处理方法包括:
步骤S10,获取各个数据块服务器中数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器;
本实施例中,在数据库的每个数据块服务器中增加一套读写压力采集服务,周期性采集预设时间内每个数据块服务器的数据流量,然后确定预设时间内数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器;也可以在数据库的每个数据块服务器的数据块中增加一套读写压力采集服务,周期性采集预设时间内每个数据块的数据流量,然后计算数据块服务器的数据流量,再确定预设时间内数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器。
步骤S20,获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块;
即获取到的第一数据块为第一数据块服务器中数据流量最大的数据块,获取到的第二数据块为第二数据块服务器中数据流量最小的数据块;容易理解,在获取第一数据块及第二数据块时,如果第一数据块服务器中存在两个数据流量相同且最大的数据块或者第二数据块服务器中存在两个数据流量相同且最小的数据块,那么按照数据块的行键确定第一数据块或第二数据块。
当然,如果第一数据块属于元meta表或名称空间nameSpace表,则结束本实施例的后续流程,即在第一数据块属于meta表或nameSpace表时不需要进行与第二数据块的数据请求的交换,因为meta表或nameSpace表的读写访问相对很小,即meta表或nameSpace表写入的数据流量和/或读取的数据流量,可以有效地避免在读写业务量较少的情况下频繁移动这两个系统内部表。
步骤S30,将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换。
其中,第一数据块中的数据请求为预设时间内第一数据块接收到的写入数据和/或读取数据的处理请求,第二数据块中的数据处理请求为预设时间内第二数据块接收到的写入数据和/或读取数据的处理请求;将第一数据块的数据请求设置在第二数据块上,将第二数据块的数据处理请求设置在第一数据块上,使得第一数据块写入的数据流量和/或读取的数据流量与第二数据块写入的数据流量和/或读取的数据流量的互换,进而降低了第一数据块服务器的热度参数、提高了第二数据块服务器的热度参数,使得数据库的数据块服务器的数据流量更加均衡。
本实施例中,在第一数据块的数据请求与第二数据块的数据请求进行交换之后,基于调整后的数据库更新数据库中的数据库信息,包括更新数据块的写入的数据流量和/或读取的数据流量信息,以及数据块之间数据请求的交换信息等。
在本实施例中,数据库为HBase,数据块服务器为HBase中的RegionServe,数据块为RegionServe中的Region。
本实施例中,通过获取数据流量最大的第一数据块服务器中的数据流量最大的第一数据块以及数据流量最小的第二数据块服务器中数据流量最小的第二数据块,然后互换第一数据块中的数据请求与第二数据块中的数据请求;实现了第一数据块的数据请求与第二数据块的数据处理请求的互换,使得第一数据块服务器与第二数据块服务器之间的数据流量更加均衡,进而使数据库能够及时处理第一数据块的数据请求对应的业务,有效地避免了在数据库存在数据块的流量参数过大时造成数据块服务器宕机,提高了数据库的性能和工作效率。
参照图2,图2为本发明实施例获取第一数据块服务器及第二数据块服务器的步骤的细化流程示意图。
基于第一实施例提出本发明步骤S10的细化流程实施例,本实施例中,步骤S10包括:
步骤S11,获取预设时间内数据块的流量参数,其中,所述流量参数包括写入的数据流量和/或读取的数据流量;
写入的数据流量是指数据块所有的写入请求对应的数据包大小总和,数据块所有的读取请求对应的数据包的大小总和,因此,获取预设时间内数据块的流量参数具体是指获取数据块所有的写入请求对应的数据包大小总和及/或数据块所有的读取请求对应的数据包的大小总和。当然,预设时间内数据块的流量参数可以周期性的获取,也可以根据预设时间间隔获取。本实施例中,在数据库的每个数据块服务器数据块服务器的数据块增加一套读写压力采集服务,周期性采集预设时间内每个数据块的读、写的流量。
步骤S12,获取所述数据块的流量参数对应的本地性参数、数据块的历史热度参数及数据块服务器的分布参数;
其中,所述数据块的流量参数对应的本地性参数LocalPercent是指数据块写入的数据和/或读取的数据的本地性比率权重,数据块写入的数据和/或读取的数据中该数据块所属的数据块服务器占有的数据比例,其取值范围是[0,1]。
数据块的历史热度参数HistoryPercent是指该数据块的历史热度趋势权重,其取值范围是[0,1],根据该数据块上最近X个(通过参数配置,默认3个)历史周期访问请求的曲线斜率趋势计算得到,其中,斜率越大说明访问请求一直呈现正向增长的趋势。
数据块服务器的分布参数TablePercent是指表Table的均衡分布率,即数据块服务器的数据块对应的Table的均衡分布率。
步骤S13,基于所述流量参数、本地性参数、历史热度参数及分布参数计算获得所述数据块服务器的热度参数;
数据块服务器的热度参数的计算公式为:
HotScorer=∑[(1-α)×LastQualityScorer+α×CurQualityScorer]×(1/LocalPercent)×(1+HistorySlope)×(1+TablePerCent)
式中,LastQualityScorer为数据块在上个预设时间内的数据流量和/或读取的数据流量,CurQualityScorer为当前预设时间内数据块的流量参数;α表示上一次该数据块服务器的数据块的热度权重值,其取值范围为[0,1],如设置成0就是不考虑上一次的热度访问,一般情况下,α的取值为0.5,表示同时兼顾本次数据块上的热度与上一次的数据块热度。
步骤S14,将热度参数最大的数据块服务器作为第一数据块服务器,并将热度参数最小的数据块服务器作为第二数据块服务器。
根据数据块服务器的热度参数将数据库中热度参数最大的数据块服务器设置为第一数据块服务器,将数据库中热度参数最小的数据块服务器设置为二数据块服务器。当然,在获取所述第一数据块服务器及第二数据块服务器过程中,如果数据库中存在两个热度参数相同的最热的数据块服务器或两个热度参数相同的最冷的数据块服务器,则按照数据块服务器的机器名字典序顺序进行选择顺序在前的作为第一数据块服务器或第二数据块服务器。
本实施例中,根据获取到的流量参数、本地性参数、历史热度参数及分布参数计算获得数据块服务器的热度参数,然后将热度参数最大的数据块服务器作为第一数据块服务器,并将热度参数最小的数据块服务器作为第二数据块服务器,进而能够保证第一数据块服务器及第二数据块服务器分别为数据库的最热的数据块服务器与最冷的数据块服务器,进而提高了第一数据块与第二数据块的准确性,进一步提高了数据库的性能和工作效率。
参照图3,图3为本发明实施例数据库的数据处理方法第二实施例的流程示意图。
基于第二实施例提出本发明数据库的数据处理方法的第二实施例,本实施例中,在步骤S20之前,数据库的数据处理方法还包括:
步骤S40,获取所述第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数;
在数据块服务器的热度参数中获取第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数。
步骤S50,确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值;
由上述实施例可知,第一热度参数大于第二热度参数,第一热度参数与第二热度参数的第一差值即第一热度参数减去第二热度参数的差值大于零,预设阈值为数据库中最热的数据块服务器与最冷的数据块服务器之间热度参数的最大值,在第一热度参数与所述第二热度参数的第一差值大于预设阈值时,需要平衡最热的数据块服务器的数据块与最冷的数据块服务器的数据块。
在所述第一热度参数与所述第二热度参数的第一差值大于预设阈值时,执行所述获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块的步骤。
即步骤S20替换为:在所述第一热度参数与所述第二热度参数的第一差值大于预设阈值时,获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块。
本实施例中,通过在第一热度参数与第二热度参数的第一差值大于预设阈值时,执行获取第一数据块服务器的第一数据块及第二数据块服务器的第二数据块的步骤,避免了在第一热度参数与第二热度参数的第一差值未超过预设阈值时进行第一数据块的数据请求与第二数据块的数据请求,进而避免不必要的平衡数据库中数据块服务器的数据流量,进一步提高了数据库的性能和工作效率。
参照图4,图4为本发明实施例数据库的数据处理方法第三实施例的流程示意图。
基于第三实施例提出本发明数据库的数据处理方法的第三实施例,本实施例中,在步骤S40与步骤S50之间,该数据库的数据处理方法还包括:
步骤S60,确定所述第一数据块服务器的第一热度参数是否大于预设热度;
本实施例中,可以为数据库中的数据块服务器设置对应的预设热度,具体的,在数据块服务器的热度参数未超过预设热度时,表示该数据块服务器未超过其自身数据处理的承受能力,即该数据块服务器中的数据块不需要进行平衡调整,容易理解,在确定第一数据块服务器的第一热度参数大于预设热度时,表示第一数据块服务器的数据处理能力已超过其自身的承受能力,需要通过第一数据块服务器中的数据块与其他数据块服务器中的数据块进行调整,以平衡数据库中数据块服务器的数据流量。在第一数据块服务器的第一热度参数未超过预设热度时,此时第一数据块服务器未超过其自身数据处理的承受能力,因此,可以结束本实施 例的流程。
在所述第一数据块服务器的第一热度参数大于预设热度时,执行所述确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值的步骤。
即步骤S50替换为,在所述第一数据块服务器的第一热度参数大于预设热度时,确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值。
本实施例中,通过确定第一数据块服务器的第一热度参数是否大于预设热度,然后在第一热度参数大于预设热度时,执行确定所述第一热度参数与第二热度参数的第一差值大于预设阈值的步骤,进而确定第一数据块服务器是否需要通过其数据块与其他数据块服务器中的数据块进行调整,进一步避免不必要的平衡调整数据库中数据块服务器的数据流量,提高了数据库的效率。
基于上述实施例提出本发明数据库的数据处理方法的第四实施例,本实施例中,在步骤S20与步骤S30之间,该数据库的数据处理方法还包括:
基于所述第一数据块及第二数据块生成调整计划,其中,调整计划中的所述数据库的配置参数为将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换后的各个数据块服务器的热度参数及其对应的数据块对应的流量参数;
即假设第一数据块中的数据请求与第二数据块中的数据请求互换完成,即第一数据块服务器的第一数据块的数据流量与第二数据块服务器的第二数据块的数据流量互换完成,根据互换完成后的数据库的配置参数生成调整计划,当然,调整计划中第一数据块服务器以及第二数据块服务器的热度参数为重新计算后的热度参数,以避免第一数据块服务器以及第二数据块服务器为交换后获取数据库中热度参数最大或最小的数据块服务器时出现错误。
获取调整计划中热度参数最大的第三数据块服务器以及热度参数最小的第四数据块服务器,并获取所述第三数据块服务器的第三热度参数及第四数据块服务器的第四热度参数;
确定所述第三热度参数与所述第四热度参数的第二差值是否大于所述预设阈值;
当然,在确定所述第三数据块服务器的第三热度参数与所述第四数据块服务器的第四热度参数的第二差值大于预设阈值之前,还可以先确定所述第三数据块服务器的热度参数大于预设热度,以避免不必要的平衡数据库中的数据块服务器之间的数据流量。
在所述第二差值大于所述预设阈值时,获取第三数据块服务器对应的各个数据块中的数据流量最大的第三数据块,以及所述第四数据块服务器对应的各个数据块中数据流量最小的第四数据块;
在所述将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换的步骤之后,所述方法还包括:
将所述第三数据块的数据请求与第四数据块的数据处理请求进行交换。
将第三数据块的数据请求设置在第四数据块上,将第四数据块的数据处理请求设置在第三数据块上,使得第三数据块写入的数据流量和/或读取的数据流量与第四数据块写入的数据流量和/或读取的数据流量的互换。
当然,也可以在将所述第三数据块的数据请求与第四数据块的数据请求进行交换的步骤之前基于第三数据块和第四数据块更新平衡计划,继续循环判断数据库中是否存在两个热度参数之差的绝对值大于预设阈值的数据块服务器,继续上述步骤,直到数据库中不存在两个热度参数之差的绝对值大于预设阈值的数据块服务器,然后按照平衡计划依次进行数据块的链路交换,使数据库的各个数据块服务器之间的数据流量更加均衡。容易理解,由于数据库在进行数据块的链路交换时存在秒级的业务暂停,因此,每次进行链路交换的数据块不能太多,以避免长时间的业务暂停而影响用户体验。
本实施例中,通过基于调整计划确定热度参数最大的第三数据块服务器以及热度参数最小的第四数据块服务器,然后在确定第二差值大于所述预设阈值时,确定第三数据块服务器中数据流量最大的第三数据块以及第四数据块服务器中数据流量最小的第四数据块,最后在步骤S30之后互换第三数据块的数据请求与第四数据块的数据处理请求;实现了第三数据块写入的数据流量和/或读取的数据流量与第四数据块写入的数据流量和/或读取的数据流量的互换,进而降低了第三数据块服务器的热度同时提高了第四数据块服务器的热度,使得第三数据块服务器与第四数据块服务器之间的数据流量更加均衡,使数据库能够及时处理第三数据块的数据请求对应的业务,有效地避免了在数据库存在第三数据块的流量参数过大时造成第三数据块服务器宕机,进一步提高了数据库的性能和工作效率。
当然,数据库的数据处理方法还可以基于表进行负载平衡,其流程包括:获取数据库中的表写入的数据流量和/或读取的数据流量,基于表写入的数据流量和/或读取的数据流量计算获得最热的表与最冷的表;判断最热的表的写入的数据流量和/或读取的数据流量是否超过该表的负载热度阈值;在最热的表的写入的数据流量和/或读取的数据流量超过负载热度阈值时,获取该表中的最热的数据块以及最冷的表中的最冷的数据块,然后将最热的数据块的数据请求对应的链路与最冷的数据块的数据请求对应的链路进行交换。当然,基于表表进行负载平衡的流程也可以按照上述实施例的方式进行循环执行,实现多张表中的数据块的并行迁移,相比数据块服务器中的数据块迁移,这种基于表的负载平衡方式在“热表”不多、“冷表”很多的情况下比较适用,热表是指该表的数据流量超过该表的负载热度阀值。
本发明实施例进一步提供一种数据库的数据处理装置。
参照图5,图5为本发明实施例数据库的数据处理装置第一实施例的功能模块示意图。
在本实施例中,该数据库的数据处理装置包括:
第一获取模块10,设置为获取各个数据块服务器中数据流量最大的第一数据块服务器以 及数据流量最小的第二数据块服务器;
本实施例中,在数据库的每个数据块服务器中增加一套读写压力采集服务,周期性采集预设时间内每个数据块服务器的数据流量,然后确定预设时间内数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器;也可以在数据库的每个数据块服务器的数据块中增加一套读写压力采集服务,周期性采集预设时间内每个数据块的数据流量,然后计算数据块服务器的数据流量,再确定预设时间内数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器。
第二获取模块20,设置为获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块;
第二获取模块20获取到的第一数据块为第一数据块服务器中数据流量最大的数据块,获取到的第二数据块为第二数据块服务器中数据流量最小的数据块;容易理解,在获取第一数据块及第二数据块时,如果第一数据块服务器中存在两个数据流量相同且最大的数据块或者第二数据块服务器中存在两个数据流量相同且最小的数据块,那么按照数据块的行键rowkey确定第一数据块或第二数据块。
第一交换模块30,设置为将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换。
数据请求为预设时间内数据块接收到的写入数据和/或读取数据的请求,第一交换模块30将第一数据块的数据请求设置在第二数据块上,将第二数据块的数据处理请求设置在第一数据块上,使得第一数据块写入的数据流量和/或读取的数据流量与第二数据块写入的数据流量和/或读取的数据流量的互换,进而降低了第一数据块服务器的热度参数、提高了第二数据块服务器的热度参数,使得数据库的数据块服务器的数据流量更加均衡。
本实施例中,通过第二获取模块20获取数据流量最大的第一数据块服务器中的数据流量最大的第一数据块以及数据流量最小的第二数据块服务器中数据流量最小的第二数据块,然后第一交换模块30互换第一数据块中的数据请求与第二数据块中的数据处理请求;实现了第一数据块的数据请求与第二数据块的数据处理请求的互换,使得第一数据块服务器与第二数据块服务器之间的数据流量更加均衡,进而使数据库能够及时处理第一数据块的数据请求对应的业务,有效地避免了在数据库存在数据块的流量参数过大时造成数据块服务器宕机,提高了数据库的性能和工作效率。
参照图6,图6为图5中计算模块的细化功能模块示意图。
基于第一实施例提出本发明计算模块20的细化功能模块实施例,本实施例中,第一获取模块10包括:
第一获取单元11,设置为获取预设时间内数据块的流量参数,其中,所述流量参数包括写入的数据流量和/或读取的数据流量;
写入的数据流量是指数据块所有的写入请求对应的数据包大小总和,数据块所有的读取请求对应的数据包的大小总和,因此,获取预设时间内数据块的流量参数具体是指获取数据块所有的写入请求对应的数据包大小总和及/或数据块所有的读取请求对应的数据包的大小总和。当然,预设时间内数据块的流量参数可以周期性的获取,也可以根据预设时间间隔获取。本实施例中,在数据库的每个数据块服务器数据块服务器的数据块增加一套读写压力采集服务,周期性采集预设时间内每个数据块的读、写的流量。
第二获取单元12,设置为获取所述数据块的流量参数对应的本地性参数、数据块的历史热度参数及数据块服务器的分布参数;
其中,所述数据块的流量参数对应的本地性参数LocalPercent是指数据块写入的数据和/或读取的数据的本地性比率权重,数据块写入的数据和/或读取的数据中该数据块所属的数据块服务器占有的数据比例,其取值范围是[0,1]。
数据块的历史热度参数HistoryPercent是指该数据块的历史热度趋势权重,其取值范围是[0,1],根据该数据块上最近X个(通过参数配置,默认3个)历史周期访问请求的曲线斜率趋势计算得到,其中,斜率越大说明访问请求一直呈现正向增长的趋势。
数据块服务器的分布参数TablePercent是指表Table的均衡分布率,即数据块服务器的数据块对应的表Table的均衡分布率。
计算单元13,设置为基于所述流量参数、本地性参数、历史热度参数及分布参数计算获得所述数据块服务器的热度参数;
数据块服务器的热度参数的计算公式为:
HotScorer=∑[(1-α)×LastQualityScorer+α×CurQualityScorer]×(1/LocalPercent)×(1+HistorySlope)×(1+TablePerCent)
式中,LastQualityScorer为数据块在上个预设时间内的数据流量和/或读取的数据流量,CurQualityScorer为当前预设时间内数据块的流量参数;α表示上一次该数据块服务器的数据块的热度权重值,其取值范围为[0,1],如设置成0就是不考虑上一次的热度访问,一般情况下,α的取值为0.5,表示同时兼顾本次数据块上的热度与上一次的数据块热度。
设置单元14,设置为将热度参数最大的数据块服务器作为第一数据块服务器,并将热度参数最小的数据块服务器作为第二数据块服务器。
本实施例中,通过计算单元13根据获取到的流量参数、本地性参数、历史热度参数及分布参数计算获得数据块服务器的热度参数,然后设置单元14将热度参数最大的数据块服务器作为第一数据块服务器,并将热度参数最小的数据块服务器作为第二数据块服务器,进而能够保证第一数据块服务器及第二数据块服务器分别为数据库的最热的数据块服务器与最冷的数据块服务器,进而提高了第一数据块与第二数据块的准确性,进一步提高了数据库的性能和工作效率。
参照图7,图7为本发明实施例数据库的数据处理装置第二实施例的功能模块示意图。
基于第二实施例提出本发明数据库的数据处理装置的第二实施例,本实施例中,数据库的数据处理装置还包括:
第三获取模块40,设置为获取所述第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数;
第一确定模块50,设置为确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值;
第二获取模块20还设置为在所述第一热度参数与所述第二热度参数的第一差值大于预设阈值时,获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块。
本实施例中,通过第三获取模块40获取第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数,然后第二获取模块20在所述第一确定模块50确定第一热度参数与所述第二热度参数的第一差值大于预设阈值时,获取所述第一数据块服务器的第一数据块及所述第二数据块服务器的第二数据块;避免了在第一热度参数与第二热度参数的第一差值未超过预设阈值时进行第一数据块的数据请求与第二数据块的数据请求,进而避免不必要的平衡数据库中数据块服务器的数据流量,进一步提高了数据库的性能和工作效率。
参照图8,图8为本发明实施例数据库的数据处理装置第三实施例的功能模块示意图。
基于第三实施例提出本发明数据库的数据处理装置的第三实施例,本实施例中,数据库的数据处理装置还包括:
第二确定模块60,设置为确定所述第一数据块服务器的第一热度参数是否大于预设热度;
所述第一确定模块还设置为在所述第一数据块服务器的第一热度参数大于预设热度时,确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值。
本实施例中,通过第二确定模块60确定所述第一数据块服务器的第一热度参数大于预设热度,然后第一确定模块60在所述第一数据块服务器的第一热度参数大于预设热度时,确定所述第一热度参数与所述第二热度参数的第一差值大于预设阈值;进而确定第一数据块服务器是否需要通过其数据块与其他数据块服务器中的数据块进行调整,进一步避免不必要的平衡调整数据库中数据块服务器的数据流量,提高了数据库的效率。
基于上述实施例提出本发明数据库的数据处理装置的第四实施例,本实施例中,该数据库的数据处理装置还包括:
生成模块,设置为基于所述第一数据块及第二数据块生成调整计划,其中,调整计划中的所述数据库的配置参数为将所述第一数据块中的数据请求与第二数据块中的数据请求互换 后的各个数据块服务器的热度参数及其对应的数据块对应的流量参数;
假设第一数据块中的数据请求与第二数据块中的数据请求互换完成,即第一数据块服务器的第一数据块的数据流量与第二数据块服务器的第二数据块的数据流量互换完成,根据互换完成后的数据库的配置参数生成调整计划,当然,调整计划中第一数据块服务器以及第二数据块服务器的热度参数为重新计算后的热度参数,以避免第一数据块服务器以及第二数据块服务器为交换后获取数据库中热度参数最大或最小的数据块服务器时出现错误。
第四获取模块,设置为获取调整计划中热度参数最大的第三数据块服务器以及热度参数最小的第四数据块服务器,并获取所述第三数据块服务器的第三热度参数及第四数据块服务器的第四热度参数;
第三确定模块,设置为确定所述第三热度参数与所述第四热度参数的第二差值是否大于所述预设阈值;
当然,在第三确定模块确定所述第三数据块服务器的第三热度参数与所述第四数据块服务器的第四热度参数的第二差值大于预设阈值之前,还可以先确定所述第三数据块服务器的热度参数大于预设热度,以避免不必要的平衡数据库中的数据块服务器之间的数据流量。
第五获取模块,设置为在所述第二差值大于所述预设阈值时,获取第三数据块服务器对应的各个数据块中的数据流量最大的第三数据块,以及所述第四数据块服务器对应的各个数据块中数据流量最小的第四数据块;
第二交换模块,设置为将所述第三数据块的数据请求与第四数据块的数据处理请求互换。
第二交换模块将第三数据块的数据请求设置在第四数据块上,将第四数据块的数据处理请求设置在第三数据块上,使得第三数据块写入的数据流量和/或读取的数据流量与第四数据块写入的数据流量和/或读取的数据流量的互换。
本实施例中,通过第四获取模块基于调整计划确定热度参数最大的第三数据块服务器以及热度参数最小的第四数据块服务器,然后在第三确定模块确定第二差值大于所述预设阈值时,第五获取模块确定第三数据块服务器中数据流量最大的第三数据块以及第四数据块服务器中数据流量最小的第四数据块,最后第二交换模块互换第三数据块的数据请求与第四数据块的数据处理请求;实现了第三数据块写入的数据流量和/或读取的数据流量与第四数据块写入的数据流量和/或读取的数据流量的互换,进而降低了第三数据块服务器的热度同时提高了第四数据块服务器的热度,使得第三数据块服务器与第四数据块服务器之间的数据流量更加均衡,使数据库能够及时处理第三数据块的数据请求对应的业务,有效地避免了在数据库存在第三数据块的流量参数过大时造成第三数据块服务器宕机,进一步提高了数据库的性能和工作效率。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
工业实用性
上述的本发明实施例,可以应用于通信领域,解决了可能引起其他的数据块服务器的连续宕机,最终导致读、写请求对应的业务完全中断的问题,使得数据库中的各个数据块服务器之间的数据流量更加均衡,提高了数据库的性能和工作效率。

Claims (10)

  1. 一种数据库的数据处理方法,所述数据库的数据处理方法包括以下步骤:
    获取各个数据块服务器中数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器;
    获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块;
    将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换。
  2. 如权利要求1所述的数据库的数据处理方法,其中,所述获取各个数据块服务器中数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器的步骤包括:
    获取预设时间内数据块的流量参数,其中,所述流量参数包括写入的数据流量和/或读取的数据流量;
    获取所述数据块的流量参数对应的本地性参数、数据块的历史热度参数及数据块服务器的分布参数;
    基于所述流量参数、本地性参数、历史热度参数及分布参数计算获得所述数据块服务器的热度参数;
    将热度参数最大的数据块服务器作为第一数据块服务器,并将热度参数最小的数据块服务器作为第二数据块服务器。
  3. 如权利要求2所述的数据库的数据处理方法,其中,在所述获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块的步骤之前,所述方法还包括:
    获取所述第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数;
    确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值;
    在所述第一热度参数与所述第二热度参数的第一差值大于预设阈值时,执行所述获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块的步骤。
  4. 如权利要求3所述的数据库的数据处理方法,其中,在获取所述第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数与所述确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值的步骤之间,所述方法还包括:
    确定所述第一数据块服务器的第一热度参数是否大于预设热度;
    在所述第一数据块服务器的第一热度参数大于预设热度时,执行所述确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值的步骤。
  5. 如权利要求3或4所述的数据库的数据处理方法,其中,在所述获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块的步骤与所述将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换的步骤之间,所述方法还包括:
    基于所述第一数据块及第二数据块生成调整计划,其中,调整计划中的所述数据库的配置参数为将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换后的各个数据块服务器的热度参数及其对应的数据块对应的流量参数;
    获取调整计划中热度参数最大的第三数据块服务器以及热度参数最小的第四数据块服务器,并获取所述第三数据块服务器的第三热度参数及第四数据块服务器的第四热度参数;
    确定所述第三热度参数与所述第四热度参数的第二差值是否大于所述预设阈值;
    在所述第二差值大于所述预设阈值时,获取第三数据块服务器对应的各个数据块中的数据流量最大的第三数据块,以及所述第四数据块服务器对应的各个数据块中数据流量最小的第四数据块;
    在所述将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换的步骤之后,所述方法还包括:
    将所述第三数据块的数据请求与第四数据块的数据处理请求互换。
  6. 一种数据库的数据处理装置,所述数据库的数据处理装置包括:
    第一获取模块,设置为获取各个数据块服务器中数据流量最大的第一数据块服务器以及数据流量最小的第二数据块服务器;
    第二获取模块,设置为获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块;
    第一交换模块,设置为将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换。
  7. 如权利要求6所述的数据库的数据处理装置,其中,所述第一获取模块包括:
    第一获取单元,设置为获取预设时间内数据块的流量参数,其中,所述流量参数包括写入的数据流量和/或读取的数据流量;
    第二获取单元,设置为获取所述数据块的流量参数对应的本地性参数、数据块的历史热度参数及数据块服务器的分布参数;
    计算单元,设置为基于所述流量参数、本地性参数、历史热度参数及分布参数计算获得所述数据块服务器的热度参数;
    设置单元,设置为将热度参数最大的数据块服务器作为第一数据块服务器,并将热度参数最小的数据块服务器作为第二数据块服务器。
  8. 如权利要求7所述的数据库的数据处理装置,其中,所述数据库的数据处理装置还包括:
    第三获取模块,设置为获取所述第一数据块服务器的第一热度参数及第二数据块服务器的第二热度参数;
    第一确定模块,设置为确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值;
    所述第二获取模块还设置为在所述第一热度参数与所述第二热度参数的第一差值大于预设阈值时,获取第一数据块服务器对应的各个数据块中的数据流量最大的第一数据块,以及所述第二数据块服务器对应的各个数据块中数据流量最小的第二数据块。
  9. 如权利要求8所述的数据库的数据处理装置,其中,所述数据库的数据处理装置还包括:
    第二确定模块,设置为确定所述第一数据块服务器的第一热度参数是否大于预设热度;
    所述第一确定模块还设置为在所述第一数据块服务器的第一热度参数大于预设热度时,确定所述第一热度参数与所述第二热度参数的第一差值是否大于预设阈值。
  10. 如权利要求8或9所述的数据库的数据处理装置,其中,所述数据库的数据处理装置还包括:
    生成模块,设置为基于所述第一数据块及第二数据块生成调整计划,其中,调整计划中的所述数据库的配置参数为将所述第一数据块中的数据请求与第二数据块中的数据处理请求互换后的各个数据块服务器的热度参数及其对应的数据块对应的流量参数;
    第四获取模块,设置为获取调整计划中热度参数最大的第三数据块服务器以及热度参数最小的第四数据块服务器,并获取所述第三数据块服务器的第三热度参数及第四数据块服务器的第四热度参数;
    第三确定模块,设置为确定所述第三热度参数与所述第四热度参数的第二差值是否大于所述预设阈值;
    第五获取模块,设置为在所述第二差值大于所述预设阈值时,获取第三数据块服务器对应的各个数据块中的数据流量最大的第三数据块,以及所述第四数据块服务器对应的各个数据块中数据流量最小的第四数据块;
    第二交换模块,设置为将所述第三数据块的数据请求与第四数据块的数据处理请求互换。
PCT/CN2015/089383 2015-06-24 2015-09-10 数据库的数据处理方法及装置 WO2016206192A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510355202.2 2015-06-24
CN201510355202.2A CN106326252B (zh) 2015-06-24 2015-06-24 数据库的数据处理方法及装置

Publications (1)

Publication Number Publication Date
WO2016206192A1 true WO2016206192A1 (zh) 2016-12-29

Family

ID=57584359

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/089383 WO2016206192A1 (zh) 2015-06-24 2015-09-10 数据库的数据处理方法及装置

Country Status (2)

Country Link
CN (1) CN106326252B (zh)
WO (1) WO2016206192A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562542A (zh) * 2017-09-06 2018-01-09 腾讯科技(深圳)有限公司 分布式数据处理系统数据分区方法及装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107748649B (zh) * 2017-09-18 2021-03-30 北京京东尚科信息技术有限公司 一种缓存数据的方法和装置
CN110324403A (zh) * 2019-05-23 2019-10-11 平安科技(深圳)有限公司 动态分库路由方法、装置、服务器及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312825A (zh) * 2013-07-10 2013-09-18 中国人民解放军国防科学技术大学 一种数据分布存储方法和装置
CN103873504A (zh) * 2012-12-12 2014-06-18 鸿富锦精密工业(深圳)有限公司 数据分块存储至分布式服务器的系统及方法
CN104158902A (zh) * 2014-08-27 2014-11-19 浙江宇视科技有限公司 一种基于请求数的Hbase数据块分配方法及装置
CN104580268A (zh) * 2013-10-09 2015-04-29 南京中兴新软件有限责任公司 文件数据的传输方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101146114A (zh) * 2007-10-12 2008-03-19 中兴通讯股份有限公司 一种流媒体服务器负荷分担方法及其系统
CN101594371A (zh) * 2008-05-28 2009-12-02 山东省标准化研究院 食品安全追溯数据库的负载均衡优化方法
CN102110014A (zh) * 2011-03-15 2011-06-29 合肥华云通信技术有限公司 虚拟机负载均衡处理的方法
CN102916896B (zh) * 2011-08-01 2015-08-19 赛尔网络有限公司 多路端口镜像混合数据流分流方法及设备
CN102316045B (zh) * 2011-10-19 2014-05-14 杭州华三通信技术有限公司 一种实现mstp组网中流量均衡的方法和网络设备
CN103220354A (zh) * 2013-04-18 2013-07-24 广东宜通世纪科技股份有限公司 一种实现服务器集群负载均衡的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873504A (zh) * 2012-12-12 2014-06-18 鸿富锦精密工业(深圳)有限公司 数据分块存储至分布式服务器的系统及方法
CN103312825A (zh) * 2013-07-10 2013-09-18 中国人民解放军国防科学技术大学 一种数据分布存储方法和装置
CN104580268A (zh) * 2013-10-09 2015-04-29 南京中兴新软件有限责任公司 文件数据的传输方法及装置
CN104158902A (zh) * 2014-08-27 2014-11-19 浙江宇视科技有限公司 一种基于请求数的Hbase数据块分配方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562542A (zh) * 2017-09-06 2018-01-09 腾讯科技(深圳)有限公司 分布式数据处理系统数据分区方法及装置
CN107562542B (zh) * 2017-09-06 2020-04-07 腾讯科技(深圳)有限公司 分布式数据处理系统数据分区方法及装置

Also Published As

Publication number Publication date
CN106326252A (zh) 2017-01-11
CN106326252B (zh) 2020-05-22

Similar Documents

Publication Publication Date Title
CN104065568B (zh) 一种Web服务器集群的路由方法
JP6521324B2 (ja) 単一テナント及び複数テナント環境を提供するデータベースシステム
US9384227B1 (en) Database system providing skew metrics across a key space
CN112860695B (zh) 监控数据查询方法、装置、设备、存储介质及程序产品
CN110659430B (zh) 一种支持多区块链网络的区块链浏览方法
WO2016206192A1 (zh) 数据库的数据处理方法及装置
JP6104184B2 (ja) クラウドストレージシステムのデータ暗号化処理装置及び方法
CN106873945A (zh) 基于批处理和流式处理的数据处理架构及数据处理方法
WO2020224489A1 (zh) 基于区块链的银行数据共享方法及相关设备
JP7300347B2 (ja) クライアント又はサーバとの接続を制御する方法
CN106326461B (zh) 一种基于网络信令记录的实时处理保障方法及系统
CN108416054B (zh) 基于文件访问热度的动态hdfs副本个数计算方法
CN103838770A (zh) 一种数据逻辑分区的方法和系统
CA2942948A1 (en) Systems for parallel processing of datasets with dynamic skew compensation
TW202112113A (zh) 資源分享方法、裝置、電腦裝置及存儲介質
WO2021082936A1 (zh) 一种网页访客数量统计方法及装置
US20190272200A1 (en) System and method for scaling provisioned resources
Yu et al. Achieving load-balanced, redundancy-free cluster caching with selective partition
CN111770150A (zh) 访问流量控制方法、装置及电子设备
WO2016169420A1 (zh) 一种业务请求执行状态的查询方法、装置及系统
Tang et al. Distributed online tracking
WO2017028738A1 (zh) 一种基于区域的风险控制方法和设备
WO2022222346A1 (zh) 一种数据存储方法及装置
CN106302226A (zh) 一种QoS感知的服务动态调度方法
CN104539731B (zh) 一种基于社会网络节点寻优的可信服务扩散方法及装置

Legal Events

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

Ref document number: 15896087

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15896087

Country of ref document: EP

Kind code of ref document: A1