CN115269562B - Database management method and device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN115269562B
CN115269562B CN202211169276.3A CN202211169276A CN115269562B CN 115269562 B CN115269562 B CN 115269562B CN 202211169276 A CN202211169276 A CN 202211169276A CN 115269562 B CN115269562 B CN 115269562B
Authority
CN
China
Prior art keywords
sub
database
database management
management instruction
software package
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211169276.3A
Other languages
Chinese (zh)
Other versions
CN115269562A (en
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.)
Beijing Oceanbase Technology Co Ltd
Original Assignee
Beijing Oceanbase Technology 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 Beijing Oceanbase Technology Co Ltd filed Critical Beijing Oceanbase Technology Co Ltd
Priority to CN202211169276.3A priority Critical patent/CN115269562B/en
Publication of CN115269562A publication Critical patent/CN115269562A/en
Application granted granted Critical
Publication of CN115269562B publication Critical patent/CN115269562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The present specification discloses a database management method, an apparatus, a storage medium, and an electronic device, which may split a process of executing a database management instruction into a plurality of sub-operations, and generate a sub-command of the sub-operation under servers in different software environments or hardware environments for each sub-operation, where the sub-command is used to run in an operating system of a corresponding server, so that the server may execute a corresponding operation of managing a database according to the sub-command, thereby improving efficiency of a cloud platform in deploying and managing a distributed database.

Description

