CN114443619B - Database expansion method, device, electronic equipment and storage medium - Google Patents
Database expansion method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114443619B CN114443619B CN202210102894.XA CN202210102894A CN114443619B CN 114443619 B CN114443619 B CN 114443619B CN 202210102894 A CN202210102894 A CN 202210102894A CN 114443619 B CN114443619 B CN 114443619B
- Authority
- CN
- China
- Prior art keywords
- database
- data
- target database
- link information
- expansion
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 238000012544 monitoring process Methods 0.000 claims abstract description 98
- 230000004044 response Effects 0.000 claims abstract description 65
- 238000004458 analytical method Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 4
- 238000007726 management method Methods 0.000 description 24
- 238000010586 diagram Methods 0.000 description 14
- 238000012545 processing Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 5
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
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)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本公开提供了一种数据库扩容方法、装置、电子设备及存储介质,数据库扩容方法包括:获取目标数据库的数据链路信息;对数据链路信息进行解析;根据解析结果确定是否对目标数据库进行扩容,其中,解析结果中包含如下至少之一:目标数据库中数据表的数据量、请求响应时长和并发请求数量。本公开通过对目标数据库中的数据进行监控和分析,在目标数据库中数据表的数据量、请求响应时长或并发请求数量中的任一项或多项达到阈值时,调用链监控系统服务端向数据库管理模块发送扩容请求,数据库管理模块基于扩容请求完成对目标数据库的扩容,从而提高了数据库扩容的效率和提升了数据库的性能。
The present disclosure provides a database expansion method, device, electronic device and storage medium. The database expansion method includes: obtaining data link information of a target database; parsing the data link information; determining whether to expand the target database according to the parsing result, wherein the parsing result includes at least one of the following: the amount of data in the data table in the target database, the request response time and the number of concurrent requests. The present disclosure monitors and analyzes the data in the target database. When any one or more of the amount of data in the data table in the target database, the request response time or the number of concurrent requests reaches a threshold, the call chain monitoring system server sends an expansion request to the database management module. The database management module completes the expansion of the target database based on the expansion request, thereby improving the efficiency of database expansion and improving the performance of the database.
Description
技术领域Technical Field
本公开涉及数据存储技术领域,尤其涉及一种数据库扩容方法、装置、电子设备及存储介质。The present disclosure relates to the technical field of data storage, and in particular to a database expansion method, device, electronic device and storage medium.
背景技术Background Art
数据库(Database)是按照数据结构来组织、存储和管理数据的建立在计算机存储设备上的仓库。随着业务不断发展,应用系统的业务数据也随着日积月累,在开发企业级应用过程中,关系型数据库在大于一定数据量的情况下检索性能会急剧下降。当需要对海量数据进行操作时,如果将所有数据保存在一张数据表中,往往会超出数据表可以存储的阈值,另外,过多的并发请求访问同一个数据库时,数据库的响应也会变慢。A database is a warehouse built on a computer storage device that organizes, stores, and manages data according to data structures. As the business continues to grow, the business data of the application system also accumulates over time. In the process of developing enterprise-level applications, the retrieval performance of a relational database will drop sharply when the amount of data exceeds a certain value. When it is necessary to operate on massive amounts of data, if all the data is stored in a data table, it will often exceed the storage threshold of the data table. In addition, when too many concurrent requests access the same database, the database response will also slow down.
现有技术在解决上述问题上,通常在搭建数据库时创建多个数据库和数据表,将并发请求分发到不同的数据库及数据表中,或者当数据量和并发请求数超过阈值时,手动创建新的数据库和数据表。但是,在业务开展初期,数据库的数据量和并发请求均较少,如果在初期就分配大量的数据库和数据表资源,会造成资源浪费,手动创建数据库和数据表又耗时耗力。In solving the above problems, the existing technology usually creates multiple databases and data tables when building a database, distributes concurrent requests to different databases and data tables, or manually creates new databases and data tables when the data volume and the number of concurrent requests exceed the threshold. However, in the early stage of business development, the amount of data and concurrent requests in the database are relatively small. If a large number of database and data table resources are allocated in the early stage, it will cause a waste of resources, and manually creating databases and data tables is time-consuming and labor-intensive.
基于此,如何提高数据库扩容的效率,及节省数据库和数据表的资源成为了亟需解决的技术问题。Based on this, how to improve the efficiency of database expansion and save database and data table resources has become a technical problem that needs to be solved urgently.
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field.
发明内容Summary of the invention
本公开提供一种数据库扩容方法、装置、电子设备及存储介质,至少在一定程度上克服相关技术中数据库扩容效率低的问题。The present disclosure provides a database expansion method, device, electronic device and storage medium, which at least to a certain extent overcome the problem of low database expansion efficiency in the related art.
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
根据本公开的一个方面,提供了一种数据库扩容方法,该方法包括:获取目标数据库的数据链路信息;对所述数据链路信息进行解析;根据解析结果确定是否对所述目标数据库进行扩容,其中,所述解析结果中包含如下至少之一:所述目标数据库中数据表的数据量、请求响应时长和并发请求数量。According to one aspect of the present disclosure, a method for expanding a database is provided, the method comprising: obtaining data link information of a target database; parsing the data link information; and determining whether to expand the target database based on a parsing result, wherein the parsing result includes at least one of the following: the amount of data in a data table in the target database, request response time, and the number of concurrent requests.
在本公开的一个实施例中,所述根据解析结果确定是否对所述目标数据库进行扩容包括:判断所述目标数据库中数据表的数据量是否超过第一预设阈值;若所述数据表的数据量超过所述第一预设阈值,则对所述目标数据库进行扩容。In one embodiment of the present disclosure, determining whether to expand the target database based on the analysis results includes: judging whether the amount of data in the data table in the target database exceeds a first preset threshold; if the amount of data in the data table exceeds the first preset threshold, expanding the target database.
在本公开的一个实施例中,所述方法还包括:若所述数据表的数据量未超过所述第一预设阈值,则判断所述请求响应时长是否超过第二预设阈值;若所述请求响应时长超过所述第二预设阈值,则对所述目标数据库进行扩容。In one embodiment of the present disclosure, the method further includes: if the data volume of the data table does not exceed the first preset threshold, determining whether the request response time exceeds a second preset threshold; if the request response time exceeds the second preset threshold, expanding the target database.
在本公开的一个实施例中,所述方法还包括:若所述请求响应时长未超过所述第二预设阈值,则判断所述并发请求数量是否超过第三预设阈值;若所述并发请求数量超过第三预设阈值,则对所述目标数据库进行扩容。In one embodiment of the present disclosure, the method further includes: if the request response time does not exceed the second preset threshold, determining whether the number of concurrent requests exceeds a third preset threshold; if the number of concurrent requests exceeds the third preset threshold, expanding the capacity of the target database.
在本公开的一个实施例中,获取目标数据库的数据链路信息,包括:在调用链监控系统客户端的监控消息的SQL(structured query language,结构化查询语言)节点中加入如下数据字段:数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量的字段;利用所述监控消息采集所述目标数据库的数据;汇总所述监控消息采集到的数据,得到数据链路信息,其中,所述数据链路信息包含所述目标数据库的数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量。In one embodiment of the present disclosure, data link information of a target database is obtained, including: adding the following data fields to a SQL (structured query language) node of a monitoring message of a call chain monitoring system client: fields for a database name, a data table name, a data volume of a data table, a request start time, a response end time, and a number of concurrent requests; using the monitoring message to collect data of the target database; and summarizing the data collected by the monitoring message to obtain data link information, wherein the data link information includes the database name, the data table name, the data volume of a data table, the request start time, the response end time, and the number of concurrent requests of the target database.
在本公开的一个实施例中,所述方法还包括:在确定对所述目标数据库进行扩容的情况下,根据所述数据库名和数据表名,生成所述扩容请求;将所述扩容请求发送至数据库管理模块,以使所述数据库管理模块根据所述扩容请求对目标数据库进行扩容。In one embodiment of the present disclosure, the method further includes: when determining to expand the capacity of the target database, generating the expansion request according to the database name and the data table name; sending the expansion request to the database management module so that the database management module expands the target database according to the expansion request.
根据本公开的另一个方面,提供另一种数据库扩容方法,包括:接收调用链监控系统服务端发送的扩容请求,其中,所述调用链监控系统服务端获取目标数据库的数据链路信息,对所述数据链路信息进行解析,在根据解析结果确定对所述目标数据库进行扩容的情况下,生成扩容请求,所述解析结果中包含如下至少之一:所述目标数据库中数据表的数据量、请求响应时长和并发请求数量;基于所述扩容请求对目标数据库进行扩容。According to another aspect of the present disclosure, another database expansion method is provided, including: receiving an expansion request sent by a call chain monitoring system server, wherein the call chain monitoring system server obtains data link information of a target database, parses the data link information, and generates an expansion request when it is determined based on the analysis result that the target database is to be expanded, the analysis result including at least one of the following: the amount of data in a data table in the target database, request response time, and the number of concurrent requests; and expanding the target database based on the expansion request.
在本公开的一个实施例中,基于所述扩容请求对目标数据库进行扩容,包括:根据所述扩容请求中包含的数据库名和数据表名,获取待执行的分库分表规则;根据所述数据库名、所述数据表名和所述待执行的分库分表规则,调用相应的新建库表脚本,其中,所述新建库表脚本用于根据所述待执行的分库分表规则对目标数据库进行分库分表;执行所述新建库表脚本。In one embodiment of the present disclosure, the target database is expanded based on the expansion request, including: obtaining the library and table sharding rules to be executed according to the database name and data table name contained in the expansion request; calling the corresponding new library and table script according to the database name, the data table name and the library and table sharding rules to be executed, wherein the new library and table script is used to shard the target database according to the library and table sharding rules to be executed; and executing the new library and table script.
根据本公开的再一个方面,提供一种数据库扩容装置,包括:数据链路信息获取模块,用于获取目标数据库的数据链路信息;数据链路信息解析模块,用于对所述数据链路信息进行解析;扩容结果确定模块,用于根据解析结果确定是否对所述目标数据库进行扩容,其中,所述解析结果中包含如下至少之一:所述目标数据库中数据表的数据量、请求响应时长和并发请求数量。According to another aspect of the present disclosure, a database expansion device is provided, including: a data link information acquisition module, used to acquire data link information of a target database; a data link information parsing module, used to parse the data link information; an expansion result determination module, used to determine whether to expand the target database according to the parsing result, wherein the parsing result includes at least one of the following: the amount of data in a data table in the target database, the request response time, and the number of concurrent requests.
在本公开的一个实施例中,上述扩容结果确定模块还用于判断所述目标数据库中数据表的数据量是否超过第一预设阈值;若所述数据表的数据量超过所述第一预设阈值,则对所述目标数据库进行扩容。In one embodiment of the present disclosure, the above-mentioned expansion result determination module is also used to determine whether the data volume of the data table in the target database exceeds a first preset threshold; if the data volume of the data table exceeds the first preset threshold, the target database is expanded.
在本公开的一个实施例中,上述扩容结果确定模块还用于若所述数据表的数据量未超过所述第一预设阈值,则判断所述请求响应时长是否超过第二预设阈值;若所述请求响应时长超过所述第二预设阈值,则对所述目标数据库进行扩容。In one embodiment of the present disclosure, the above-mentioned expansion result determination module is also used to determine whether the request response time exceeds the second preset threshold if the data volume of the data table does not exceed the first preset threshold; if the request response time exceeds the second preset threshold, the target database is expanded.
在本公开的一个实施例中,上述扩容结果确定模块还用于若所述请求响应时长未超过所述第二预设阈值,则判断所述并发请求数量是否超过第三预设阈值;若所述并发请求数量超过第三预设阈值,则对所述目标数据库进行扩容。In one embodiment of the present disclosure, the above-mentioned expansion result determination module is also used to determine whether the number of concurrent requests exceeds a third preset threshold if the request response time does not exceed the second preset threshold; if the number of concurrent requests exceeds the third preset threshold, the target database is expanded.
在本公开的一个实施例中,上述数据链路信息获取模块还用于在调用链监控系统客户端的监控消息的SQL节点中加入如下数据字段:数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量的字段;利用所述监控消息采集所述目标数据库的数据;汇总所述监控消息采集到的数据,得到数据链路信息,其中,所述数据链路信息包含所述目标数据库的数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量。In one embodiment of the present disclosure, the above-mentioned data link information acquisition module is also used to add the following data fields in the SQL node of the monitoring message of the call chain monitoring system client: fields for database name, data table name, data volume of the data table, request start time, response end time and number of concurrent requests; use the monitoring message to collect data of the target database; summarize the data collected by the monitoring message to obtain data link information, wherein the data link information includes the database name, data table name, data volume of the data table, request start time, response end time and number of concurrent requests of the target database.
在本公开的一个实施例中,上述装置还包括请求生成模块,该请求生成模块用于在确定对所述目标数据库进行扩容的情况下,根据所述数据库名和数据表名,生成所述扩容请求;将所述扩容请求发送至数据库管理模块,以使所述数据库管理模块根据所述扩容请求对目标数据库进行扩容。In one embodiment of the present disclosure, the above-mentioned device also includes a request generation module, which is used to generate the expansion request according to the database name and the data table name when it is determined that the target database is to be expanded; and send the expansion request to the database management module so that the database management module expands the target database according to the expansion request.
根据本公开的再一个方面,提供另一种数据库扩容装置,包括:扩容请求接收模块,用于接收调用链监控系统服务端发送的扩容请求,其中,所述调用链监控系统服务端获取目标数据库的数据链路信息,对所述数据链路信息进行解析,在根据解析结果确定对所述目标数据库进行扩容的情况下,生成扩容请求,所述解析结果中包含如下至少之一:所述目标数据库中数据表的数据量、请求响应时长和并发请求数量;扩容模块,用于基于所述扩容请求对目标数据库进行扩容。According to another aspect of the present disclosure, another database expansion device is provided, including: an expansion request receiving module, used to receive an expansion request sent by a call chain monitoring system server, wherein the call chain monitoring system server obtains data link information of a target database, parses the data link information, and generates an expansion request when it is determined according to the analysis result that the target database is to be expanded, the analysis result includes at least one of the following: the amount of data in a data table in the target database, the request response time, and the number of concurrent requests; an expansion module, used to expand the target database based on the expansion request.
根据本公开的再一个方面,还提供了一种数据库扩容系统,该系统包括:调用链监控系统客户端,用于采集目标数据库的数据链路信息,将所述数据链路信息发送至调用链监控系统服务端;调用链监控系统服务端,用于接收所述调用链监控系统客户端发送的数据链路信息,对所述数据链路信息进行解析;根据解析结果确定是否对所述目标数据库进行扩容,其中,所述解析结果中包含如下至少之一:所述目标数据库中数据表的数据量、请求响应时长和并发请求数量;数据库管理模块,用于对所述目标数据库进行扩容。According to another aspect of the present disclosure, a database expansion system is also provided, which includes: a call chain monitoring system client, used to collect data link information of a target database and send the data link information to a call chain monitoring system server; a call chain monitoring system server, used to receive the data link information sent by the call chain monitoring system client, and parse the data link information; determine whether to expand the target database based on the parsing result, wherein the parsing result includes at least one of the following: the amount of data in the data table in the target database, the request response time and the number of concurrent requests; a database management module, used to expand the target database.
根据本公开的再一个方面,还提供了一种电子设备,该电子设备包括:处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令来执行上述任一项的数据库扩容方法。According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-mentioned database expansion methods by executing the executable instructions.
根据本公开的又一个方面,还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项的数据库扩容方法。According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for expanding the database described in any one of the above is implemented.
本公开的实施例所提供的一种数据库扩容方法、装置、电子设备及存储介质,通过对目标数据库中的数据链路信息进行采集和解析,在目标数据库中数据表的数据量、请求响应时长和并发请求数量其中的任意一项符合预设条件时,生成扩容请求,并基于扩容请求完成对目标数据库的扩容,能够提高数据库的扩容效率,提升数据库的性能。The embodiments of the present disclosure provide a database expansion method, device, electronic device and storage medium. By collecting and parsing data link information in a target database, an expansion request is generated when any one of the data volume, request response time and concurrent request number of a data table in the target database meets a preset condition, and the expansion of the target database is completed based on the expansion request, thereby improving the expansion efficiency of the database and enhancing the performance of the database.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
图1示出本公开实施例中一种数据库扩容方法的流程图;FIG1 shows a flow chart of a method for expanding database capacity in an embodiment of the present disclosure;
图2示出本公开实施例中又一种数据库扩容方法的流程图;FIG2 shows a flow chart of another method for expanding database capacity in an embodiment of the present disclosure;
图3示出本公开实施例中又一种数据库扩容方法的流程图;FIG3 shows a flow chart of another method for expanding database capacity in an embodiment of the present disclosure;
图4示出本公开实施例中又一种数据库扩容方法的流程图;FIG4 shows a flow chart of another method for expanding database capacity in an embodiment of the present disclosure;
图5示出本公开实施例中又一种数据库扩容方法的流程图;FIG5 shows a flow chart of another method for expanding database capacity in an embodiment of the present disclosure;
图6示出本公开实施例中又一种数据库扩容方法的流程图;FIG6 shows a flowchart of another method for expanding database capacity in an embodiment of the present disclosure;
图7示出本公开实施例中再一种数据库扩容方法的流程图;FIG7 shows a flowchart of another method for expanding database capacity in an embodiment of the present disclosure;
图8示出本公开实施例中再一种数据库扩容方法的流程图;FIG8 shows a flowchart of another database expansion method according to an embodiment of the present disclosure;
图9示出本公开实施例中另一种数据库扩容方法的示意图;FIG9 is a schematic diagram showing another database expansion method in an embodiment of the present disclosure;
图10示出本公开实施例中另一种数据库扩容方法的示意图;FIG10 is a schematic diagram showing another database expansion method in an embodiment of the present disclosure;
图11示出本公开实施例中另一种数据库扩容方法的示意图;FIG11 is a schematic diagram showing another database expansion method in an embodiment of the present disclosure;
图12示出本公开实施例中一种数据库扩容装置的结构示意图;FIG12 is a schematic diagram showing the structure of a database expansion device according to an embodiment of the present disclosure;
图13示出本公开实施例中另一种数据库扩容装置的结构示意图;FIG13 is a schematic diagram showing the structure of another device for expanding the capacity of a database according to an embodiment of the present disclosure;
图14示出本公开实施例中一种数据库扩容系统的结构示意图;FIG14 is a schematic diagram showing the structure of a database expansion system according to an embodiment of the present disclosure;
图15示出本公开实施例中一种电子设备的结构框图。FIG. 15 shows a structural block diagram of an electronic device in an embodiment of the present disclosure.
具体实施方式DETAILED DESCRIPTION
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and/or processor devices and/or microcontroller devices.
正如背景技术中所提到的,发明人发现关系型数据库在数据量超过阈值的情况下,检索性能会急剧下降;当并发请求过多时,数据库的响应时长也随之增加。现有技术通常采用以下两种方式解决上述问题,其一是搭建数据库时创建多个数据库和数据表,将并发请求分发到不同的数据库及数据表中。其二是当数据量或并发请求数超过阈值时,手动创建新的库表。As mentioned in the background technology, the inventors found that the retrieval performance of a relational database will drop sharply when the amount of data exceeds a threshold; when there are too many concurrent requests, the response time of the database will also increase. The prior art usually adopts the following two methods to solve the above problems. One is to create multiple databases and data tables when building a database, and distribute concurrent requests to different databases and data tables. The second is to manually create a new library table when the amount of data or the number of concurrent requests exceeds the threshold.
通常来讲,业务刚上线时,数据库中的数据量及并发请求量都较少,随着业务的展开,数据量和并发请求量会逐渐增多。所以,如果一开始就分配大量的数据库和数据表资源,会产生资源的浪费,并且而手动创建库表耗时耗力。Generally speaking, when a business is just launched, the amount of data and concurrent requests in the database are relatively small. As the business expands, the amount of data and concurrent requests will gradually increase. Therefore, if a large number of database and data table resources are allocated at the beginning, it will waste resources, and manually creating database tables will be time-consuming and labor-intensive.
发明人又发现,现有的调用链路监控系统只是对微服务间的调用关系、性能等进行监控和展示,并没有监控数据库的数据量、并发量等信息,也不涉及数据库的分库分表。The inventors also discovered that the existing call link monitoring system only monitors and displays the call relationship and performance between microservices, but does not monitor the database data volume, concurrency and other information, nor does it involve the database sub-library and table sub-table.
基于此,本公开利用调用链监控系统采集数据库的数据库信息,对数据进行分析,在数据库信息中的某些参数满足预设条件的情况下,自动对数据库进行扩容,以提高对数据库的自动扩容效率。Based on this, the present invention utilizes the call chain monitoring system to collect database information of the database, analyzes the data, and automatically expands the database when certain parameters in the database information meet preset conditions, so as to improve the efficiency of automatic expansion of the database.
下面结合附图及实施例对本示例实施方式进行详细说明。The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.
首先,本公开实施例中提供了一种数据库扩容方法,该方法可以由任意具备计算处理能力的电子设备执行。First, a method for expanding database capacity is provided in an embodiment of the present disclosure. The method can be executed by any electronic device with computing and processing capabilities.
图1示出本公开实施例中一种数据库扩容方法流程图,如图1所示,本公开实施例中提供的数据库扩容方法,可以应用但不限于调用链监控系统服务端,包括如下步骤:FIG1 shows a flow chart of a method for expanding the capacity of a database in an embodiment of the present disclosure. As shown in FIG1 , the method for expanding the capacity of a database provided in an embodiment of the present disclosure can be applied to, but not limited to, a call chain monitoring system server, and includes the following steps:
S102,获取目标数据库的数据链路信息。S102, obtaining data link information of the target database.
该步骤中,目标数据库可以为关系型数据库,数据库为按照数据结构来组织、存储和管理数据的仓库;目标数据库可以是一个或多个数据库。数据链路信息是指通过调用链监控系统采集的目标数据库的数据库信息,可以包括但不限于:目标数据库的数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量等。In this step, the target database can be a relational database, which is a warehouse that organizes, stores and manages data according to the data structure; the target database can be one or more databases. Data link information refers to the database information of the target database collected by the call chain monitoring system, which may include but is not limited to: the database name of the target database, the name of the data table, the amount of data in the data table, the request start time, the response end time and the number of concurrent requests, etc.
需要说明的是,调用链监控系统是用于获取和监控业务在微服务之间的调用关系,生成业务对应的调用链日志的系统,本公开在调用链监控系统现有功能的基础上,增加了数据库信息采集和解析功能,详细的,可通过客户端采集目标数据库的数据链路信息,可通过服务端接收客户端发送的数据链路信息,并对数据链路信息进行解析,完成数据库信息的采集和解析过程。It should be noted that the call chain monitoring system is a system for obtaining and monitoring the call relationship between businesses and microservices, and generating call chain logs corresponding to the businesses. The present invention adds database information collection and analysis functions based on the existing functions of the call chain monitoring system. Specifically, the data link information of the target database can be collected through the client, the data link information sent by the client can be received through the server, and the data link information can be analyzed to complete the database information collection and analysis process.
上述S102中的数据链路信息可以是直接采集的,也可以是从其他设备输入的,在本公开的一个实施例中,可以借助调用链监控系统中在各个节点部署的调用链监控系统客户端采集目标数据库的数据链路信息,其中,调用链监控系统客户端可通过异步发送监控消息对数据链路信息进行采集,调用链监控系统客户端将采集到的数据链路信息发送至调用链监控系统服务端,调用链监控系统服务端接收目标数据库的数据链路信息。The data link information in the above S102 can be collected directly or input from other devices. In one embodiment of the present disclosure, the data link information of the target database can be collected with the help of the call chain monitoring system client deployed at each node in the call chain monitoring system, wherein the call chain monitoring system client can collect the data link information by asynchronously sending monitoring messages, and the call chain monitoring system client sends the collected data link information to the call chain monitoring system server, and the call chain monitoring system server receives the data link information of the target database.
S104,对数据链路信息进行解析。S104, parsing the data link information.
该步骤中,通过对数据链路信息进行解析,判断数据链路信息中的某些数据是否满足预设扩容条件,在本公开的一个实施例中,可以通过调用链监控系统服务端对数据链路信息进行解析,分析目标数据库中的数据是否超过预设阈值,可以对目标数据库中数据表的数据量、请求响应时长和并发请求数量进行分析,其中,请求响应时长可以根据请求开始时间和应答结束时间计算得出,调用链监控系统服务端可以根据数据链路信息中包含的数据,判断目标数据库的数据是否满足预设的数据库扩容条件。In this step, by parsing the data link information, it is determined whether certain data in the data link information meets the preset expansion conditions. In one embodiment of the present disclosure, the data link information can be parsed by the call chain monitoring system server to analyze whether the data in the target database exceeds the preset threshold. The data volume, request response time and number of concurrent requests of the data table in the target database can be analyzed, wherein the request response time can be calculated based on the request start time and the response end time. The call chain monitoring system server can determine whether the data in the target database meets the preset database expansion conditions based on the data contained in the data link information.
S106,根据解析结果确定是否对目标数据库进行扩容,其中,解析结果中包含如下至少之一:目标数据库中数据表的数据量、请求响应时长和并发请求数量。S106, determining whether to expand the target database according to the analysis result, wherein the analysis result includes at least one of the following: the amount of data in the data table of the target database, the request response time, and the number of concurrent requests.
该步骤中,根据S104对数据链路信息的解析结果,确定是否对目标数据库进行扩容,比如,当目标数据库中数据表的数据量达到预设条件时,确定对目标数据库进行扩容,或者当请求响应时长达到预设条件时,确定对目标数据库进行扩容,还可以当并发请求数量达到预设条件时,确定对目标数据库进行扩容。In this step, based on the analysis result of the data link information in S104, it is determined whether to expand the target database. For example, when the amount of data in the data table in the target database reaches a preset condition, it is determined to expand the target database, or when the request response time reaches a preset condition, it is determined to expand the target database. It can also be determined to expand the target database when the number of concurrent requests reaches a preset condition.
由上可知,本公开实施例中提供的上述数据库扩容方法,通过对目标数据库的数据链路信息进行监控和分析,在本公开的一个实施例中,当目标数据库中数据表的数据量、请求响应时长和并发请求数量其中的任意一项符合预设条件时,调用链监控系统服务端向数据库管理模块发送扩容请求,数据库管理模块基于扩容请求完成对目标数据库的扩容,实现了数据库自动分库分表,提高了数据库扩容的效率和数据库的性能,并节约了数据库的资源。From the above, it can be seen that the above-mentioned database expansion method provided in the embodiment of the present disclosure monitors and analyzes the data link information of the target database. In one embodiment of the present disclosure, when any one of the data volume, request response time and concurrent request number of the data table in the target database meets the preset conditions, the call chain monitoring system server sends an expansion request to the database management module, and the database management module completes the expansion of the target database based on the expansion request, realizes automatic database sub-library and table sub-division, improves the efficiency of database expansion and database performance, and saves database resources.
在本公开的一个实施例中,根据解析结果确定是否对目标数据库进行扩容,这一步骤还可以包括图2中公开的步骤,如图2所示的又一种数据库扩容方法的流程图,具体可以包括:In one embodiment of the present disclosure, determining whether to expand the target database according to the analysis result may also include the steps disclosed in FIG. 2 , as shown in FIG. 2 , which is a flowchart of another database expansion method, may specifically include:
S202,判断目标数据库中数据表的数据量是否超过第一预设阈值;S202, determining whether the amount of data in the data table in the target database exceeds a first preset threshold;
该步骤中,第一预设阈值为一个预先设置的阈值,在本公开的一个实施例中,第一预设阈值还可以是目标数据库中数据表的单表最大数据量乘以第一预设比例的值,比如数据表的单表最大数据量为100万条数据,第一预设比例为90%,则第一预设阈值为90万条数据,此条件下,判断目标数据库中数据表的数据量是否超过90万条数据。其中,该第一预设比例可以根据数据库扩容需求自由设置,在此不做具体限定。In this step, the first preset threshold is a preset threshold. In one embodiment of the present disclosure, the first preset threshold may also be the value of the maximum data volume of a single table in the data table of the target database multiplied by the first preset ratio. For example, if the maximum data volume of a single table in the data table is 1 million data items, and the first preset ratio is 90%, then the first preset threshold is 900,000 data items. Under this condition, it is determined whether the data volume of the data table in the target database exceeds 900,000 data items. The first preset ratio can be freely set according to the database expansion requirements, and is not specifically limited here.
S204,若数据表的数据量超过第一预设阈值,则对目标数据库进行扩容。S204: If the data volume of the data table exceeds a first preset threshold, the target database is expanded.
该步骤中,如上述在设置第一预设阈值为90万条的情况下,判断判断目标数据库中数据表的数据量是否超过90万条数据,如果数据表的数据量超过90万条数据,则需要对目标数据库进行扩容;如果数据表的数据量未超过90万条数据,则不对目标数据库进行扩容。In this step, as mentioned above, when the first preset threshold is set to 900,000, it is determined whether the amount of data in the data table in the target database exceeds 900,000 data. If the amount of data in the data table exceeds 900,000 data, the target database needs to be expanded; if the amount of data in the data table does not exceed 900,000 data, the target database does not need to be expanded.
本公开通过监控目标数据库中数据表的数据量,在数据表的数据量超过第一预设阈值的情况下,对目标数据库进行扩容,提高了数据库自动扩容的效率。The present disclosure monitors the data volume of a data table in a target database, and when the data volume of the data table exceeds a first preset threshold, expands the target database, thereby improving the efficiency of automatic expansion of the database.
在本公开的一个实施例中,如果数据表的数据量未超过第一预设阈值,可以继续判断请求响应时长是否满足条件,参见图3所示的又一种数据库扩容方法的流程图,具体可以包括:In one embodiment of the present disclosure, if the amount of data in the data table does not exceed the first preset threshold, it is possible to continue to determine whether the request response time meets the condition. Referring to the flowchart of another database expansion method shown in FIG. 3 , it may specifically include:
S302,若数据表的数据量未超过第一预设阈值,则判断请求响应时长是否超过第二预设阈值;S302, if the amount of data in the data table does not exceed the first preset threshold, determine whether the request response time exceeds the second preset threshold;
该步骤中,第二预设阈值为一个预先设置的阈值,在本公开的一个实施例中,第二预设阈值还可以是目标数据库处理请求的最大响应时长乘以第二预设比例的值,比如目标数据库处理请求的最大响应时长为10分钟,第二预设比例设置为90%,则第二预设阈值为9分钟,此条件下,如果数据表的数据量未超过第一预设阈值,则继续判断请求响应时长是否超过9分钟。其中,该第二预设比例可以根据数据库扩容需求自由设置,在此不做具体限定。In this step, the second preset threshold is a preset threshold. In one embodiment of the present disclosure, the second preset threshold can also be the maximum response time of the target database processing request multiplied by the second preset ratio. For example, if the maximum response time of the target database processing request is 10 minutes and the second preset ratio is set to 90%, the second preset threshold is 9 minutes. Under this condition, if the data volume of the data table does not exceed the first preset threshold, it is continued to determine whether the request response time exceeds 9 minutes. Among them, the second preset ratio can be freely set according to the database expansion requirements, and is not specifically limited here.
S304,若请求响应时长超过第二预设阈值,则对目标数据库进行扩容。S304: If the request response time exceeds a second preset threshold, the target database is expanded.
该步骤中,如上述在设置第二预设阈值为9分钟的情况下,判断请求响应时长是否超过9分钟,如果请求响应时长超过9分钟,则需要对目标数据库进行扩容。In this step, when the second preset threshold is set to 9 minutes as described above, it is determined whether the request response time exceeds 9 minutes. If the request response time exceeds 9 minutes, the target database needs to be expanded.
本公开通过监控目标数据库中请求响应时长,在请求响应时长超过第二预设阈值的情况下,对目标数据库进行扩容,提高了数据库自动扩容的效率。The present disclosure monitors the request response time in the target database, and expands the target database when the request response time exceeds a second preset threshold, thereby improving the efficiency of automatic database expansion.
在本公开的一个实施例中,在上述判断请求响应时长为超过第二预设阈值之后,可以继续判断并发请求数量是否满足条件,参见图4公开的又一种数据库扩容方法的流程图,具体可以包括:In one embodiment of the present disclosure, after the above-mentioned determination that the request response time exceeds the second preset threshold, it is possible to continue to determine whether the number of concurrent requests meets the condition. Referring to the flowchart of another database expansion method disclosed in FIG. 4 , it may specifically include:
S402,若请求响应时长未超过第二预设阈值,则判断并发请求数量是否超过第三预设阈值;S402, if the request response time does not exceed the second preset threshold, determine whether the number of concurrent requests exceeds the third preset threshold;
该步骤中,第三预设阈值为一个预先设置的阈值,在本公开的一个实施例中,第三预设阈值还可以是目标数据库可支持处理的最大并发请求数量乘以第三预设比例的值,比如目标数据库可支持处理的最大并发请求数量为50,设置的第三预设比例值为80%,则第三预设阈值为40,在此条件下,如果请求响应时长未超过第二预设阈值,需要继续判断并发请求数量是否超过40。其中,该第三预设比例可以根据数据库扩容需求自由设置,在此不做具体限定。In this step, the third preset threshold is a preset threshold. In one embodiment of the present disclosure, the third preset threshold may also be the value of the maximum number of concurrent requests that the target database can support processing multiplied by the third preset ratio. For example, if the maximum number of concurrent requests that the target database can support processing is 50 and the third preset ratio is set to 80%, the third preset threshold is 40. Under this condition, if the request response time does not exceed the second preset threshold, it is necessary to continue to determine whether the number of concurrent requests exceeds 40. Among them, the third preset ratio can be freely set according to the database expansion requirements, and is not specifically limited here.
S404,若并发请求数量超过第三预设阈值,则对目标数据库进行扩容。S404: If the number of concurrent requests exceeds a third preset threshold, the target database is expanded.
该步骤中,如上述在设置了第三预设阈值为40的情况下,判断并发请求数量是否超过40,如果并发请求数量超过40,则需要对目标数据库进行扩容。In this step, when the third preset threshold is set to 40 as described above, it is determined whether the number of concurrent requests exceeds 40. If the number of concurrent requests exceeds 40, the target database needs to be expanded.
本公开通过监控目标数据库中并发请求数量,在并发请求数量超过第三预设阈值的情况下,对目标数据库进行扩容,提高了数据库自动扩容的效率。The present disclosure monitors the number of concurrent requests in a target database, and when the number of concurrent requests exceeds a third preset threshold, expands the target database, thereby improving the efficiency of automatic expansion of the database.
在本公开的一个实施例中,上述获取目标数据库的数据链路信息可以参照图5中公开的步骤,参见图5所示的又一种数据库扩容方法的流程图,具体可以包括:In one embodiment of the present disclosure, the data link information of the target database may be obtained by referring to the steps disclosed in FIG. 5 , and referring to the flowchart of another database expansion method shown in FIG. 5 , which may specifically include:
S502,在调用链监控系统客户端的监控消息的SQL节点中加入如下数据字段:数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量的字段;S502, adding the following data fields to the SQL node of the monitoring message of the call chain monitoring system client: fields for database name, data table name, data volume of the data table, request start time, response end time and number of concurrent requests;
该步骤中,数据字段用于获取目标数据库中对应的数据,如数据库名的字段用于获取目标数据库的数据库名;数据表名的字段用于获取目标数据库中数据表名;数据表的数据量字段用于获取目标数据库中数据表的数据量;这里,根据实际的需求也可以添加其他字段获取目标数据库的其他数据,在此,便不一一详列了。可以在监控消息的SQL节点中加入请求开始时间、响应结束时间,在节点的Event、Metric字段中分别加入库名、表名、方法名、数据量和并行请求次数计算请求等,以获取目标数据库的数据库信息。In this step, the data field is used to obtain the corresponding data in the target database, such as the database name field is used to obtain the database name of the target database; the data table name field is used to obtain the data table name of the target database; the data volume field of the data table is used to obtain the data volume of the data table in the target database; here, other fields can also be added according to actual needs to obtain other data of the target database, which will not be listed in detail here. You can add the request start time and response end time to the SQL node of the monitoring message, and add the library name, table name, method name, data volume and parallel request count calculation request to the Event and Metric fields of the node to obtain the database information of the target database.
S504,利用监控消息采集目标数据库的数据;S504, using monitoring messages to collect data from the target database;
该步骤中,调用链监控系统客户端可以利用异步发送监控消息,采集数据库的数据库信息。In this step, the call chain monitoring system client can use asynchronous sending of monitoring messages to collect database information of the database.
S506,汇总监控消息采集到的数据,得到数据链路信息,其中,数据链路信息包含目标数据库的数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量。S506, summarizing the data collected by the monitoring message to obtain data link information, wherein the data link information includes the database name of the target database, the data table name, the data volume of the data table, the request start time, the response end time and the number of concurrent requests.
在本公开的一个实施例中,根据解析结果确定是否对目标数据库进行扩容,在确定对目标数据库进行扩容的情况下,还可以包括图6中公开的步骤,参见图6所示的又一种数据库扩容方法的流程图,具体可以包括:In one embodiment of the present disclosure, whether to expand the target database is determined according to the analysis result. When it is determined that the target database is to be expanded, the steps disclosed in FIG. 6 may be further included. Referring to the flowchart of another database expansion method shown in FIG. 6, the following may be specifically included:
S602,在确定对目标数据库进行扩容的情况下,根据数据库名和数据表名,生成扩容请求;S602, when it is determined that the target database needs to be expanded, generating an expansion request according to the database name and the data table name;
该步骤中,调用链监控系统服务端在根据解析结果确定对目标数据库进行扩容的情况下,可以根据数据链路信息中目标数据库的数据库名和数据表名,生成扩容请求,该扩容请求用于目标数据库的扩容。In this step, when the call chain monitoring system server determines to expand the target database based on the analysis result, it can generate an expansion request based on the database name and data table name of the target database in the data link information, and the expansion request is used to expand the target database.
S604,将扩容请求发送至数据库管理模块,以使数据库管理模块根据扩容请求对目标数据库进行扩容。S604: Send the capacity expansion request to the database management module, so that the database management module expands the target database according to the capacity expansion request.
该步骤中,调用链监控系统服务端将扩容请求发送至数据库管理模块,数据库管理模块接收扩容请求,根据扩容请求中包含的数据库名和数据表名获取对应的分库分表规则,再根据数据库名、数据表名、分库分表规则获取对应的脚本,该脚本用于根据分库分表规则对目标数据库进行分库分表,最后,执行该脚本完成对目标数据库的分库分表。In this step, the call chain monitoring system server sends the expansion request to the database management module. The database management module receives the expansion request, obtains the corresponding library and table sharding rules based on the database name and data table name contained in the expansion request, and then obtains the corresponding script based on the database name, data table name, and library and table sharding rules. The script is used to shard the target database according to the library and table sharding rules. Finally, the script is executed to complete the sharding of the target database.
本公开在确定对目标数据库扩容的情况下,调用链监控系统服务端基于目标数据库的数据库名和数据表名生成扩容请求,并将扩容请求发送至数据库管理模块,数据库管理模块基于扩容请求,获取对应的分库分表规则和执行该分库分表规则的脚本,通过运行该脚本完成对目标数据库的扩容,实现了数据库的自动分库分表,提高了数据库扩容的效率。When determining to expand the capacity of the target database, the present invention calls the chain monitoring system server to generate an expansion request based on the database name and data table name of the target database, and sends the expansion request to the database management module. The database management module obtains the corresponding library and table sharding rules and the script for executing the library and table sharding rules based on the expansion request, completes the expansion of the target database by running the script, realizes automatic library and table sharding of the database, and improves the efficiency of database expansion.
在本公开的一个实施例中,本公开还提供了再一种数据库扩容方法,参见图7所示的再一种数据库扩容方法的流程图,具体可以包括:In one embodiment of the present disclosure, the present disclosure further provides another database expansion method. Referring to the flowchart of another database expansion method shown in FIG. 7 , the method may specifically include:
S702,接收调用链监控系统服务端发送的扩容请求,其中,调用链监控系统服务端获取目标数据库的数据链路信息,对数据链路信息进行解析,在根据解析结果确定对目标数据库进行扩容的情况下,生成扩容请求,解析结果中包含如下至少之一:目标数据库中数据表的数据量、请求响应时长和并发请求数量;S702, receiving a capacity expansion request sent by a call chain monitoring system server, wherein the call chain monitoring system server obtains data link information of a target database, parses the data link information, and generates a capacity expansion request when it is determined according to the parsing result that the target database needs to be expanded, wherein the parsing result includes at least one of the following: the amount of data in a data table in the target database, request response time, and the number of concurrent requests;
S704,基于扩容请求对目标数据库进行扩容。S704: Expand the target database based on the expansion request.
该步骤中,数据库管理模块接收扩容请求,根据扩容请求中包含的数据库名和数据表名获取对应的分库分表规则,再根据数据库名、数据表名、分库分表规则获取对应的脚本,该脚本用于根据分库分表规则对目标数据库进行分库分表,最后,执行该脚本完成对目标数据库的分库分表。In this step, the database management module receives the expansion request, obtains the corresponding library and table sharding rules according to the database name and data table name contained in the expansion request, and then obtains the corresponding script according to the database name, data table name, and library and table sharding rules. The script is used to shard the target database according to the library and table sharding rules. Finally, the script is executed to complete the sharding of the target database.
在本公开的一个实施例中,上述基于扩容请求对目标数据库进行扩容可以参照图8中公开的步骤,参见图8所示再一种数据库扩容方法的流程图,具体可以包括:In one embodiment of the present disclosure, the above-mentioned expansion of the target database based on the expansion request can refer to the steps disclosed in FIG. 8 , and refer to the flowchart of another database expansion method shown in FIG. 8 , which can specifically include:
S802,根据扩容请求中包含的数据库名和数据表名,获取待执行的分库分表规则;S802, obtaining the database and table sharding rules to be executed according to the database name and data table name included in the capacity expansion request;
S804,根据数据库名、数据表名和待执行的分库分表规则,调用相应的新建库表脚本,其中,新建库表脚本用于根据待执行的分库分表规则对目标数据库进行分库分表;S804, calling the corresponding new database and table script according to the database name, the data table name and the database and table sharding rule to be executed, wherein the new database and table script is used to shard the target database according to the database and table sharding rule to be executed;
S806,执行新建库表脚本。S806, execute the new library table script.
在本公开的一个实施例中,本公开还提供了另一种数据库扩容方法,参见图9所示的另一种数据库扩容方法的示意图,该方法包括:In one embodiment of the present disclosure, the present disclosure further provides another database expansion method. Referring to the schematic diagram of another database expansion method shown in FIG. 9 , the method includes:
调用链监控系统客户端通过异步发送监控消息对多个应用进行数据采集,得到采集的数据链路信息,其中,多个应用包括应用A、应用B和应用C等应用,应用A、应用B或应用C是各种微服务;The call chain monitoring system client collects data from multiple applications by asynchronously sending monitoring messages to obtain collected data link information, wherein the multiple applications include application A, application B, and application C, and application A, application B, or application C are various microservices;
调用链监控系统客户端将采集的数据链路信息发送至调用链监控系统服务端,调用链监控系统服务端对数据链路信息进行解析,得到解析结果,并基于解析结果判断是否对数据库进行扩容;The call chain monitoring system client sends the collected data link information to the call chain monitoring system server, which parses the data link information to obtain the parsing result and determines whether to expand the database based on the parsing result;
在确定对数据库进行扩容的情况下,调用链监控系统服务端生成扩容请求,并将扩容请求发送至数据库管理模块,以通知数据库管理模块对数据库进行扩容,数据库管理模块基于扩容请求对数据库进行扩容,进而完成数据库的自动扩容。When it is determined to expand the database, the call chain monitoring system server generates an expansion request and sends the expansion request to the database management module to notify the database management module to expand the database. The database management module expands the database based on the expansion request, thereby completing the automatic expansion of the database.
本公开的另一种数据库扩容方法与上述数据库扩容方法解决的技术问题相同,同样地,实现的技术效果也相同,在此便不再一一赘述了。Another database expansion method disclosed in the present invention solves the same technical problem as the above-mentioned database expansion method, and similarly, achieves the same technical effect, which will not be described in detail here.
在本公开的一个实施例中,可以参照图10构建监控消息,利用监控消息采集数据库的数据库信息,参见图10所示的另一种数据库扩容方法的示意图,可以在线程开始后,创建消息树、创建call节点、加入SQL节点和加入Cache节点等,以完成对消息的构建,其中,可以在SQL节点中加入数据库名、数据表名、方法名、数据量、Metric等字段。消息构建结束后,获取通过监控消息采集的数据库信息,并将数据库信息发送至服务端进行解析。In one embodiment of the present disclosure, a monitoring message can be constructed with reference to FIG. 10, and database information of a database can be collected by using the monitoring message. Referring to the schematic diagram of another database expansion method shown in FIG. 10, after the thread starts, a message tree can be created, a call node can be created, an SQL node can be added, and a Cache node can be added to complete the construction of the message, wherein fields such as database name, data table name, method name, data volume, and Metric can be added to the SQL node. After the message construction is completed, the database information collected by the monitoring message is obtained, and the database information is sent to the server for parsing.
在本公开的一个实施例中,可以参照图11所示的方式对采集到的数据链路信息进行分析,参见图11所示的另一中数据库扩容方法的示意图,可以包括如下步骤:In one embodiment of the present disclosure, the collected data link information may be analyzed in a manner as shown in FIG. 11 . Referring to the schematic diagram of another database expansion method shown in FIG. 11 , the following steps may be included:
S1101:调用链监控系统服务端获取监控消息,从监控消息中得到数据链路信息;S1101: calling the chain monitoring system server to obtain monitoring messages, and obtaining data link information from the monitoring messages;
S1102:判断数据链路信息中的请求方法是否为新增,若是,执行S1103,否则,执行S1104;S1102: Determine whether the request method in the data link information is newly added, if so, execute S1103, otherwise, execute S1104;
S1103:判断数据表的数据量是否大于第一阈值,若是,执行步骤S1108,否则,执行S1104;S1103: Determine whether the amount of data in the data table is greater than a first threshold, if so, execute step S1108, otherwise, execute S1104;
S1104:计算请求响应时长,继续执行S1105;S1104: Calculate the request response time and continue to execute S1105;
S1105:判断请求响应时长是否大于第二阈值,若是,执行S1108,否则,执行S1106;S1105: Determine whether the request response time is greater than a second threshold, if so, execute S1108, otherwise, execute S1106;
S1106:计算并发请求数量,继续执行S1107;S1106: Calculate the number of concurrent requests and continue to execute S1107;
S1107:判断并发请求数量是否大于第三阈值,若是执行S1108;S1107: Determine whether the number of concurrent requests is greater than a third threshold, if so, execute S1108;
S1108:将数据库名和数据表名发送给数据库管理模块,通知数据库管理模块进行扩容。S1108: Send the database name and data table name to the database management module, and notify the database management module to expand the capacity.
基于同一发明构思,本公开实施例中还提供了一种数据库扩容装置,如下面的实施例。由于该装置实施例解决问题的原理与上述方法实施例相似,因此该装置实施例的实施可以参见上述方法实施例的实施,重复之处不再赘述。Based on the same inventive concept, the present disclosure also provides a database expansion device, such as the following embodiment. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
图12示出本公开实施例中一种数据库扩容装置示意图,如图12所示,该装置包括:FIG12 shows a schematic diagram of a database expansion device in an embodiment of the present disclosure. As shown in FIG12 , the device includes:
数据链路信息获取模块1210,用于获取目标数据库的数据链路信息;The data link information acquisition module 1210 is used to acquire the data link information of the target database;
数据链路信息解析模块1220,用于对数据链路信息进行解析;The data link information parsing module 1220 is used to parse the data link information;
扩容结果确定模块1230,用于根据解析结果确定是否对目标数据库进行扩容,其中,解析结果中包含如下至少之一:目标数据库中数据表的数据量、请求响应时长和并发请求数量。The expansion result determination module 1230 is used to determine whether to expand the target database according to the analysis result, wherein the analysis result includes at least one of the following: the data volume of the data table in the target database, the request response time and the number of concurrent requests.
在本公开的一个实施例中,上述扩容结果确定模块1230还用于判断目标数据库中数据表的数据量是否超过第一预设阈值;若数据表的数据量超过第一预设阈值,则对目标数据库进行扩容。In one embodiment of the present disclosure, the above-mentioned expansion result determination module 1230 is also used to determine whether the data volume of the data table in the target database exceeds the first preset threshold; if the data volume of the data table exceeds the first preset threshold, the target database is expanded.
在本公开的一个实施例中,上述扩容结果确定模块1230还用于若数据表的数据量未超过第一预设阈值,则判断请求响应时长是否超过第二预设阈值;若请求响应时长超过第二预设阈值,则对目标数据库进行扩容。In one embodiment of the present disclosure, the above-mentioned expansion result determination module 1230 is also used to determine whether the request response time exceeds the second preset threshold if the data volume of the data table does not exceed the first preset threshold; if the request response time exceeds the second preset threshold, the target database is expanded.
在本公开的一个实施例中,上述扩容结果确定模块1230还用于若请求响应时长未超过第二预设阈值,则判断并发请求数量是否超过第三预设阈值;若并发请求数量超过第三预设阈值,则对目标数据库进行扩容。In one embodiment of the present disclosure, the above-mentioned expansion result determination module 1230 is also used to determine whether the number of concurrent requests exceeds a third preset threshold if the request response time does not exceed the second preset threshold; if the number of concurrent requests exceeds the third preset threshold, the target database is expanded.
在本公开的一个实施例中,上述数据链路信息获取模块1210还用于在调用链监控系统客户端的监控消息的SQL节点中加入如下数据字段:数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量的字段;利用监控消息采集目标数据库的数据;汇总监控消息采集到的数据,得到数据链路信息,其中,数据链路信息包含目标数据库的数据库名、数据表名、数据表的数据量、请求开始时间、应答结束时间和并发请求数量。In one embodiment of the present disclosure, the above-mentioned data link information acquisition module 1210 is also used to add the following data fields in the SQL node of the monitoring message of the call chain monitoring system client: fields for database name, data table name, data volume of the data table, request start time, response end time and number of concurrent requests; use monitoring messages to collect data of the target database; summarize the data collected by the monitoring messages to obtain data link information, wherein the data link information includes the database name, data table name, data volume of the data table, request start time, response end time and number of concurrent requests of the target database.
在本公开的一个实施例中,上述装置还包括请求生成模块,该请求生成模块用于在确定对目标数据库进行扩容的情况下,根据数据库名和数据表名,生成扩容请求;将扩容请求发送至数据库管理模块,以使数据库管理模块根据扩容请求对目标数据库进行扩容。In one embodiment of the present disclosure, the above-mentioned device also includes a request generation module, which is used to generate an expansion request according to the database name and the data table name when it is determined that the target database is to be expanded; and send the expansion request to the database management module so that the database management module expands the target database according to the expansion request.
图13示出本公开实施例中另一种数据库扩容装置示意图,如图13所示,该装置包括:FIG13 shows a schematic diagram of another database expansion device in an embodiment of the present disclosure. As shown in FIG13 , the device includes:
扩容请求接收模块1310,用于接收调用链监控系统服务端发送的扩容请求,其中,调用链监控系统服务端获取目标数据库的数据链路信息,对数据链路信息进行解析,在根据解析结果确定对目标数据库进行扩容的情况下,生成扩容请求,解析结果中包含如下至少之一:目标数据库中数据表的数据量、请求响应时长和并发请求数量;The capacity expansion request receiving module 1310 is used to receive the capacity expansion request sent by the call chain monitoring system server, wherein the call chain monitoring system server obtains the data link information of the target database, parses the data link information, and generates the capacity expansion request when it is determined to expand the target database according to the parsing result, and the parsing result includes at least one of the following: the data volume of the data table in the target database, the request response time and the number of concurrent requests;
扩容模块1320,用于基于扩容请求对目标数据库进行扩容。The capacity expansion module 1320 is used to expand the target database based on the capacity expansion request.
基于同一发明构思,本公开实施例中还提供了一种数据库扩容系统,如下面的实施例。由于该系统实施例解决问题的原理与上述方法实施例相似,因此该系统实施例的实施可以参见上述方法实施例的实施,重复之处不再赘述。Based on the same inventive concept, the present disclosure also provides a database expansion system, such as the following embodiment. Since the principle of solving the problem in the system embodiment is similar to that in the above method embodiment, the implementation of the system embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
图14示出本公开实施例中一种数据库扩容系统示意图,如图14所示,该系统包括:FIG14 shows a schematic diagram of a database expansion system in an embodiment of the present disclosure. As shown in FIG14 , the system includes:
调用链监控系统客户端1410,用于采集目标数据库的数据链路信息,将数据链路信息发送至调用链监控系统服务端1420;The call chain monitoring system client 1410 is used to collect data link information of the target database and send the data link information to the call chain monitoring system server 1420;
调用链监控系统服务端1420,用于接收调用链监控系统客户端1410发送的数据链路信息,对数据链路信息进行解析;根据解析结果确定是否对目标数据库进行扩容,其中,解析结果中包含如下至少之一:目标数据库中数据表的数据量、请求响应时长和并发请求数量;The call chain monitoring system server 1420 is used to receive the data link information sent by the call chain monitoring system client 1410, parse the data link information; determine whether to expand the target database according to the parsing result, wherein the parsing result includes at least one of the following: the amount of data in the data table in the target database, the request response time, and the number of concurrent requests;
数据库管理模块1430,用于对目标数据库进行扩容。The database management module 1430 is used to expand the capacity of the target database.
上述调用链监控系统服务端1420,还用于在确定对目标数据库进行扩容的情况下,根据数据库名和数据表名,生成扩容请求;将扩容请求发送至数据库管理模块,以使数据库管理模块根据扩容请求对目标数据库进行扩容。The call chain monitoring system server 1420 is also used to generate an expansion request based on the database name and data table name when it is determined that the target database needs to be expanded; and send the expansion request to the database management module so that the database management module expands the target database according to the expansion request.
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
下面参照图15来描述根据本公开的这种实施方式的电子设备1500。图15显示的电子设备1500仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。The electronic device 1500 according to this embodiment of the present disclosure is described below with reference to Fig. 15. The electronic device 1500 shown in Fig. 15 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.
如图15所示,电子设备1500以通用计算设备的形式表现。电子设备1500的组件可以包括但不限于:上述至少一个处理单元1510、上述至少一个存储单元1520、连接不同系统组件(包括存储单元1520和处理单元1510)的总线1530。As shown in Fig. 15, the electronic device 1500 is presented in the form of a general-purpose computing device. The components of the electronic device 1500 may include, but are not limited to: the at least one processing unit 1510, the at least one storage unit 1520, and a bus 1530 connecting different system components (including the storage unit 1520 and the processing unit 1510).
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元1510执行,使得所述处理单元1510执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。例如,所述处理单元1510可以执行上述方法实施例的如下步骤:获取目标数据库的数据链路信息;对数据链路信息进行解析;根据解析结果确定是否对目标数据库进行扩容,其中,解析结果中包含如下至少之一:目标数据库中数据表的数据量、请求响应时长和并发请求数量。The storage unit stores a program code, and the program code can be executed by the processing unit 1510, so that the processing unit 1510 executes the steps described in the "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 1510 can execute the following steps of the above method embodiment: obtaining data link information of the target database; parsing the data link information; determining whether to expand the target database according to the parsing result, wherein the parsing result includes at least one of the following: the amount of data in the data table of the target database, the request response time, and the number of concurrent requests.
存储单元1520可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)15201和/或高速缓存存储单元15202,还可以进一步包括只读存储单元(ROM)15203。The storage unit 1520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 15201 and/or a cache storage unit 15202 , and may further include a read-only storage unit (ROM) 15203 .
存储单元1520还可以包括具有一组(至少一个)程序模块15205的程序/实用工具15204,这样的程序模块15205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 1520 may also include a program/utility 15204 having a set (at least one) of program modules 15205, such program modules 15205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
总线1530可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。Bus 1530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
电子设备1500也可以与一个或多个外部设备1540(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备1500交互的设备通信,和/或与使得该电子设备1500能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口1550进行。并且,电子设备1500还可以通过网络适配器1560与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器1560通过总线1530与电子设备1500的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备1500使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The electronic device 1500 may also communicate with one or more external devices 1540 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1500, and/or communicate with any device that enables the electronic device 1500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input/output (I/O) interface 1550. Furthermore, the electronic device 1500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) via a network adapter 1560. As shown, the network adapter 1560 communicates with other modules of the electronic device 1500 via a bus 1530. It should be understood that, although not shown in the figure, other hardware and/or software modules may be used in conjunction with the electronic device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质可以是可读信号介质或者可读存储介质。其上存储有能够实现本公开上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.
本公开中的计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
在本公开中,计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
可选地,计算机可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
在具体实施时,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
此外,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and/or one step may be decomposed into multiple steps, etc.
通过以上实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由所附的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210102894.XA CN114443619B (en) | 2022-01-27 | 2022-01-27 | Database expansion method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210102894.XA CN114443619B (en) | 2022-01-27 | 2022-01-27 | Database expansion method, device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114443619A CN114443619A (en) | 2022-05-06 |
CN114443619B true CN114443619B (en) | 2024-11-05 |
Family
ID=81369695
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210102894.XA Active CN114443619B (en) | 2022-01-27 | 2022-01-27 | Database expansion method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114443619B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114925688A (en) * | 2022-05-18 | 2022-08-19 | 中国平安财产保险股份有限公司 | Data processing method and device based on artificial intelligence, electronic equipment and medium |
CN115225506B (en) * | 2022-06-02 | 2025-07-15 | 圆壹智慧科技(宁波)有限公司 | Data processing method, system, electronic device and storage medium based on cloud platform |
CN115617517B (en) * | 2022-10-12 | 2023-11-10 | 中航信移动科技有限公司 | Data processing system for applying pod control |
CN115562889B (en) * | 2022-10-12 | 2024-01-23 | 中航信移动科技有限公司 | Application control method, electronic equipment and storage medium |
CN116166639B (en) * | 2023-03-03 | 2024-04-26 | 西安快鱼科技有限公司 | Big data processing method and system based on artificial intelligence |
CN117331908B (en) * | 2023-08-23 | 2024-05-14 | 上海麦杰科技股份有限公司广州分公司 | Online capacity expansion method and system device for real-time database |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105955662A (en) * | 2016-04-22 | 2016-09-21 | 浪潮(北京)电子信息产业有限公司 | Method and system for expansion of K-DB data table space |
CN110858194A (en) * | 2018-08-16 | 2020-03-03 | 北京京东尚科信息技术有限公司 | Method and device for expanding database |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6922685B2 (en) * | 2000-05-22 | 2005-07-26 | Mci, Inc. | Method and system for managing partitioned data resources |
CN110532243A (en) * | 2019-08-20 | 2019-12-03 | 上海艾融软件股份有限公司 | Data processing method, device and electronic equipment |
-
2022
- 2022-01-27 CN CN202210102894.XA patent/CN114443619B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105955662A (en) * | 2016-04-22 | 2016-09-21 | 浪潮(北京)电子信息产业有限公司 | Method and system for expansion of K-DB data table space |
CN110858194A (en) * | 2018-08-16 | 2020-03-03 | 北京京东尚科信息技术有限公司 | Method and device for expanding database |
Also Published As
Publication number | Publication date |
---|---|
CN114443619A (en) | 2022-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114443619B (en) | Database expansion method, device, electronic equipment and storage medium | |
CN108228628B (en) | Wide table generation method and device in structured query language database | |
CN112732663A (en) | Log information processing method and device | |
CN111752916B (en) | Data acquisition method and device, computer readable storage medium and electronic equipment | |
CN108959294B (en) | Method and device for accessing search engine | |
CN114448972A (en) | Distributed storage log compression downloading method, system, terminal and storage medium | |
CN114244821B (en) | Data processing method, device, equipment, electronic equipment and storage medium | |
CN114489594B (en) | A command parsing processing method and device | |
CN110928898A (en) | Data acquisition method, data acquisition device, storage medium and electronic equipment | |
CN114546780A (en) | Data monitoring method, device, equipment, system and storage medium | |
CN112084210A (en) | Data processing method and device, electronic equipment and storage medium | |
CN118839033A (en) | Key resource identification method and device, storage medium and electronic equipment | |
CN113132480B (en) | Data transmission method, device and system | |
CN116340363A (en) | A data storage and loading method and related device based on relational database | |
CN113032277B (en) | Data query monitoring method, device, electronic device and storage medium | |
WO2024016594A1 (en) | Pseudo column implementation method and apparatus, electronic device, and storage medium | |
CN114416414B (en) | Fault information locating method, device, equipment and storage medium | |
CN114090514A (en) | Log retrieval method and device for distributed system | |
CN113760572A (en) | Message processing method and device | |
CN113778847A (en) | Test report generation method and device | |
CN113297002B (en) | Database working mode switching method and device | |
CN117632546B (en) | Message passing method, device, equipment and storage medium in test environment | |
CN113377371B (en) | Multi-scene configuration method, system, equipment and medium | |
CN118972363A (en) | An Internet of Things cloud server, message push method and device | |
CN118626558A (en) | Heterogeneous data synchronization method and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |