CN115774706A - Database creation method and device, electronic equipment and storage medium - Google Patents

Database creation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115774706A
CN115774706A CN202211643535.1A CN202211643535A CN115774706A CN 115774706 A CN115774706 A CN 115774706A CN 202211643535 A CN202211643535 A CN 202211643535A CN 115774706 A CN115774706 A CN 115774706A
Authority
CN
China
Prior art keywords
database
cluster
database cluster
target
parameters
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.)
Pending
Application number
CN202211643535.1A
Other languages
Chinese (zh)
Inventor
李宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211643535.1A priority Critical patent/CN115774706A/en
Publication of CN115774706A publication Critical patent/CN115774706A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to the technical field of data processing, and discloses a database creating method and device, electronic equipment and a storage medium, which are used for improving database creating efficiency. In the embodiment of the application, at least one database cluster meeting the requirement is screened from the database clusters according to the environmental parameters, the cluster states and the cluster types in response to the database creating instruction; determining a target database cluster from the at least one database cluster meeting the requirements based on the resource availability; and in the target database cluster, adding a target database based on the database parameters. According to the method and the device, the target clusters are screened according to the environmental parameters, the cluster states and types and the resource availability, manual intervention is not needed, the database creating efficiency is improved, and the time cost and the labor cost for creating the database are reduced.

Description

