Distributed database multi-platform hybrid deployment method and device

By building the platform abstraction layer and renovating the installation package, cross-platform compatibility of distributed databases is achieved, the problem of server architecture consistency requirements in the existing technology is solved, and resource utilization and operation and maintenance flexibility are improved.

CN119807296APending Publication Date: 2025-04-11CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411784315.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing distributed database technology can only use the same server architecture in the same environment, resulting in low server resource utilization, complex architecture changes and high business continuity risks.

Method used

By building a platform abstraction layer, blocking platform differences, standardizing the external interface of database components, and transforming the installation package into a single installation media, cross-platform compatibility of database components is achieved.

Benefits of technology

It realizes cross-platform compatibility of database components, improves server resource utilization, reduces development and deployment costs, simplifies the complexity of multi-platform deployment, and improves operation and maintenance flexibility and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807296A_ABST
    Figure CN119807296A_ABST
Patent Text Reader

Abstract

The invention relates to a distributed database multi-platform hybrid deployment method, which comprises the following steps of: constructing a platform abstraction layer between a platform and a database component, shielding platform difference, and standardizing an external interface of the database component; platform installation packages are transformed, the installation packages of different platforms are packaged in a unified mode, and an installation medium suitable for multiple platforms is obtained; and adding a detection program in the installation program, detecting the current platform type and calling the corresponding installation script. The method improves the utilization rate of the server and reduces the operation and maintenance cost at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for multi-platform hybrid deployment of a distributed database. Background Art

[0002] Distributed database technology has developed rapidly with the advent of the big data era. Its core lies in distributing and storing data on multiple physical nodes and forming a unified database system through network connections. This architecture provides high availability, scalability, and fault tolerance, and is particularly suitable for scenarios that process massive amounts of data. However, in the same environment, the architecture of existing servers is limited to all nodes being of the same architecture. For example, all nodes are either Intel+Redhat combinations or Hygon+Kirin combinations; the two combinations cannot appear in the same environment at the same time.

[0003] Because distributed databases are restricted to the same environment, the server architecture and operating system must be consistent, which brings difficulties to actual deployment and operation. When the scale of distributed databases is large, the following problems are particularly obvious: (1) Each database must be deployed on multiple servers with the same architecture. For enterprises with servers of multiple architectures, the utilization rate of server resources is low; (2) It is difficult to implement server architecture changes. For example, when upgrading from x86 architecture to ARM architecture, all nodes must be upgraded at the same time, which increases the implementation complexity and business continuity risks. Summary of the invention

[0004] To address the deficiencies in the prior art, the present invention constructs a platform abstraction layer based on virtual machine technology to enable database components to run seamlessly across multiple platforms. At the same time, the installation package is transformed into a single installation medium, thereby optimizing the user's installation experience and improving server resource utilization. Automatic detection of installation and flexible expansion mechanisms realize cross-platform compatibility of database components.

[0005] The present invention provides a method for multi-platform hybrid deployment of a distributed database, comprising:

[0006] Build a platform abstraction layer between the platform and database components to shield platform differences and standardize the external interfaces of database components;

[0007] Modify the platform installation package, unify the installation packages of different platforms, and obtain installation media suitable for multiple platforms;

[0008] Add a detection program in the installation program to detect the current platform type and call the corresponding installation script.

[0009] Exemplarily, the method also supports new platform extensions, including: adding a new platform abstraction layer and a corresponding installation script;

[0010] If the newly added platform abstraction layer and the existing platform abstraction layer use the corresponding instruction set, there is no need to recompile the database component, only the registration procedure needs to be executed.

[0011] Exemplarily, after transforming the platform installation package in S2 and packaging the installation packages of different platforms together to obtain installation media suitable for multiple platforms, the step further includes deduplicating the same parts of the installation packages of different platforms to obtain a single installation medium.

[0012] Exemplarily, the single installation medium includes specific versions for different platforms as well as dependent and configured files.

[0013] Exemplarily, the construction of the platform abstraction layer utilizes the interpretation execution and just-in-time compilation functions of the virtual machine to ensure the compatibility of the platform abstraction layer.

[0014] The present invention also provides a device for hybrid deployment of distributed databases on multiple platforms, characterized in that it is used to execute any of the methods of claims 1-5, including:

[0015] The platform abstraction layer building module is used to build a platform abstraction layer between the platform and database components, shielding platform differences and standardizing the external interface of the database component;

[0016] The installation package transformation module is used to unify the installation packages of different platforms and obtain installation media suitable for multiple platforms;

[0017] The detection module is used to detect the current platform type and call the corresponding installation script.

[0018] The present invention also provides a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

[0019] The present invention also provides an electronic device, characterized in that it includes a processor and a memory;

[0020] The memory is used to store computer programs;

[0021] The processor is configured to execute the method according to any one of claims 1 to 5 by calling a stored computer program.

[0022] The present invention also relates to a computer program product, comprising a computer program and / or instructions, characterized in that the computer program and / or instructions implement the steps of the above method when executed by a processor.

