Database management method, apparatus, device, medium, and program product
By automatically identifying the target database and enabling metadata sharing, the problem of users connecting to the database themselves is solved, improving operational convenience and resource utilization, and promoting business information sharing.
Patent Information
- Application Number
- CN202310191909.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-02-27
AI Technical Summary
In business analysis scenarios involving multiple database clusters, users need to determine the database connection themselves, which increases the difficulty of operation and hinders communication and sharing of analysis tasks within business departments.
By receiving the type of access request, the target database is automatically determined from the preset database set. Database resources are allocated using the least connection number algorithm and business access volume, thereby realizing metadata sharing and automatic traffic distribution of the database set.
It improves the ease of user operation and the flexibility of database management, and promotes the sharing of business information and the efficient use of database resources.
Smart Images

Figure CN116414897B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of financial technology in big data, and particularly relates to a database management method and device, equipment, computer storage medium and computer program product. BACKGROUND
[0002] In a business analysis scenario, a database plays a very important role. Business personnel make query analysis work through an analysis tool such as a statistical analysis system (SAS), and the database needs to bear a large amount of computing work and business access work. With the popularization and deepening development of digital operation mode, the analysis application scenario of the business personnel is more abundant, and a single database cluster cannot meet the daily analysis needs of the business, especially during a business peak period, such as the beginning of a month or the end of a year, and the database resource shortage is increasingly obvious.
[0003] In order to meet the business analysis needs, a multi-database cluster emerges as the times require. In the business analysis scenario of the multi-database cluster, the SAS needs to be configured to connect multiple databases, and the data sources are set to be distinguished internally, and a specific user is set to be able to access only one database. The user needs to determine the connected database by himself / herself when performing business analysis. In this way, not only the difficulty of the user operation is increased, but also the communication and sharing of the analysis work within the business department are not conducive. SUMMARY
[0004] The embodiments of the present application provide a database management method, device, equipment, computer storage medium and computer program product, which can not only improve the flexibility of database management and the convenience of user operation in a business analysis scenario, but also facilitate the sharing of business information in the business analysis scenario.
[0005] In a first aspect, the embodiments of the present application provide a database management method, comprising:
[0006] receiving an access request sent by a user equipment, the access request comprising a type of the access request;
[0007] determining a target database from a preset database set according to the type of the access request, the database set comprising at least one computing cluster database and at least one business access cluster database;
[0008] calling metadata of the database set through the target database to perform an operation corresponding to the access request.
[0009] In an optional implementation, the type of the access request comprises a business access request and a data processing request.
[0010] According to the type of the access request, a target database is determined from a preset database set, including:
[0011] In a case where the type of the access request is a business access request, the target database is determined from at least one business access cluster database by using a minimum connection number algorithm.
[0012] In an optional implementation, according to the type of the access request, a target database is determined from a preset database set, including:
[0013] In a case where the type of the access request is a data processing request, at least one candidate database is determined from the database set according to a business access amount of the database set.
[0014] The target database is determined from the candidate database by using a minimum connection number algorithm.
[0015] In an optional implementation, at least one candidate database is determined from the database set according to a business access amount of the database set, including:
[0016] In a case where the business access amount of the database set is greater than or equal to a preset business access amount threshold when the access request is received, a computing cluster database in the database set is determined as the candidate database.
[0017] In an optional implementation, at least one candidate database is determined from the database set according to a business amount of the database set, including:
[0018] In a case where the business access amount of the database set is less than a preset business access amount threshold when the access request is received, a computing cluster database and a business access cluster database in the database set are determined as the candidate database.
[0019] In an optional implementation, at least one candidate database is determined from the database set according to a business access amount of the database set, including:
[0020] According to a business access amount of the database set in a preset time period, a business access state corresponding to the database set when the access request is received is determined, the preset time period being a time period before the access request is received.
[0021] In a case where the business access state satisfies a preset condition, a computing cluster database and a business access cluster database in the database set are determined as the candidate database, the business access state satisfying the preset condition including: according to the business access amount of the preset time period, it is predicted that the business access amount of the database set when the access request is received is less than a preset business access amount threshold.
[0022] In a second aspect, an embodiment of the present application provides a database management apparatus, including:
[0023] receive a request for access sent by a user device, the request for access comprising a type of the request for access;
[0024] determine a target database from a preset database set according to the type of the request for access, the database set comprising at least one computing cluster database and at least one business access cluster database;
[0025] invoke metadata of the database set through the target database to perform an operation corresponding to the request for access.
[0026] In a third aspect, an electronic device is provided, and the device comprises a processor and a memory storing computer program instructions;
[0027] The processor, when executing the computer program instructions, implements the database management method according to any of the optional implementation manners of the first aspect of the present application.
[0028] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions, and the computer program instructions, when executed by a processor, implement the database management method according to any of the optional implementation manners of the first aspect of the present application.
[0029] In a fifth aspect, a computer program product is provided, and instructions in the computer program product are executed by a processor of an electronic device, so that the electronic device executes the database management method according to any of the optional implementation manners of the first aspect of the present application.
[0030] The database management method, device, electronic device, computer storage medium and computer program product provided in the embodiments of the present application can receive a request for access sent by a user device, and determine a target database from a database set according to the type of the request for access. In this way, the database accessed by the user device can be determined based on the type of the request for access, so that the user does not need to determine the connected database by himself / herself, which is beneficial to improving the convenience of user operation and the flexibility of database management. Then, the metadata of the database set is invoked through the target database to perform an operation corresponding to the request for access. The metadata of the database set can be shared by the databases in the database set and invoked by the databases. In this way, it is not only beneficial to further improving the flexibility of database management, but also beneficial to sharing of business information in a business analysis scenario. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced. Those drawings can help the ordinary skilled in the art to obtain other drawings without any creative effort.
[0032] Figure 1 is a flow diagram of a database management method provided by an embodiment of the present application;
[0033] Figure 2 is a scenario diagram of a database management method provided by another embodiment of the present application;
[0034] Figure 3 is a scenario diagram of a database management method provided by yet another embodiment of the present application;
[0035] Figure 4 is a structural diagram of a database management apparatus provided by still another embodiment of the present application;
[0036] Figure 5 is a structural diagram of a database management device provided by still another embodiment of the present application. DETAILED DESCRIPTION
[0037] The features and exemplary embodiments of various aspects of the present application will be described in detail below, in order to make the purposes, technical solutions and advantages of the present application more clear and apparent, the present application will be further described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0038] It should be noted that, in this document, relational terms such as first and second and the like can only be used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus including a list of elements does not only include those elements, but also includes other elements not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without more limitations, the elements defined by the statement "comprising" do not exclude the presence of additional identical elements in the process, method, article or apparatus including the elements defined by the statement "comprising".
[0039] The acquisition, storage, use, processing and the like of data in the technical solutions of the present application comply with relevant provisions of national laws and regulations.
[0040] As described in the background, in the scenario of business analysis using a multi-database cluster, the user needs to determine the connected database by himself / herself when performing business analysis. In this way, not only the difficulty of user operation is increased, but also the communication and sharing of analysis work within a business department are not conducive.
[0041] Therefore, the inventors have designed a database management method, device, equipment, computer storage medium and computer program product. The database management method, device, equipment, computer storage medium and computer program product can not only improve the flexibility of database management and the convenience of user operation in the business analysis scenario, but also facilitate the sharing of business information in the business analysis scenario.
[0042] The database management method provided by the embodiments of the present application will be described below in combination with the accompanying drawings, specific embodiments and application scenarios. The database management method provided by the embodiments of the present application can be executed by a database management device or a part of the database management device for executing the database management method. In the embodiments of the present application, the database management method executed by the database management device is taken as an example to illustrate the database management method provided by the embodiments of the present application.
[0043] The database management method provided by the embodiments of the present application will be described below in combination with the accompanying drawings, specific embodiments and application scenarios. The database management method provided by the embodiments of the present application can be executed by a database management device or a part of the database management device for executing the database management method. In the embodiments of the present application, the database management method executed by the database management device is taken as an example to illustrate the database management method provided by the embodiments of the present application.
[0044] Figure 1 A flowchart of the database management method provided by an embodiment of the present application is shown. As shown in Figure 1 The database management method can specifically include the following steps S110-S130.
[0045] S110, receiving an access request sent by a user device, the access request including a type of the access request.
[0046] In step S110, the user device can include any user device in a business analysis scenario, for example, can include an Extract-Transform-Load (ETL) server, a business data analysis device, etc. Different types of user devices can send different types of access requests.
[0047] S120, determining a target database from a preset database set according to the type of the access request, the database set including at least one computing cluster database and at least one business access cluster database.
[0048] In step S120, the computing cluster database and the business access database can be Massively Parallel Processing (MPP) databases configured to perform different functions. The databases in the database set can share metadata. As an example, the databases in the database set can call metadata of any other database in the database set to perform a business analysis action corresponding to the access request. The databases sharing metadata can be implemented in any manner, which is not limited in the present application. As an example, the databases sharing metadata can be implemented based on the architecture of the MPP database.
[0049] In step S130, the metadata of the database set is called by the target database to perform an operation corresponding to the access request.
[0050] The database management method of the embodiments of the present application can receive an access request sent by a user device, and determine a target database from a database set according to the type of the access request. In this way, the database accessed by the user device can be determined based on the type of the access request, so that the user does not need to determine the connected database by himself, which is beneficial to improve the convenience of user operation and the flexibility of database management. Then, the metadata of the database set is called by the target database to perform an operation corresponding to the access request. The metadata of the database set can be shared by the databases in the database set and called by the databases. In this way, it is not only beneficial to further improve the flexibility of database management, but also beneficial to the sharing of business information in the business analysis scenario.
[0051] In one embodiment, the type of the access request can include a business access request and a data processing request.
[0052] The target database can be determined from the preset database set according to the type of the access request, which can specifically include:
[0053] In the case where the type of the access request is a business access request, the target database is determined from at least one business access cluster database by a minimum connection number algorithm.
[0054] The databases in the database set can share metadata, and in the case where the access request is a business access request, any database in the business access cluster database can be determined as the target database. In this way, the user does not need to determine the connected database by himself, which is beneficial to improve the convenience of user operation and the flexibility of database management. The target database is determined from the business access cluster database of the database set by the minimum connection number algorithm, which can automatically distribute the access request according to the actual load of the business access cluster database, so as to balance the load of the business access cluster database, and further improve the processing efficiency of the business access cluster database.
[0055] In one embodiment, the target database is determined from the preset database set according to the type of the access request, which can specifically include:
[0056] In the case where the type of the access request is a data processing request, at least one candidate database is determined from the database set according to the business access amount of the database set.
[0057] The target database is determined from the candidate database through the minimum connection number algorithm.
[0058] In the above embodiment, in the case where the type of the access request is a data processing request, the candidate database is determined according to the business access amount of the database set, and the target database is determined from the candidate database through the minimum connection number algorithm. In this way, the candidate database that can perform data processing can be determined according to the business access busy degree of the entire database set, and the data processing task can be automatically distributed to different databases through the minimum connection number algorithm. In this way, it is not only beneficial to balance the load of each database in the database set, but also beneficial to improve the utilization rate of database resources.
[0059] In one embodiment, at least one candidate database is determined from the database set according to the business access amount of the database set, which can specifically include:
[0060] In the case where the business access amount of the database set is greater than or equal to the preset business access amount threshold when the access request is received, the computing cluster database in the database set is determined as the candidate database.
[0061] In the case where the business access amount of the database set is greater than or equal to the preset business access amount threshold, it can be considered that the database set is in a business peak period when the access request is received. Figure 2 An automatic distribution scenario of a database cluster when the database set is in a business peak period is shown. As shown in Figure 2 The database cluster can include a computing cluster database A, a business access cluster database B, and a business access cluster database C. When the database set is in a business peak period, the data processing server can receive a data processing request initiated by an ETL job terminal and forward it to a load balancer, and the SAS server can receive a business access request initiated by a business data analysis terminal and forward it to the load balancer. The load balancer can distribute the data processing request to the computing cluster database A to perform the ETL job through the computing cluster database A, and distribute the business access request to the business access cluster database B and the business access cluster database C according to the minimum connection number algorithm.
[0062] In the above embodiment, during the business peak period, the computing cluster database is taken as the candidate database for the data processing request, and the data processing task is only executed by the computing cluster database. In this way, the business access task and the data processing task can be isolated from each other during the business peak period, and do not interfere with each other, thereby facilitating the consideration of the efficiency of the database set in executing the business access task and the efficiency of executing the data processing task, and further facilitating the further improvement of the data processing efficiency and user experience in the business analysis scenario.
[0063] In one embodiment, the at least one candidate database is determined from the database set according to the business volume of the database set, and specifically can include:
[0064] In a case where the business access volume of the database set is less than the preset business access volume threshold when the access request is received, the computing cluster database and the business access cluster database in the database set are determined as the candidate databases.
[0065] In a case where the business access volume of the database set is less than the preset business access volume threshold, it can be considered that the database set is in the business off-peak period when the access request is received. Figure 3 An automatic shunting scenario of the database cluster when the database set is in the business off-peak period is shown. As shown in Figure 3 The database cluster can include the computing cluster database A, the business access cluster database B, and the business access cluster database C. When the database set is in the business off-peak period, the data processing server can receive the data processing request initiated by the ETL job terminal and forward it to the load balancer. The load balancer can distribute the data processing request to the computing cluster database A, the business access cluster database B, and the business access cluster database C according to the minimum connection number algorithm.
[0066] In the above embodiment, during the business off-peak period, the computing cluster database and the business access cluster database are taken as the candidate databases, and the data processing task can be distributed to the computing cluster database and the business access cluster database for execution. In this way, during the business off-peak period, the business access cluster database can share some data processing tasks, so that the idle resources of the business access cluster database are fully utilized. In this way, it is beneficial to improve the efficiency of data processing and the resource utilization rate of the database cluster, and further to improve the data processing efficiency and user experience in the business analysis scenario.
[0067] In one embodiment, the at least one candidate database is determined from the database set according to the business access volume of the database set, and specifically can include:
[0068] According to the business access volume of the database set in a preset time period, the corresponding business access state of the database set when the access request is received is determined, and the preset time period is a time period before the access request is received.
[0069] In a case where the service access state satisfies a preset condition, the computing cluster database and the service access cluster database in the database set are determined as the candidate database, and the preset condition that the service access state satisfies includes: according to the service access amount of the preset time period, it is predicted that the service access amount of the database set is less than a preset service access amount threshold when an access request is received.
[0070] The above-mentioned preset time period can be a preset historical time period. According to the service access amount of the database set in the preset time period, the service access state corresponding to the database set when an access request is received can be determined, which can include: according to the service access amount of the database set in the preset historical time period, predicting the service access busy degree of the database set when an access request is received. As an example, a certain time interval can be taken as a period, and the access amount of the historical period can be used to predict the business busy period (business peak period) and the non-business busy period (business low peak period) in each period. For example, a day can be taken as a period, and the business peak period and the business low peak period in a day can be predicted by the service access amount of the database set in the past few days, weeks or months. Then, based on the prediction result, the candidate database corresponding to the data processing request can be adjusted regularly. In an embodiment, in a case where the service access state does not satisfy the preset condition, the computing cluster database in the database set can be determined as the candidate database corresponding to the data processing request.
[0071] In the above-mentioned embodiment, according to the service access amount of the database set in the historical time period, it is predicted whether the database set is in the business peak period when an access request is received. When the database is not in the business peak period, the computing cluster database and the service access cluster database are taken as the candidate database, and the data processing task can be distributed to the computing cluster database and the service access cluster database for execution. In this way, during the business low peak period, a certain data processing task can be shared by the service access cluster database, so that the idle resources of the service access cluster database can be fully utilized. In this way, it is beneficial to improve the efficiency of data processing and the resource utilization rate of the database cluster, and further improve the efficiency of data processing and user experience in the business analysis scenario.
[0072] In an embodiment, the user can also manually set the candidate database type corresponding to the data processing request. In this way, the flexibility of database management can be further improved.
[0073] Based on the same inventive concept, the embodiments of the present application also provide a database management apparatus 200.
[0074] As shown in Figure 4 the database management apparatus 200 can include a receiving module 201, a determining module 202, and a calling module 203.
[0075] The receiving module 201 is configured to receive an access request sent by a user equipment, the access request comprising a type of the access request.
[0076] The determining module 202 is configured to determine a target database from a preset database set according to the type of the access request, the database set comprising at least one computing cluster database and at least one business access cluster database.
[0077] The calling module 203 is configured to call metadata of the database set through the target database to perform an operation corresponding to the access request.
[0078] The database management apparatus provided by the embodiments of the present application can receive an access request sent by a user equipment, and determine a target database from a database set according to the type of the access request. In this way, the database accessed by the user equipment can be determined based on the type of the access request, so that the user does not need to determine the connected database by himself, which is beneficial to improving the convenience of user operation and the flexibility of database management. Then, the metadata of the database set is called through the target database to perform an operation corresponding to the access request. The metadata of the database set can be shared by the databases in the database set and called by the databases. In this way, it is not only beneficial to further improving the flexibility of database management, but also beneficial to sharing of business information in a business analysis scenario.
[0079] In one embodiment, the type of the access request can comprise a business access request and a data processing request.
[0080] The determining module is configured to determine a target database from a preset database set according to the type of the access request, and specifically can comprise:
[0081] The determining module is configured to determine the target database from the at least one business access cluster database through a minimum connection number algorithm in a case where the type of the access request is the business access request.
[0082] In one embodiment, the determining module is configured to determine a target database from a preset database set according to the type of the access request, and specifically can comprise:
[0083] The determining module is configured to determine at least one candidate database from the database set according to a business access amount of the database set in a case where the type of the access request is the data processing request.
[0084] The determining module is further configured to determine the target database from the candidate database through a minimum connection number algorithm.
[0085] In one embodiment, the determining module is configured to determine at least one candidate database from a database set according to a business access amount of the database set, and specifically can comprise:
[0086] The determining module is configured to determine, when the access request is received, a computing cluster database in the database set as a candidate database if the service access amount of the database set is greater than or equal to a preset service access amount threshold.
[0087] In one embodiment, the determining module is configured to determine at least one candidate database from the database set according to the service amount of the database set, and specifically can include:
[0088] The determining module is configured to determine, when the access request is received, a computing cluster database in the database set as a candidate database if the service access amount of the database set is greater than or equal to a preset service access amount threshold.
[0089] In one embodiment, the determining module is configured to determine at least one candidate database from the database set according to the service access amount of the database set, and specifically can include:
[0090] The determining module is configured to determine, according to the service access amount of the database set in a preset time period, a service access state corresponding to the database set when the access request is received, and the preset time period is a time period before the access request is received.
[0091] The determining module is further configured to determine, when the service access state satisfies a preset condition, a computing cluster database and a service access cluster database in the database set as the candidate database, and the service access state satisfying the preset condition includes that the service access amount of the database set when the access request is received is predicted to be less than a preset service access amount threshold according to the service access amount in the preset time period.
[0092] The database management apparatus provided by the embodiments of the present application can implement Figure 1 The method embodiments implement various processes, and to avoid repetition, details are not described here.
[0093] Figure 5 A hardware structure schematic diagram of the database management apparatus provided by the embodiments of the present application is shown.
[0094] The database management apparatus can include a processor 301 and a memory 302 having computer program instructions stored therein.
[0095] Specifically, the processor 301 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits of the embodiments of the present application.
[0096] The memory 302 can include mass storage for data or instructions. As an example and not by way of limitation, the memory 302 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc (e.g., a compact disc (CD) or a digital versatile disc (DVD)), a solid-state drive (SSD), a USB drive, or a combination of two or more of these. Where appropriate, the memory 302 can include removable or non-removable (or fixed) media, where appropriate. The memory 302 can be internal or external to the integrated gateway disaster recovery appliance. In particular embodiments, the memory 302 is non-volatile, solid-state memory.
[0097] The memory can include read-only memory (ROM), random-access memory (RAM), magnetic disk storage mediums, optical storage mediums, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (by one or more processors), is operable to
[0098] The processor 301 implements any of the database management methods in the above embodiments by reading and executing computer program instructions stored in the memory 302.
[0099] In one example, the database management device can further include a communication interface 303 and a bus 310. Wherein, as shown in the figure, the processor 301, the memory 302, the communication interface 303 are connected through the bus 310 and complete the communication between each other. Figure 5
[0100] The communication interface 303 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the application.
[0101] Bus 310 includes hardware, software, or both, to couple components of the online data traffic metering device to each other and to couple components to other components within the online data traffic metering device. While bus 310 is shown for the sake of clarity as a single bus, bus 310 can include one or more buses operating together, serially, in parallel, etc. Bus 310 can include any suitable bus or interconnect, including a memory bus, a peripheral bus, an external bus, a serial bus, a parallel bus, etc. or a combination of one or more of the above. Bus 310 can include any suitable bus or interconnect, including an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infmiband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or interconnect, or a combination of two or more of the above. Where appropriate, bus 310 can include one or more buses operating together, serially, in parallel, etc. In this context, a bus is considered a set of one or more circuits that permit communication from one device to another. Although this disclosure describes and shows a particular bus, this disclosure contemplates any suitable bus or interconnect.
[0102] The database management device can perform the database management method of embodiments of the present application, thereby realizing the database management method and apparatus described in combination Figure 1 and Figure 4 with the above-described embodiments of the database management method.
[0103] In addition, in combination with the database management method in the above-described embodiments, embodiments of the present application can provide a computer storage medium to realize. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to realize any one of the database management methods in the above-described embodiments.
[0104] It is important to note that the present application is not limited to the specific configurations and processes described above and illustrated in the drawings. Detailed descriptions of known methods have been omitted for the sake of brevity. In the above-described embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order of steps, after understanding the spirit of the present application.
[0105] The functions noted in the description of the structural block diagrams above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium, or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transport information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. The code segments can be downloaded via computer networks such as the Internet, intranets, and the like.
[0106] It is also important to note that the examples mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the steps mentioned above, that is, the steps can be performed in the order mentioned in the examples, or in an order different from the examples, or several steps can be performed simultaneously.
[0107] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer program instructions can also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other processing devices to operate in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks.
[0108] The above merely describes a specific implementation of the present application. Those skilled in the art can clearly understand the specific working processes of the system, modules and units described above for the convenience and brevity of description, and can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein again. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application.
Claims
1. A database management method, characterized in that, include: Receive access requests sent by user equipment, wherein the access request includes the type of the access request, which includes service access requests and data processing requests; Based on the type of the access request, a target database is determined from a preset database set, which includes at least one computing cluster database and at least one business access cluster database. The target database is used to access the metadata of the database collection to perform the operation corresponding to the access request; The step of determining the target database from a preset database set based on the type of access request includes: When the type of the access request is a business access request, the target database is determined from the at least one business access cluster database using the least number of connections algorithm; When the type of the access request is a data processing request, at least one candidate database is determined from the database set based on the business access volume of the database set; The target database is determined from the candidate databases using a minimum connection number algorithm; The step of determining at least one candidate database from the database set based on the business access volume of the database set includes: When the access request is received, if the business access volume of the database set is greater than or equal to a preset business access volume threshold, the computing cluster database in the database set will be identified as the candidate database. When the access request is received, if the business access volume of the database set is less than the preset business access volume threshold, the computing cluster database and the business access cluster database in the database set are identified as candidate databases.
2. The method according to claim 1, characterized in that, The step of determining at least one candidate database from the database set based on the business access volume of the database set includes: Based on the business access volume of the database set in a preset time period, determine the business access status of the database set when the access request is received, wherein the preset time period is the time period before the access request is received. If the business access status meets the preset conditions, the computing cluster database and the business access cluster database in the database set will be determined as the candidate databases. The preset conditions for the business access status to meet the preset conditions include: the business access volume of the database set is less than the preset business access volume threshold.
3. A database management device, characterized in that, include: The receiving module is used to receive access requests sent by user equipment. The access request includes the type of the access request, which includes service access requests and data processing requests. The determination module is used to determine the target database from a preset database set according to the type of the access request. The database set includes at least one computing cluster database and at least one business access cluster database. The calling module is used to call the metadata of the database collection through the target database in order to perform the operation corresponding to the access request; The determining module is specifically used for: When the type of the access request is a business access request, the target database is determined from the at least one business access cluster database using the least number of connections algorithm; When the type of the access request is a data processing request, at least one candidate database is determined from the database set based on the business access volume of the database set; The target database is determined from the candidate databases using a minimum connection number algorithm; The determining module is specifically used for: When the access request is received, if the business access volume of the database set is greater than or equal to a preset business access volume threshold, the computing cluster database in the database set will be identified as the candidate database. When the access request is received, if the business access volume of the database set is less than the preset business access volume threshold, the computing cluster database and the business access cluster database in the database set are identified as candidate databases.
4. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the database management method as described in any one of claims 1-2.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the database management method as described in any one of claims 1-2.
6. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the database management method as described in any one of claims 1-2.
Citation Information
Patent Citations
Data request processing method, device and system, server and storage medium
CN112199401A