Database creation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a database creation method and apparatus, an electronic device, and a storage medium.
Background
Before development and testing of various application system services, a database service needs to be created according to needs, and the current database service creation modes are various, such as: communication Database (CDB) based, cloud product service (relational Database management system) based, programming platform (CVM) based, and the like. In the related art, when a database is created, a unified database is not created, and technicians create the database according to the acquired requirements of users, so that the time cost and the labor cost are high.
Disclosure of Invention
The application aims to provide a database creation method, a database creation device, an electronic device and a storage medium, which are used for improving database creation efficiency.
In a first aspect, an embodiment of the present application provides a database creation method, where the method includes:
responding to a database creating instruction, and screening out at least one database cluster meeting the requirements from the database clusters according to the environmental parameters, the cluster state and the cluster type; the environment parameters represent development test conditions of a database cluster, the cluster state represents whether the database cluster is available or not, and the cluster type represents the type of a database in the database cluster; the database cluster group is formed in advance according to a plurality of database clusters;
determining a target database cluster from the at least one database cluster meeting the requirement based on the resource availability; the resource availability characterizing a total amount of unoccupied resources in the database cluster;
and adding a target database in the target database cluster based on database parameters, wherein the database parameters represent the establishment information of the target database.
In the method and the device, the target clusters are screened according to the environmental parameters, the cluster states, the cluster types and the resource availability, manual intervention is not needed, the database creating efficiency is improved, and the database creating time is shortened.
In some possible embodiments, the screening out at least one database cluster meeting the requirement from the database cluster groups according to the environment parameter, the cluster state and the cluster type includes:
screening at least one initial database cluster matched with the environmental parameters and the cluster types from a database cluster group based on the environmental parameters and the cluster types input by a user;
and taking the initial database cluster with the database state in the available state as a database cluster meeting the requirement.
In the application, the success rate of database establishment is ensured by selecting a proper database cluster according to the environmental parameters, the cluster state and the cluster type.
In some possible embodiments, the determining a target database cluster from the at least one database cluster that meets the requirement based on the resource availability includes:
ordering the at least one database cluster meeting the requirement according to the resource available amount;
determining a database cluster with the resource availability larger than a preset value;
and selecting any one database cluster as a target database cluster from the database clusters with the resource availability larger than a preset value.
In the application, in order to ensure the success rate of database establishment as much as possible, after the database clusters meeting the requirements are obtained, the database cluster with the largest available resource amount can be selected as the target database.
In some possible embodiments, said adding a target database based on database parameters in the target database cluster includes:
acquiring common basic information of the target database cluster; the common basic information represents parameters common to all databases in the target database cluster;
and newly adding the target database in the database cluster based on the common basic information and the database parameters.
In the present application, in order to further improve the efficiency of building the database, it should be avoided to obtain the full parameter information of the database, so in the present application, a new database is built by using the common basic information of the database.
In some possible embodiments, after the adding of the target database based on the database parameter in the target database cluster, the method further includes:
determining the use information of the target database, and displaying the use information; wherein the usage information characterizes information required by a user when using the database, and the usage information includes one or a combination of the following: the IP address, domain name, port, user name, password of the target database.
In the application, the use information of the target database is pushed to the user, so that the user can know the establishment condition of the database in time.
In a second aspect, the present application further provides a database creation apparatus, including:
the response module is used for responding to the database creating instruction and screening at least one database cluster meeting the requirements from the database clusters according to the environment parameters, the cluster state and the cluster type; the environment parameters represent development test conditions of a database cluster, the cluster state represents whether the database cluster is available or not, and the cluster type represents the type of a database in the database cluster; the database cluster group is formed in advance according to a plurality of database clusters;
the target database cluster determining module is used for determining a target database cluster from the at least one database cluster meeting the requirement based on the resource availability; the resource availability characterizing a total amount of unoccupied resources in the database cluster;
and the database creating module is used for newly adding a target database based on database parameters in the target database cluster, wherein the database parameters represent the establishment information of the target database.
In some possible embodiments, the response module, when executing the step of screening out at least one database cluster meeting the requirement from the database cluster groups according to the environment parameter, the cluster state and the cluster type, is configured to:
screening at least one initial database cluster matched with the environmental parameters and the cluster types from a database cluster group based on the environmental parameters and the cluster types input by a user;
and taking the initial database cluster with the database state in the available state as a database cluster meeting the requirement.
In some possible embodiments, the target database cluster determining module, when performing the determination of the target database cluster from the at least one database cluster meeting the requirement based on the resource availability, is configured to:
sorting the at least one database cluster meeting the requirements according to the resource availability;
determining a database cluster with the resource availability larger than a preset value;
and selecting any one database cluster from the database clusters with the resource availability larger than a preset value as a target database cluster.
In some possible embodiments, the database creation module, when executing in the target database cluster, is configured to, when adding a target database based on database parameters:
acquiring common basic information of the target database cluster; the common basic information represents parameters common to all databases in the target database cluster;
and newly adding the target database in the database cluster based on the common basic information and the database parameters.
In some possible embodiments, the database creation module, after adding a new target database based on the database parameters in the target database cluster, is further configured to:
determining the use information of the target database, and displaying the use information; wherein the usage information characterizes information required by a user when using the database, and the usage information includes one or a combination of the following: the IP address, the domain name, the port, the user name and the password of the target database.
In a third aspect, another embodiment of the present application further provides an electronic device, including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the methods provided by the embodiments of the first aspect of the present application.
In a fourth aspect, another embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is configured to make a computer execute any one of the methods provided in the embodiment of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the first aspects.
Drawings
Fig. 1 is a schematic view of an application scenario of a database creation method according to an embodiment of the present application;
fig. 2 is an overall flowchart schematic diagram of a database creation method according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a method for creating a database according to an embodiment of the present application to determine a database cluster meeting requirements;
fig. 4 is a schematic flowchart illustrating a process of determining a target database cluster according to a database creating method provided in an embodiment of the present application;
fig. 5 is a schematic flowchart of a newly added target database of a database creation method according to an embodiment of the present application;
fig. 6 is a schematic diagram illustrating usage information of a database creation method according to an embodiment of the present application;
fig. 7 is a schematic device diagram of a database creation method according to an embodiment of the present application;
fig. 8 is a schematic view of an electronic device of a database creation method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the technical solutions in the embodiments of the present application will be described below clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In the present application, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the term "comprises" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The term "a plurality" in the present application may mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
In the technical scheme, the data acquisition, transmission, use and the like all meet the requirements of relevant national laws and regulations.
The inventor finds that before development and test of various application system services, a database service needs to be created according to needs, and the current database service creation modes are various, such as: CDB based, relational database management system based, CVM based, etc. In the related art, when a database is created, a unified database is not created, and a technician creates the database according to the acquired requirements of the user, so that the time cost and the labor cost are high.
In view of the above, the present application provides a database creating method, an apparatus, an electronic device, and a storage medium, which are used to solve the above problems. The inventive concept of the present application can be summarized as follows: responding to a database creating instruction, and screening out at least one database cluster meeting the requirements from the database clusters according to the environmental parameters, the cluster state and the cluster type; the environment parameters represent the development test condition of the database cluster, the cluster state represents whether the database cluster is available or not, and the cluster type represents the type of the database in the database cluster; the database cluster group is formed in advance according to a plurality of database clusters; determining a target database cluster from at least one database cluster meeting the requirements based on the resource availability; the resource availability characterizes the total amount of unoccupied resources in the database cluster; and in the target database cluster, adding a target database based on the database parameters, wherein the database parameters represent the establishment information of the target database.
To facilitate understanding of the database creation method provided in the embodiment of the present application, the following describes in detail the database creation method provided in the embodiment of the present application with reference to the accompanying drawings:
fig. 1 is a diagram of an application scenario of a database creation method in the embodiment of the present application. The drawing comprises the following steps: server 10, memory 20, terminal device 30; wherein:
the server 10, in response to a database creation instruction triggered in the terminal device 30, screens out at least one database cluster meeting requirements from the database clusters according to the environmental parameters, the cluster state and the cluster type; the environment parameters represent the development test condition of the database cluster, the cluster state represents whether the database cluster is available or not, and the cluster type represents the type of the database in the database cluster; the database cluster group is formed in advance according to a plurality of database clusters and is stored in the memory 20; determining a target database cluster from the at least one database cluster meeting the requirements based on the resource availability; the resource availability characterizes the total amount of unoccupied resources in the database cluster; and in the target database cluster, adding a target database based on the database parameters, wherein the database parameters represent the establishment information of the target database.
Only a single server 10, memory 20, terminal device 30 will be described in detail in the description of the present application, but it will be understood by those skilled in the art that the illustrated server 10, memory 20, terminal device 30 are intended to represent the operations of the server 10, memory 20, terminal device 30 to which the technical aspects of the present application relate. And is not meant to imply a limitation on the number, type or location of servers 10, memories 20, terminal devices 30, etc. It should be noted that the underlying concepts of the example embodiments of the present application may not be altered if additional modules are added or removed from the illustrated environments. In addition, although a bidirectional arrow from the memory 20 to the server 10 is shown in fig. 1 for convenience of explanation, it will be understood by those skilled in the art that the above-described data transmission and reception also need to be realized through a network.
It should be noted that the storage in the embodiment of the present application may be, for example, a cache system, or may also be a hard disk storage, a memory storage, or the like. In addition, the database creation method provided by the application is not only suitable for the application scenario shown in fig. 1, but also suitable for any device with database creation requirements.
As shown in fig. 2, an overall flowchart of a database creation method provided in the embodiment of the present application is shown, where:
in step 201: responding to a database creating instruction, and screening out at least one database cluster meeting the requirements from the database clusters according to the environmental parameters, the cluster state and the cluster type;
wherein: the environment parameters represent the development test condition of the database cluster, the cluster state represents whether the database cluster is available or not, and the cluster type represents the type of the database in the database cluster; the database cluster group is formed in advance according to a plurality of database clusters;
in step 202: determining a target database cluster from at least one database cluster meeting the requirements based on the resource availability;
wherein: the resource availability represents the total amount of unoccupied resources in the database cluster;
in step 203: in the target database cluster, adding a target database based on the database parameters;
the database parameters represent establishment information of the target database.
In the method and the device, the target clusters are screened according to the environmental parameters, the cluster states, the types and the resource availability, manual intervention is not needed, the database creating efficiency is improved, and the time cost and the labor cost for creating the database are reduced.
In order to further understand the database creation method provided in the embodiment of the present application, the following steps in fig. 2 are respectively described:
in some possible embodiments, in order to ensure the success rate of database establishment, therefore, a suitable database cluster needs to be selected, when at least one database cluster meeting requirements is screened from the database cluster group according to the environmental parameters, the cluster state and the cluster type in the present application, the steps shown in fig. 3 may be specifically implemented, where:
in step 301: screening at least one initial database cluster matched with the environmental parameters and the cluster types from the database cluster groups based on the environmental parameters and the cluster types input by the user;
in step 302: and taking the initial database cluster with the database state in the available state as a database cluster meeting the requirement.
For example: the environmental parameters input by the user are development parameters 1, the cluster type is A type, and the initial database cluster screened from the database cluster group is as follows: an initial database cluster 1, an initial database cluster 2, an initial database cluster 3, an initial database cluster 4, and an initial database cluster 5; the state of the initial database cluster 1 is available, the state of the initial database cluster 2 is disabled, the state of the initial database cluster 3 is disabled, the state of the initial database cluster 4 is available, and the state of the initial database cluster 5 is available.
It is to be understood that environmental parameters include, but are not limited to: developing parameters, testing parameters and non-testing parameters; cluster types include, but are not limited to: oracle, mySQL, tiDB; database states include, but are not limited to: an available state, a disabled state.
In some possible embodiments, after obtaining a plurality of database clusters that meet the requirements, a target database cluster needs to be selected from the database clusters, which may be specifically implemented as the steps shown in fig. 4, where:
step 401: sequencing at least one database cluster meeting the requirement according to the resource availability;
the database cluster processing method comprises the steps that at least one database cluster meeting requirements can be ranked from small to large according to resource availability, or the database cluster processing method can rank at least one database cluster meeting requirements from small to large according to resource availability;
step 402: determining a database cluster with the resource availability larger than a preset value;
step 403: and selecting any one database cluster as a target database cluster from the database clusters with the resource availability larger than a preset value.
For example: a satisfactory database cluster comprises: the database management system comprises an initial database cluster 1, an initial database cluster 4 and an initial database cluster 5, wherein the resource availability of the initial database cluster 1 is 80%, the resource availability of the initial database cluster 4 is 50%, and the resource availability of the initial database cluster 5 is 70%; sorting the sequences from large to small to obtain a sequence: an initial database cluster 1, an initial database cluster 5 and an initial database cluster 4; and the preset value is 60%, determining that the database cluster larger than the preset value is as follows: an initial database cluster 1 and an initial database cluster 5; one of the initial database cluster 1 and the initial database cluster 5 is selected as a target database.
In another possible embodiment, in order to ensure the success rate of database establishment as much as possible, after the database clusters meeting the requirements are obtained, the database cluster with the largest resource availability can be selected as the target database.
In some possible embodiments, in order to further improve the efficiency of creating the database, it should be avoided to obtain the full parameter information of the database, so in this application, when a target database is newly added in the target database cluster based on the database parameters, the steps shown in fig. 5 may be specifically implemented, where:
in step 501: determining parameter information which is the same for all databases in a target database cluster;
in step 502: taking the same parameter information of all databases as the common basic information of the target database cluster;
in step 503: and newly adding a target database in the database cluster based on the common basic information and the database parameters.
For example: the target database cluster comprises a database 1, a database 2, a database 3, 8230, and a database n, wherein parameter information 1, parameter information 2, parameter information 3, parameter information 4, parameter information 5 and parameter information 6 in the n databases are the same, and the parameter information 1, the parameter information 2, the parameter information 3, the parameter information 4, the parameter information 5 and the parameter information 6 are used as common basic information of the target database cluster.
It should be understood that the operation in step 501 may be performed only once when the database cluster is established, that is, after the common basic information of the database cluster is obtained for the first time, the common basic information of the database cluster is stored in the memory, and when the database cluster is used in the subsequent process, the common basic information of the database cluster is directly obtained from the memory.
By the method shown in fig. 5, by acquiring the common basic information in the target database cluster, resource waste caused by establishing the database according to the full amount of information of the database is avoided.
In some possible embodiments, in order to ensure that the user can know the establishment of the database in time, after the target database is newly added based on the database parameters in the target database cluster, the following steps are also performed: determining the use information of the target database, and displaying the use information; the use information represents information required when a user uses the database, and the use information comprises one or a combination of the following: IP address, domain name, port, username, password of the target database.
For example: as shown in fig. 6, a usage information interface is displayed in the terminal device to make the user know the relevant situation of the database and use the database.
As shown in fig. 7, based on the same inventive concept, there is provided a database creation apparatus 700 including:
a response module 7001, configured to respond to the database creation instruction, and screen out at least one database cluster that meets the requirement from the database clusters according to the environment parameter, the cluster state, and the cluster type; the environment parameters represent development test conditions of a database cluster, the cluster state represents whether the database cluster is available or not, and the cluster type represents the type of a database in the database cluster; the database cluster group is formed in advance according to a plurality of database clusters;
a target database cluster determining module 7002, which determines a target database cluster from the at least one database cluster meeting the requirement based on the resource availability; the resource availability characterizing a total amount of unoccupied resources in the database cluster;
a database creating module 7003, configured to add a new target database in the target database cluster based on database parameters, where the database parameters represent establishment information of the target database.
In some possible embodiments, the response module 7001, when executing the screening of the database cluster group for at least one database cluster meeting the requirements according to the environment parameter, the cluster state and the cluster type, is configured to:
screening at least one initial database cluster matched with the environmental parameters and the cluster types from a database cluster group based on the environmental parameters and the cluster types input by a user;
and taking the initial database cluster with the database state in the available state as a database cluster meeting the requirement.
In some possible embodiments, the targeted database cluster determination module 7002, when performing the determination of a targeted database cluster from the eligible at least one database cluster based on resource availability, is configured to:
ordering the at least one database cluster meeting the requirement according to the resource available amount;
determining a database cluster with the resource availability larger than a preset value;
and selecting any one database cluster as a target database cluster from the database clusters with the resource availability larger than a preset value.
In some possible embodiments, the database creation module 7003 executes in the target database cluster, when a target database is added based on database parameters, for:
acquiring common basic information of the target database cluster; the common basic information represents parameters common to all databases in the target database cluster;
and newly adding the target database in the database cluster based on the common basic information and the database parameters.
In some possible embodiments, the database creation module 7003 executes in the target database cluster, and after adding a target database based on the database parameters, is further configured to:
determining the use information of the target database, and displaying the use information; wherein the usage information characterizes information required by a user to use the database, and the usage information includes one or a combination of the following: the IP address, domain name, port, user name, password of the target database.
Having described the database creation method and apparatus of the exemplary embodiments of the present application, an electronic device according to another exemplary embodiment of the present application is next described.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present application may include at least one processor, and at least one memory. Wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the database creation method according to various exemplary embodiments of the present application described above in the present specification.
The electronic device 130 according to this embodiment of the present application is described below with reference to fig. 8. The electronic device 130 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, the electronic device 130 is represented in the form of a general electronic device. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM) 1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include programs/utilities 1325 having a set (at least one) of program modules 1324, such program modules 1324 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 thereof may comprise an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur through input/output (I/O) interfaces 135. Also, the electronic device 130 may 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 the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, aspects of a database creation method provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of a database creation method according to various exemplary embodiments of the present application described above in this specification when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for database creation of the embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (13)