Database management method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a database management method, an apparatus, a storage medium, and an electronic device.
Background
At present, a database cloud platform is a data platform for deploying and maintaining a distributed database, and a user may manage the distributed database through the database cloud platform, but if the deployment and maintenance of the distributed database are not proper, it is likely that private data of the user is leaked.
Because the management modes of the databases are often different in the servers in different software environments or hardware environments, in the prior art, a common method is to input commands in the operating systems of different servers respectively in a manual mode to manage the databases deployed in the different servers, so that the efficiency of the cloud platform for deploying and managing the distributed databases is reduced.
Therefore, how to improve the efficiency of the cloud platform for deploying and managing the distributed database is an urgent problem to be solved.
Disclosure of Invention
The specification provides a database management method, a database management device, a storage medium and an electronic device. The problem that in the prior art, the efficiency of deploying and managing a distributed database by a database cloud platform is low is solved.
The technical scheme adopted by the specification is as follows:
the present specification provides a database management method, comprising:
acquiring a database management instruction sent by a user, wherein the database management instruction is used for managing a database deployed in a server;
determining each sub-operation to be executed when the database is managed according to the database management instruction;
for each sub-operation, determining a command template corresponding to the sub-operation from a preset configuration file, and generating a sub-command corresponding to the sub-operation according to the command template, wherein the configuration file comprises the corresponding relation between each sub-operation and each command template;
and executing the sub-commands corresponding to the sub-operations, and managing the database.
Optionally, the obtaining of the database management instruction sent by the user specifically includes:
acquiring a database management instruction and a software package sent by a user;
executing the subcommand corresponding to each sub-operation, and managing the database, wherein the method specifically comprises the following steps:
and operating the software package by executing the sub-commands corresponding to the sub-operations so as to manage the database.
Optionally, for each sub-operation, determining a command template corresponding to the sub-operation from a preset configuration file, and before generating a sub-command corresponding to the sub-operation according to the command template, the method further includes:
determining a server to which the database managed by the database management instruction belongs as a target server;
for each sub-operation, determining a command template corresponding to the sub-operation from a preset configuration file, and generating a sub-command corresponding to the sub-operation according to the command template, specifically comprising:
for each sub-operation, determining a command template corresponding to the sub-operation in the operating environment of the target server from a preset configuration file according to the operating environment parameters of the target server, wherein the operating environment parameters include: hardware environment parameters of the target server, software environment parameters of the target server;
and generating a sub-command corresponding to the sub-operation according to the command template.
Optionally, the method further includes, before executing a subcommand corresponding to each sub-operation and managing the database, the method further includes:
judging whether the format of a software package required by the execution of the database management instruction is matched with the corresponding operating environment parameter of the target server or not;
if not, converting the format of the software package through a preset conversion tool to obtain a converted software package;
executing the subcommand corresponding to each sub-operation, and managing the database, wherein the method specifically comprises the following steps:
and executing the sub-commands corresponding to the sub-operations, and operating the converted software package so as to manage the database in the target server.
Optionally, the method further comprises:
acquiring a modification instruction sent by a user;
and modifying the command template in the preset configuration file according to the modification instruction to obtain and store the modified configuration file.
The present specification provides a database management apparatus including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a database management instruction sent by a user, and the database management instruction is used for managing a database deployed in a server;
the determining module is used for determining each sub-operation which needs to be executed when the database is managed according to the database management instruction;
the generating module is used for determining a command template corresponding to each sub-operation from a preset configuration file aiming at each sub-operation, and generating a sub-command corresponding to the sub-operation according to the command template, wherein the configuration file comprises the corresponding relation between each sub-operation and each command template;
and the execution module is used for executing the subcommand corresponding to each sub-operation and managing the database.
Optionally, the obtaining module is specifically configured to obtain a database management instruction and a software package sent by a user;
the execution module is specifically configured to execute the sub-command corresponding to each sub-operation to operate the software package, so as to manage the database.
Optionally, the generating module is specifically configured to determine, as a target server, a server to which the database managed by the database management instruction belongs; for each sub-operation, determining a command template corresponding to the sub-operation in the operating environment of the target server from a preset configuration file according to the operating environment parameters of the target server, wherein the operating environment parameters include: hardware environment parameters of the target server, software environment parameters of the target server; and generating a sub-command corresponding to the sub-operation according to the command template.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described database management method.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above database management method when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
the database management method provided in this specification includes first obtaining a database management instruction sent by a user, where the database management instruction is used to manage a database deployed in a server, and according to the database management instruction, determining each sub-operation that needs to be executed when the database is managed according to the database management instruction, and further, for each sub-operation, determining a command template corresponding to the sub-operation from a preset configuration file, and according to the command template, generating a sub-command corresponding to the sub-operation, where the configuration file includes a correspondence between each sub-operation and each command template, and executing the sub-command corresponding to each sub-operation, thereby managing the database.
According to the method, the process of executing the database management instruction can be divided into a plurality of sub-operations, and the sub-commands of the sub-operations under the servers in different software environments or hardware environments are generated for each sub-operation, wherein the sub-commands are used for running in the operating systems of the corresponding servers, so that the servers can execute corresponding operations for managing the database according to the sub-commands, and the efficiency of deploying and managing the distributed database by the cloud platform is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
FIG. 1 is a schematic flow chart of a database management method provided herein;
FIG. 2 is a schematic diagram of a command template provided in the present specification;
FIG. 3 is a schematic diagram of a database management apparatus provided herein;
fig. 4 is a schematic diagram of an electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
To make the objects, technical solutions and advantages of the present specification clearer and more complete, the technical solutions of the present specification will be described in detail and completely with reference to the specific embodiments of the present specification and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
At present, a user can perform operations such as installation, uninstallation and update of database-related software packages (for example, a database driver software package, a database load balancing software package, and the like) in a server where each database node of a distributed database is located through a database cloud platform to implement deployment and management of the distributed database in the server where each database node of the distributed database is located, and since database servers used by different database nodes may have a plurality of different hardware environments (for example, x86_64 hardware architecture, arm64 hardware architecture, and the like), and software environments (for example, aliOS, redHat, centOS, debian, ubuntu, UOS, winning scale, euler OS, and the like), methods for installing, uninstalling and querying the software packages in different hardware environments and software environments are often different, therefore, the deployment and management functions of the distributed database by the database cloud platform are required to be adaptable to various hardware environments and servers under the software environment, in other words, the deployment and management functions of the database cloud platform are required to be performed on the distributed database and the distributed database nodes under the software environment.
In the prior art, software packages are usually packaged in a container (e.g., a Docker mirror container), and then an effect of managing software packages related to a database is realized by managing the container (e.g., the container is deployed in a server to realize an effect of installing the software packages), but since database software has higher requirements on the read-write performance and the security of data, in order to avoid the influence on the read-write performance and the security of the database, the database is often not deployed in a container environment (since the container can be stopped or deleted at any time, when the container is deleted, data in the container is lost, and thus the security of data stored in the container is lower), but needs to be deployed in a physical machine, and thus, the method is not suitable for the deployment and management of a distributed database by a database cloud platform.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a database management method provided in this specification, including the following steps:
s100: the method comprises the steps of obtaining a database management instruction sent by a user, wherein the database management instruction is used for managing a database deployed in a server.
In this specification, a service platform may manage databases disposed in servers in different hardware environments and software environments according to a database management instruction sent by a user, where before, the service platform needs to obtain a database management instruction input by the user, and then may manage software packages related to the databases in different servers according to the database management instruction, so as to manage the databases.
In this specification, the execution subject for implementing the database management method may refer to a specific device such as a server installed on the database cloud platform, or may refer to a specific device such as a desktop computer or a notebook computer.
S102: and determining each sub-operation required to be executed when the database is managed according to the database management instruction.
After the database cloud platform obtains the database management instruction input by the user, the database cloud platform can manage the database according to the database management instruction and the sub-operations required to be executed according to the database management instruction.
Specifically, the database cloud platform may determine, from preset sub-operations, sub-operations that match the database management instruction according to the database management instruction and a pre-stored correspondence between the database management instruction and the sub-operations, where the sub-operations may be, for example: acquiring software package information (the software package information comprises a name, a version number, an operating system, a hardware architecture and the like), judging whether a software package is installed or not, acquiring the number of the same-name software packages, installing the software package to a custom installation path, uninstalling the software package and the like.
For example: assuming that the database management instruction is a software package installation instruction of the database software package, it can be determined that each sub-operation that needs to be executed when the database is managed according to the database management instruction is to acquire software package information, determine whether the software package is installed, and install the software package to a custom installation path.
For another example: assuming that the database management instruction is a software package unloading instruction of the database software package, it can be determined that each sub-operation that needs to be executed when the database is managed according to the database management instruction is to acquire software package information, and determine whether the software package is installed and unloaded.
It should be noted that, because each sub-operation required for executing the database management instruction corresponding to a part of the software packages is different from each sub-operation required for executing the database management instruction corresponding to another software package, for example: the sub-operations to be executed are acquiring software package information, acquiring the number of software packages with the same name (because the software packages of the database load balancing component may have a plurality of different versions in actual application and the names of the software packages with different versions are the same, the number of the software packages with the same name needs to be acquired during installation), installing the software packages (the software packages of the database load balancing component need to be installed in a specified path so as to be convenient for calling the database, so that the installation path cannot be customized, and if the installation path is customized, the corresponding software packages may not be found during calling by the database).
S104: and aiming at each sub-operation, determining a command template corresponding to the sub-operation from a preset configuration file, and generating a sub-command corresponding to the sub-operation according to the command template, wherein the configuration file comprises the corresponding relation between each sub-operation and each command template.
After determining each sub-operation that needs to be executed when the database is managed according to the database management instruction, the database cloud platform may determine, for each sub-operation, a command template corresponding to the sub-operation from a preset configuration file, and generate a sub-command corresponding to the sub-operation according to the command template, where the configuration file includes a correspondence between each sub-operation and each command template.
The sub-command corresponding to the sub-operation is a command for controlling the operating system of the server, and includes, for example: shell commands, red hat Package Manager (RPM) commands, utility (Debian Package, deb) commands used by the Debian Linux system to install, create, and manage software packages, and the like.
Specifically, the database cloud platform may determine, as the target server, a server to which a database managed by the database management instruction (that is, one database node of the distributed database) belongs, and determine, for each sub-operation, a command template corresponding to the sub-operation in the operating environment of the target server from a preset configuration file according to an operating environment parameter of the target server, where the operating environment parameter includes: and generating a sub-command corresponding to the sub-operation according to the hardware environment parameter of the target server and the software environment parameter of the target server, wherein the command template stored in the preset configuration file is shown in fig. 2.
FIG. 2 is a schematic diagram of a command template provided in this specification.
In fig. 2, the name field indicates the name of this sub-operation, such as that the name of the sub-operation in fig. 2 is "package. Install", that is, a software package is installed, the commands field indicates different hardware environments and templates corresponding to the sub-operation in the software environment, wherein the case field is used to indicate one hardware environment and a command template in the software environment, the os field in the first case in fig. 2 indicates that the operating system corresponding to the software environment is "debian", the arch field indicates that the hardware architecture corresponding to the hardware environment is "x86 — 64", the cmd field indicates the software environment corresponding to the os field, and the command template in the hardware environment of the arch field is: in fig. 2, the default field refers to a default option, that is, if the operating environment parameter of the target server does not match the software environment and the hardware environment in the two cases, the command template corresponding to the sub-operation is the command template under the default option, that is, the rpm-Ugh { PACKAGE _ FILE } in fig. 2.
As can be seen from fig. 2, in the server with different operating environment parameters, a command template corresponding to each sub-operation that needs to be executed when the database is managed according to the database management instruction may be configured in the configuration file in advance, then, in use, for each sub-operation, a command template corresponding to the sub-operation under the operating environment parameters of the target server may be determined from the configuration file, then, according to the command template corresponding to the sub-operation, a sub-command corresponding to the sub-operation may be generated, and then, the sub-command may be executed in the target server, so as to manage the database deployed in the target server.
S106: and executing the sub-command corresponding to each sub-operation to manage the database.
After the database cloud platform generates the sub-command corresponding to each sub-operation that needs to be executed when the database is managed according to the database management instruction, the sub-command corresponding to each sub-operation may be executed in the target server, so as to manage the database deployed in the target server.
It should be noted that, in the above description, the software package required for managing the database according to the database management instruction may be pre-stored in the database cloud platform, or may be provided by a user using the database cloud platform.
Specifically, the database cloud platform may obtain a database management instruction and a software package sent by a user, and operate the software package by executing a sub-command corresponding to each sub-operation to manage the database.
In addition, when the software package is installed in different software environments, besides the sub-commands executed in different software environments, the installation package formats required for executing the software package installation instructions in different software environments may also be different, for example: the format of the software Package required for executing the software Package installation instruction in the Linux operating system is a Red-Hat Package manager (rpm) format, and the format of the software Package required for executing the software Package installation instruction in the Debian operating system is a (Debian, deb) format, so that the database cloud platform can also judge whether the format of the software Package required for executing the database management instruction is matched with the operating environment parameters corresponding to the target server according to the operating environment parameters of the target server before executing the sub-command generated by the method, and if not, the format of the software Package is converted by a preset conversion tool to obtain a converted software Package, and then the converted software Package is operated according to the generated sub-command.
As can be seen from the above, when the database deployed in the server is managed by the database cloud platform, only a software package in one format needs to be pre-stored in the database cloud platform, or only a user needs to provide a software package in one format, and the database cloud platform can automatically convert the software package in one format, so that the software package can be adapted to servers with different operating environment parameters, thereby reducing the cost for deploying and managing the database by the database cloud platform.
In practical application, a user can modify a configuration file according to business requirements, specifically, a database cloud platform can obtain a configuration file modification instruction sent by the user, modify a command template in a preset configuration file to obtain and store the modified configuration file, and then the database cloud platform can reload the configuration file, so that each command template in the configuration file can be updated.
It should be noted that the operation of modifying the configuration file in the above contents may perform dynamic configuration of the configuration file (that is, in the process of modifying the configuration file, the database cloud platform may not stop running, and only needs to reload the configuration file after modifying the configuration file, so that normal execution of the service by the database cloud platform may not be affected).
The database cloud platform can automatically generate the subcommands which can run in the servers with different operating environment parameters through the configuration files, and when a server with new operating environment parameters appears, the configuration files can be updated according to actual requirements under the condition that the normal operation of the database cloud platform is not affected, so that the newly appearing server can be adapted, the efficiency of the cloud platform in deploying and managing the distributed database can be improved, and the cost of the database cloud platform in adapting the servers with different operating environment parameters is reduced.
Based on the same idea, the database management method provided in one or more embodiments of the present specification further provides a corresponding database management apparatus, as shown in fig. 3.
Fig. 3 is a schematic diagram of a database management apparatus provided in this specification, including:
an obtaining module 301, configured to obtain a database management instruction sent by a user, where the database management instruction is used to manage a database deployed in a server;
a determining module 302, configured to determine, according to the database management instruction, each sub-operation that needs to be executed when the database is managed according to the database management instruction;
a generating module 303, configured to determine, for each sub-operation, a command template corresponding to the sub-operation from a preset configuration file, and generate a sub-command corresponding to the sub-operation according to the command template, where the configuration file includes a correspondence between each sub-operation and each command template;
and the execution module 304 is configured to execute the sub-command corresponding to each sub-operation to manage the database.
Optionally, the obtaining module 301 is specifically configured to obtain a database management instruction and a software package sent by a user;
the execution module 304 is specifically configured to execute the sub-command corresponding to each sub-operation to operate the software package, so as to manage the database.
Optionally, the generating module 303 is specifically configured to determine, as a target server, a server to which the database managed by the database management instruction belongs; for each sub-operation, determining a command template corresponding to the sub-operation in the operating environment of the target server from a preset configuration file according to the operating environment parameters of the target server, wherein the operating environment parameters include: hardware environment parameters of the target server, software environment parameters of the target server; and generating a sub-command corresponding to the sub-operation according to the command template.
Optionally, the apparatus further comprises: a conversion module 305;
the conversion module 305 is configured to determine whether a format of a software package required by the execution of the database management instruction matches an operating environment parameter corresponding to the target server; if not, converting the format of the software package through a preset conversion tool to obtain a converted software package;
the execution module 304 is specifically configured to execute a sub-command corresponding to each sub-operation, and operate the converted software package to manage the database in the target server.
Optionally, the apparatus further comprises: a modification module 306;
the modifying module 306 is configured to obtain a modifying instruction sent by a user; and modifying the command template in the preset configuration file according to the modification instruction to obtain and store the modified configuration file.
The present specification also provides a computer-readable storage medium storing a computer program operable to execute a database management method provided in fig. 1 above.
This specification also provides a schematic block diagram of an electronic device corresponding to that of figure 1, shown in figure 4. As shown in fig. 4, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to implement the database management method of fig. 1. Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90's of the 20 th century, improvements to a technology could clearly distinguish between improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements to process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is an integrated circuit whose Logic functions are determined by a user programming the Device. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), lava, lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium that stores computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, respectively. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description 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 description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description 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 so forth) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (8)