[0023] The beneficial effects of the present invention are: through the platform abstraction layer, unified packaging of installation packages and deletion of duplicate parts, automatic detection and installation, and flexible expansion mechanism, cross-platform compatibility of database components is achieved, good scalability and maintenance convenience are achieved, while reducing development and deployment costs, optimizing user installation experience, and simplifying the complexity of multi-platform deployment;

[0024] In addition, this method also improves the utilization rate of server resources. The original deployment required N servers with the same architecture, but now it can be deployed with N servers of any architecture. It is no longer dependent on the type of server, and users can automatically combine heterogeneous servers to improve supply chain security. It reduces the cost of operation and maintenance implementation, and system nodes can be independently replaced with any platform without the need for overall replacement. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of the process of the multi-platform hybrid deployment method of the distributed database of the present invention.

[0026] Figure 2 It is a schematic diagram of the structure of the distributed database multi-platform hybrid deployment device of the present invention.

[0027] Figure 3 The invention provides implementation steps for the multi-platform hybrid deployment of the distributed database in the newly added platform abstraction layer.

[0028] Figure 4 This is a schematic diagram of unified packaging of the multi-platform hybrid deployment installation package of the distributed database of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0030] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0031] In a first aspect, the present invention provides a method for hybrid deployment of a distributed database on multiple platforms, comprising:

[0032] Build a platform abstraction layer between the platform and database components to shield platform differences and standardize the external interfaces of database components;

[0033] Modify the platform installation package, unify the installation packages of different platforms, and obtain installation media suitable for multiple platforms;

[0034] Add a detection program in the installation program to detect the current platform type and call the corresponding installation script.

[0035] Specifically, by adding a "platform abstraction layer" between the platform and the database component, the underlying platform differences are shielded, so that the database component does not need to consider the implementation details of the specific platform. The platform abstraction layer is similar to the working principle of the JVM, which makes the database component cross-platform compatible. The platform-independent interface standardization is achieved to decouple the database component functions from the platform. The database component can run on different platforms without modification, laying the foundation for multi-platform hybrid deployment. This setting reduces the complexity of cross-platform development and reduces the cost of developing and maintaining database components separately for each platform.

[0036] For unified package installation packages, such as Figure 4 As shown in the figure, different platforms originally had independent installation packages (such as x86 and aarch64). In this solution, these installation packages are combined into an "all-platform" installation package (AIO). When packaging, duplicate content (such as the common parts of components) is removed, and only the platform differences (such as the platform abstraction layer) are retained. Provide an installation medium suitable for all platforms, and users no longer need to distinguish between platforms and download or select the corresponding version of the installation package. For example, different installation packages were originally provided according to different platforms:

[0037] SAMPLE-DB-6.1-x86-redhat.zip

[0038] SAMPLE-DB-6.1-x86-kylin.zip

[0039] SAMPLE-DB-6.1-aarch64-redhat.zip

[0040] SAMPLE-DB-6.1-aarch64-kylin.zip

[0041] Now you need to merge these installation packages (AIO means ALL IN ONE):

[0042] SAMPLE-DB-6.1-AIO.zip

[0043] In order to reduce the size of the installation package, you need to remove duplicate content when packaging.

[0044] For example, for the x86-redhat and x86-kylin installation packages, the components themselves are the same, and the main difference is in the platform abstraction layer. Therefore, after merging and packaging, only one copy of the component itself needs to be saved.

[0045] Unified packaging provides users with a single installation medium, and users no longer need to manually identify the target platform to obtain the corresponding installation medium. This significantly simplifies the user's operation complexity, avoids the problem of selecting the wrong version, and optimizes the installation experience.

[0046] Add a detection module to the installer. Add a platform detection module to the installer's entry script install.sh to automatically identify the current server's operating system and CPU architecture, and dynamically select and call the corresponding installation script (such as install_x86_redhat.sh). In the installation package, a possible installation program organization structure is as follows:

[0047] -install.sh

[0048] -install_x86_redhat.sh

[0049] -install_x86_kylin.sh

[0050] -install_aarch64_redhat.sh

[0051] -install_aarch64_kylin.sh

[0052] Among them, install.sh is started by the user as the installation entry and runs first. It is mainly responsible for detecting the platform type and calling the lower-level installation script, thereby realizing automated mixed-platform installation, avoiding the user's manual selection of platform configuration, and ensuring the uniformity and simplicity of the installation process. This setting has the same user experience as single-platform installation, and can complete multi-platform deployment without additional learning costs.

[0053] New platform support extensions, such as Figure 3As shown, when you need to add support for a new platform, you only need to add the abstraction layer and corresponding installation script of the platform, without making a lot of changes to the component itself. If the new platform uses the same instruction set (such as different operating systems under x86), there is no need to recompile the component, just add the installation script and register it in install.sh. This setting can quickly adapt to the new platform, ensure the cross-platform scalability of the system, and reduce the workload and impact of expanding the new platform. Only a small amount of adaptation operations are required, reducing maintenance and expansion costs. Among them, "new installation script" refers to writing a special installation script for the newly added platform, such as install_xxx_yyy.sh.