1. A database creation method, the method comprising:
responding to a database creating instruction, and screening out at least one database cluster meeting the requirements from the database clusters according to the environmental parameters, the cluster state and the cluster type; the environment parameters represent development test conditions of a database cluster, the cluster state represents whether the database cluster is available or not, and the cluster type represents the type of a database in the database cluster; the database cluster group is formed in advance according to a plurality of database clusters;
determining a target database cluster from the at least one database cluster meeting the requirement based on the resource availability; the resource availability characterizing a total amount of unoccupied resources in the database cluster;
and adding a target database in the target database cluster based on database parameters, wherein the database parameters represent the establishment information of the target database.
2. The method of claim 1, wherein the screening out at least one database cluster from the database cluster group according to the environment parameter, the cluster state and the cluster type comprises:
screening at least one initial database cluster matched with the environmental parameters and the cluster types from a database cluster group based on the environmental parameters and the cluster types input by a user;
and taking the initial database cluster with the database state in the available state as a database cluster meeting the requirement.
3. The method of claim 1, wherein determining a target database cluster from the at least one qualified database cluster based on resource availability comprises:
sorting the at least one database cluster meeting the requirements according to the resource availability;
determining a database cluster with the resource availability larger than a preset value;
and selecting any one database cluster from the database clusters with the resource availability larger than a preset value as a target database cluster.
4. The method of claim 1, wherein adding a target database based on database parameters in the target database cluster comprises:
acquiring common basic information of the target database cluster; the common basic information represents parameters common to all databases in the target database cluster;
and newly adding the target database in the database cluster based on the common basic information and the database parameters.
5. The method according to any one of claims 1 to 4, wherein after adding a target database based on the database parameters in the target database cluster, the method further comprises:
determining the use information of the target database, and displaying the use information; wherein the usage information characterizes information required by a user to use the database, and the usage information includes one or a combination of the following: the IP address, the domain name, the port, the user name and the password of the target database.
6. An apparatus for creating a database, the apparatus comprising:
the response module is used for responding to the database creating instruction and screening at least one database cluster meeting the requirements from the database clusters according to the environment parameters, the cluster state and the cluster type; the environment parameters represent development test conditions of the database cluster, the cluster state represents whether the database cluster is available or not, and the cluster type represents the type of a database in the database cluster; the database cluster group is formed in advance according to a plurality of database clusters;
the target database cluster determining module is used for determining a target database cluster from the at least one database cluster meeting the requirement based on the resource availability; the resource availability characterizing a total amount of unoccupied resources in the database cluster;
and the database creating module is used for newly adding a target database based on database parameters in the target database cluster, wherein the database parameters represent the establishment information of the target database.
7. The apparatus of claim 6, wherein the response module, when executing the step of screening out at least one database cluster from the database cluster group that meets the requirement according to the environment parameter, the cluster state and the cluster type, is configured to:
screening at least one initial database cluster matched with the environmental parameters and the cluster types from a database cluster group based on the environmental parameters and the cluster types input by a user;
and taking the initial database cluster with the database state in the available state as a database cluster meeting the requirement.
8. The apparatus of claim 6, wherein the target database cluster determining module, when performing the determination of the target database cluster from the at least one eligible database cluster based on resource availability, is configured to:
sorting the at least one database cluster meeting the requirement according to the resource availability from large to small, or sorting the at least one database cluster meeting the load requirement according to the resource availability from small to large;
determining a database cluster with the resource availability larger than a preset value;
and selecting any one database cluster as a target database cluster from the database clusters with the resource availability larger than a preset value.
9. The apparatus of claim 6, wherein the database creation module, when executing in the target database cluster, is configured to, when adding a target database based on database parameters:
acquiring common basic information of the target database cluster; the common basic information represents parameters common to all databases in the target database cluster;
and newly adding the target database in the database cluster based on the common basic information and the database parameters.
10. The apparatus according to any one of claims 6 to 9, wherein the database creation module, after executing the new target database in the target database cluster based on the database parameters, is further configured to:
determining the use information of the target database, and displaying the use information; wherein the usage information characterizes information required by a user when using the database, and the usage information includes one or a combination of the following: the IP address, domain name, port, user name, password of the target database.
11. An electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to implement the method of any one of claims 1 to 5.
12. A computer storage medium, characterized in that the computer storage medium stores a computer program for enabling a computer to perform the method according to any one of claims 1-5.
13. A computer program product, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the preceding claims 1-5.
CN202211643535.1A 2022-12-20 2022-12-20 Database creation method and device, electronic equipment and storage medium Pending CN115774706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211643535.1A CN115774706A (en) 2022-12-20 2022-12-20 Database creation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211643535.1A CN115774706A (en) 2022-12-20 2022-12-20 Database creation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115774706A true CN115774706A (en) 2023-03-10