1. A database management method, comprising:
acquiring a database management instruction sent by a user, wherein the database management instruction is used for managing a database deployed in a server;
determining each sub-operation to be executed when the database is managed according to the database management instruction;
determining a server to which a database managed by the database management instruction belongs as a target server;
for each sub-operation, determining a command template corresponding to the sub-operation in the operating environment of the target server from a preset configuration file according to the operating environment parameters of the target server, wherein the operating environment parameters include: the hardware environment parameters of the target server, the software environment parameters of the target server, and the configuration file comprise the corresponding relation between each sub-operation and each command template;
generating a sub-command corresponding to the sub-operation according to the command template;
and executing the sub-commands corresponding to the sub-operations, and managing the database.
2. The method of claim 1, wherein obtaining the database management instruction sent by the user specifically comprises:
acquiring a database management instruction and a software package sent by a user;
executing the sub-commands corresponding to the sub-operations, and managing the database, specifically comprising:
and operating the software package by executing the sub-commands corresponding to the sub-operations so as to manage the database.
3. The method of claim 1, wherein the sub-commands corresponding to the sub-operations are executed, and before managing the database, the method further comprises:
judging whether the format of a software package required by the execution of the database management instruction is matched with the corresponding operating environment parameter of the target server or not;
if not, converting the format of the software package through a preset conversion tool to obtain a converted software package;
executing the sub-commands corresponding to the sub-operations, and managing the database, specifically comprising:
and executing the sub-commands corresponding to the sub-operations, and operating the converted software package so as to manage the database in the target server.
4. The method of claim 1, further comprising:
acquiring a modification instruction sent by a user;
and modifying the command template in the preset configuration file according to the modification instruction to obtain and store the modified configuration file.
5. A database management apparatus comprising:
the system comprises an acquisition module, a database management module and a database management module, wherein the acquisition module is used for acquiring a database management instruction sent by a user, and the database management instruction is used for managing a database deployed in a server;
the determining module is used for determining each sub-operation which needs to be executed when the database is managed according to the database management instruction;
the server determining module is used for determining a server to which the database managed by the database management instruction belongs as a target server;
a template determining module, configured to determine, for each sub-operation, a command template corresponding to the sub-operation in the operating environment of the target server from a preset configuration file according to an operating environment parameter of the target server, where the operating environment parameter includes: the configuration file comprises the corresponding relation between each sub-operation and each command template;
the generating module is used for generating a sub-command corresponding to the sub-operation according to the command template;
and the execution module is used for executing the subcommand corresponding to each sub-operation and managing the database.
6. The apparatus according to claim 5, wherein the obtaining module is specifically configured to obtain the database management instruction and the software package sent by the user;
the execution module is specifically configured to execute the sub-command corresponding to each sub-operation to operate the software package, so as to manage the database.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of claims 1 to 4 when executing the program.
CN202211169276.3A 2022-09-26 2022-09-26 Database management method and device, storage medium and electronic equipment Active CN115269562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211169276.3A CN115269562B (en) 2022-09-26 2022-09-26 Database management method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211169276.3A CN115269562B (en) 2022-09-26 2022-09-26 Database management method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115269562A CN115269562A (en) 2022-11-01
CN115269562B true CN115269562B (en) 2023-02-28