[0054] "Registering the installation script" means adding detection for the newly added platform to the entry installation script "install.sh" and being able to call the newly added script. This step can quickly support the newly emerged platform and control the adaptation workload within a small range.

[0055] In addition, the specific implementation example is a distributed database environment with two locations and three centers, and the platform is Intel+Redhat. It is planned to replace the server with Haiguang+Kirin.

[0056] If hybrid deployment is not supported, at least the following steps are required:

[0057] All machines for the new platform are in place and deployed;

[0058] Build data synchronization from the original platform to the new platform, including full migration and incremental synchronization;

[0059] Apply for a downtime window, stop the original platform business, and wait for the data of the new and old platforms to catch up;

[0060] Switch to the new platform as a whole at one time;

[0061] The original platform was taken offline;

[0062] It can be seen that it is necessary to apply for a shutdown window and switch the entire system at one time, which increases the complexity and risk of the operation.

[0063] With the support of the solution of the present invention, the migration work will become easy, and the steps are as follows:

[0064] Use the uniformly packaged installation media to deploy some backup machines on the new platform and connect them to the original platform (a small number of nodes can be selected for pilot testing);

[0065] After the above pilot runs smoothly, the host will be switched to the new platform;

[0066] The original platform node is offline;

[0067] Repeat the above steps for other nodes until all nodes are successfully migrated;

[0068] Under the premise of supporting multi-platform hybrid deployment, migration work can be carried out in grayscale without downtime or overall one-time switching. The scope of fault impact can be controlled, which greatly simplifies the complexity of operations and reduces risks.

[0069] The present invention also provides a device for hybrid deployment of distributed databases on multiple platforms, which is used to execute any of the methods of claims 1-5, including:

[0070] The platform abstraction layer building module is used to build a platform abstraction layer between the platform and database components, shielding platform differences and standardizing the external interface of the database component;

[0071] The installation package transformation module is used to unify the installation packages of different platforms and obtain installation media suitable for multiple platforms;

[0072] The detection module is used to detect the current platform type and call the corresponding installation script.

[0073] The device also includes: a new platform extension module, which is used to add a new platform abstraction layer and a corresponding installation script.

[0074] By using this device, the above-mentioned processing method can be executed and the corresponding technical effects can be achieved.

[0075] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

[0076] An embodiment of the present invention also provides an electronic device for executing the above method. As an implementation device of the method, the electronic device has at least a processor and a memory, and in particular, the memory stores data and related computer programs required for executing the method, and the processor calls the data and programs in the memory to execute all steps of the implementation method and obtains the corresponding technical effect.

[0077] Preferably, the electronic device may include a bus architecture, the bus may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same component, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor when performing operations.

[0078] In addition, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operation control) used may include a microprocessor or other processor device and / or a logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, which may store the above-mentioned related data information, and may also store a program for executing related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used to provide input to the processor, for example, it may be a key or a touch input device; the power supply is used to provide power to the electronic device; the display is used to display display objects such as images and text, for example, it may be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processor, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

[0079] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0080] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0081] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0083] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for hybrid deployment of distributed databases on multiple platforms, characterized in that: include: Build a platform abstraction layer between the platform and database components to shield platform differences and standardize the external interfaces of database components; Modify the platform installation package, unify the installation packages of different platforms, and obtain installation media suitable for multiple platforms; Add a detection program in the installation program to detect the current platform type and call the corresponding installation script.

2. The method according to claim 1, characterized in that The method also supports new platform extensions, including: adding a new platform abstraction layer and corresponding installation scripts; If the newly added platform abstraction layer and the existing platform abstraction layer use the corresponding instruction set, there is no need to recompile the database component, only the registration procedure needs to be executed.

3. The method according to claim 2, characterized in that: After the platform installation package is transformed in S2 and the installation packages of different platforms are packaged uniformly to obtain installation media suitable for multiple platforms, the method further includes removing duplicate operations of the same parts of the installation packages of different platforms to obtain a single installation medium.

4. The method according to claim 3, characterized in that The single installation media contains specific versions for different platforms as well as dependent and configuration files.

5. The method according to claim 1, characterized in that The construction of the platform abstraction layer utilizes the interpretation execution and just-in-time compilation functions of the virtual machine to ensure the compatibility of the platform abstraction layer.

6. A device for hybrid deployment of distributed databases on multiple platforms, characterized in that: The method for executing any one of claims 1 to 5 comprises: The platform abstraction layer building module is used to build a platform abstraction layer between the platform and database components, shielding platform differences and standardizing the external interface of the database component; The installation package transformation module is used to unify the installation packages of different platforms to obtain installation media suitable for multiple platforms; The detection module is used to detect the current platform type and call the corresponding installation script.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

8. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 5 by calling a stored computer program.

9. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.