Family

ID=85392838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211643535.1A Pending CN115774706A (en) 2022-12-20 2022-12-20 Database creation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115774706A (en)

Similar Documents

Publication Publication Date Title
US10642725B2 (en) Automated test generation for multi-interface enterprise virtualization management environment
CN110765024B (en) Simulation test method, simulation test device, electronic equipment and computer readable storage medium
CN110489306A (en) A kind of alarm threshold value determines method, apparatus, computer equipment and storage medium
CN109901985B (en) Distributed test apparatus and method, storage medium, and electronic device
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
CN107644075B (en) Method and device for collecting page information
CN113361838A (en) Business wind control method and device, electronic equipment and storage medium
CN112015654A (en) Method and apparatus for testing
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
US20220179729A1 (en) Correlation-based multi-source problem diagnosis
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN114064403A (en) Task delay analysis processing method and device
CN111488268A (en) Dispatching method and dispatching device for automatic test
CN115774706A (en) Database creation method and device, electronic equipment and storage medium
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN112965910A (en) Automatic regression testing method and device, electronic equipment and storage medium
CN112463616A (en) Chaos testing method and device for Kubernetes container platform
CN111597112A (en) Automatic test method and device and electronic equipment
CN111813407A (en) Game development method, game running device and electronic equipment
CN112559001A (en) Method and device for updating application
CN112306723A (en) Operation information acquisition method and device applied to small program
CN113760723B (en) Business process debugging method and device
CN111258879A (en) Service test scheduling method and device based on page acquisition and intelligent terminal
US11954506B2 (en) Inspection mechanism framework for visualizing application metrics

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