Family

ID=83757228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211169276.3A Active CN115269562B (en) 2022-09-26 2022-09-26 Database management method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115269562B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3196760A1 (en) * 2016-01-22 2017-07-26 Wipro Limited Methods for generating smart architecture templates and devices thereof
CN109933363A (en) * 2017-12-15 2019-06-25 镇江共远软件开发有限公司 The management method and device of big data software
CN112966824A (en) * 2021-01-28 2021-06-15 北京百度网讯科技有限公司 Deployment method and device of inference library and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2488268B (en) * 2009-12-10 2017-10-04 Ibm A method and system for managing configurations of system management agents in a distributed environment
CN107357558B (en) * 2016-05-10 2020-07-24 阿里巴巴集团控股有限公司 Method and device for constructing codes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3196760A1 (en) * 2016-01-22 2017-07-26 Wipro Limited Methods for generating smart architecture templates and devices thereof
CN109933363A (en) * 2017-12-15 2019-06-25 镇江共远软件开发有限公司 The management method and device of big data software
CN112966824A (en) * 2021-01-28 2021-06-15 北京百度网讯科技有限公司 Deployment method and device of inference library and electronic equipment

Also Published As

Publication number Publication date
CN115269562A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
TWI722256B (en) Business processing method and device
CN108268289B (en) Parameter configuration method, device and system for web application
CN109739600B (en) Data processing method, medium, device and computing equipment
CN111475142B (en) Method, device and equipment for generating applet file package
CN108595246B (en) Method, device and equipment for running application
CN117075930B (en) Computing framework management system
CN112685030A (en) Method, device, storage medium and electronic equipment for generating service code
CN110633096B (en) Node control method and device, version control method and device and distributed system
CN111273965B (en) Container application starting method, system and device and electronic equipment
CN115617799A (en) Data storage method, device, equipment and storage medium
CN110046052B (en) Service calling method and device
CN111190692A (en) Monitoring method and system based on Roc processor and readable medium
CN111459573B (en) Method and device for starting intelligent contract execution environment
CN110244964B (en) Operation and maintenance method, device and equipment based on operation and maintenance application
CN115269562B (en) Database management method and device, storage medium and electronic equipment
CN117707543A (en) Application installation package manufacturing and installation method, computing device and storage medium
CN110941443B (en) Method and device for modifying file name in SDK (software development kit) and electronic equipment
CN111338655A (en) Installation package distribution method and system
CN110022351B (en) Service request processing method and device
CN109582388B (en) Parameter configuration method, device and equipment
CN106990944B (en) Code resource management method, device and system
WO2019157891A1 (en) Application installation method and application installer generating method
CN112328213B (en) Isolation method, equipment and medium for online software development process
CN115061738B (en) Service module initialization method, equipment and medium for android componentization
CN110659105A (en) Virtualized resource processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant