Adapter-based database integration system, method, device and storage medium

Through the adapter-based database integration system, translators, distributed coordination components and adapters are used to achieve dialect conversion for different database types, solving the problem that traditional database integration methods are difficult to adapt to differentiated databases, and achieving efficient database integration and cross-platform interoperability.

CN120277161BActive Publication Date: 2025-09-23SHENZHEN DINSTAR TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510750026.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-23
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

Traditional database integration methods are difficult to adapt to databases with large differences and cannot meet the requirements of distributed scenarios with high concurrency, low latency, and elastic expansion.

Method used

An adapter-based database integration system is used, which realizes dialect conversion and adaptation of different database types through translators, distributed coordination components and adapters in the database integration cluster, unifies standard database language specifications, supports flexible transactions and cache read-write separation, and realizes cross-platform database integration.

Benefits of technology

It improves the adaptability of database integration, enables adaptation to databases with large differences, improves the availability and interoperability of database integration, and supports ACID principles and flexible transactions in distributed environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277161B_ABST
    Figure CN120277161B_ABST
Patent Text Reader

Abstract

The present application discloses an adapter-based database integration system, method, device, and storage medium, relating to the field of data processing technology. The adapter-based database integration system comprises: a database integration cluster; the database integration cluster comprises a plurality of database integration modules; a first database integration module comprises: a first translator, a first distributed coordination component, and a first adapter; because different adapters are selected to implement the underlying operations of the database, subsequent types of databases can be easily expanded horizontally by simply adding corresponding adapters, thus having good scalability. The use of a distributed coordination component plus translator model unifies the user-oriented operation mode and improves ease of use; the functionality of the underlying database that does not support distributed operation is expanded, greatly improving the cross-platform deployment availability and interoperability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an adapter-based database integration system, method, device, and storage medium. Background Art

[0002] Currently, enterprise-level application systems face increasingly complex data management requirements. With the expansion of business scale and the explosive growth of data volume, traditional single database architectures can no longer meet the requirements of distributed scenarios with high concurrency, low latency, and elastic scalability.

[0003] Traditional database processing solutions usually use the dialect provided by the corresponding database to operate the database. Therefore, when performing distributed database integration, it is difficult to adapt to databases with large differences. Summary of the Invention

[0004] The main purpose of this application is to provide an adapter-based database integration system, method, device and storage medium, aiming to solve the technical problem that traditional database integration methods are difficult to adapt to databases with large differences.

[0005] To achieve the above objectives, the present application proposes an adapter-based database integration system, the system comprising: a database integration cluster;

[0006] The database integration cluster includes several database integration modules;

[0007] The first database integration module is configured to translate the first operation instruction into the second operation instruction when receiving the first operation instruction sent by the user terminal; the first database integration module is any database integration module in the database integration cluster;

[0008] The first database integration module is further configured to, when the second operation instruction is a logic operation instruction, notify the second database integration module to execute the operation corresponding to the second operation instruction; the second database integration module is another database integration module in the database integration cluster other than the first database integration module;

[0009] The first database integration module is further configured to execute the operation corresponding to the second operation instruction based on the adapter.

[0010] In one embodiment, the system further comprises: a cluster building module;

[0011] The cluster building module is used to obtain database links and server cluster parameters;

[0012] The cluster building module is further configured to build a database integration cluster based on the database link and the server cluster parameters.

[0013] In one embodiment, the cluster construction module is further configured to generate a topology structure of a database integration module under the database integration cluster based on the server cluster parameters;

[0014] In the database integration cluster, the database integration module corresponds to the database.

[0015] In one embodiment, the first database integration module includes: a first translator, a first distributed coordination component, and a first adapter;

[0016] The translator is configured to, upon receiving a first operation instruction sent by a user, translate the first operation instruction into a second operation instruction of the database corresponding to the first database integration module;

[0017] The first distributed coordination component is configured to identify the second operation instruction and, when the second operation instruction is a logical operation, notify the second database integration module to pre-execute the operation corresponding to the second operation instruction;

[0018] The first distributed coordination component is further configured to send the second operation instruction to the first adapter;

[0019] The first adapter is used to pre-execute the operation corresponding to the second operation instruction.

[0020] In one embodiment, the first adapter is further configured to obtain an execution result of the second operation instruction, and send the first execution result of the second operation instruction to the first distributed coordination component;

[0021] The first distributed coordination component is further configured to obtain the first execution result and the second execution result of the second database integration module, and determine whether execution is possible based on the first execution result and the second execution result;

[0022] The first distributed coordination component is further configured to notify the database integration module in the database integration cluster to execute the operation corresponding to the second operation instruction when the first execution result and the second execution result are executable.

[0023] In one embodiment, the first adapter is further configured to roll back the first execution result and the second execution result obtained by the pre-execution when the first execution result and the second execution result are not executable.

[0024] In one embodiment, the first distributed coordination component is further configured to, when the second operation instruction is a query operation instruction, execute the operation corresponding to the second operation instruction through the first adapter, and call the query cache as the query result of the operation.

[0025] In addition, to achieve the above-mentioned purpose, the present application also proposes an adapter-based database integration method, which is applied to the adapter-based database integration system described above, and includes:

[0026] When the first database integration module obtains the first operation instruction sent by the user terminal, the first operation instruction is translated into a second operation instruction; the first database integration module is any database integration module in the database integration cluster;

[0027] When the second operation instruction is a logic operation instruction, the first database integration module will notify the second database integration module to execute the operation corresponding to the second operation instruction; the second database integration module is another database integration module in the database integration cluster except the first database integration module;

[0028] The first database integration module executes the operation corresponding to the second operation instruction based on the adapter.

[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes an adapter-based database integration device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the adapter-based database integration method as described above.

[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by the processor, it implements the steps of the adapter-based database integration method as described above.

[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the adapter-based database integration method as described above.

[0032] One or more technical solutions proposed in this application have at least the following technical effects:

[0033] The adapter-based database integration system of the present application includes a database integration cluster; the database integration cluster includes several database integration modules; wherein, when the first database integration module obtains the first operation instruction sent by the user end, the first operation instruction is translated into a second operation instruction; the first database integration module is any database integration module in the database integration cluster; when the second operation instruction is a logical operation instruction, the first database integration module will notify the second database integration module to execute the operation corresponding to the second operation instruction; the first database integration module executes the operation corresponding to the second operation instruction based on the adapter. Since the first operation instruction is translated into the second operation instruction by the database integration module, the dialect conversion of various database types is realized, and the adaptation of different databases is completed. Compared with the previous technology, the solution of the present application can adapt to databases with large differences, thereby improving the adaptation range of database integration. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0036] Figure 1 This is a schematic diagram of the system structure of the first embodiment of the adapter-based database integration system of the present application;

[0037] Figure 2 This is a schematic diagram of the structure of the database integration module of the second embodiment of the adapter-based database integration system of this application;

[0038] Figure 3 This is a schematic diagram of the overall workflow of the adapter-based database integration system of this application;

[0039] Figure 4 This is a schematic diagram of the workflow of the adapter-based database integration method according to an embodiment of the present application;

[0040] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the adapter-based database integration method in the embodiment of the present application.

[0041] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0042] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0043] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0044] An embodiment of the present application proposes an adapter-based database integration system, comprising: a database integration cluster; the database integration cluster including several database integration modules; wherein the first database integration module is configured to translate the first operation instruction into a second operation instruction upon obtaining a first operation instruction sent by a user terminal; the first database integration module is any database integration module in the database integration cluster; the first database integration module is further configured to notify the second database integration module to execute an operation corresponding to the second operation instruction when the second operation instruction is a logical operation instruction; the second database integration module is any database integration module other than the first database integration module in the database integration cluster; the first database integration module is further configured to execute the operation corresponding to the second operation instruction based on the adapter.

[0045] It should be noted that the execution entity of this embodiment may be a computing service device with data processing, network communication, and program execution capabilities, such as a computer or server, or an electronic device or virtual device capable of implementing the aforementioned functions. This embodiment and the following embodiments will be described below using an adapter-based database integration device (hereinafter referred to as the integration device) as an example.

[0046] like Figure 1 As shown, Figure 1 This is a schematic diagram of the system structure of the first embodiment of the adapter-based database integration system of the present application. In the integration device of the present application, an adapter-based database integration system may be provided. The system includes: a database integration cluster;

[0047] The database integration cluster includes several database integration modules;

[0048] The first database integration module is configured to translate the first operation instruction into the second operation instruction when receiving the first operation instruction sent by the user terminal; the first database integration module is any database integration module in the database integration cluster;

[0049] The first database integration module is further configured to, when the second operation instruction is a logic operation instruction, notify the second database integration module to execute the operation corresponding to the second operation instruction; the second database integration module is another database integration module in the database integration cluster other than the first database integration module;

[0050] The first database integration module is further configured to execute the operation corresponding to the second operation instruction based on the adapter.

[0051] It should be noted that the Adapter Database Integration Distributed Device (ADIDD) is an adapter-based database integration module that supports distributed deployment across databases and platforms. The database integration module in this application may include three components: a translator, a distributed coordination component, and an adapter.

[0052] It should be noted that the database integration cluster of the present application may include multiple database integration modules, each of which can be connected to a database. The database integration module can receive a first operation instruction sent by a user terminal and translate the first operation instruction into a second operation instruction, thereby resolving operational differences between different databases and expanding the support of non-relational databases and file databases for distributed scenarios.

[0053] It should be noted that in the embodiments of this application, a "Mandarin" based on the database language is defined to replace the different "dialects" of various relational and non-relational databases, achieving unified input support. The adapter abstracts and adapts operations for different databases. The above-mentioned first operation instructions are database operation instructions based on standard database language specifications, and the above-mentioned second operation instructions are basic operation dialects for a class of databases, such as connect, disconnect, execute, query, start transaction, commit, rollback, and other operations.

[0054] It is understood that in distributed system and database operation scenarios, logical operation instructions can be operations that can substantially modify the database state, database content, or database structure and affect business logic, such as addition, deletion, and modification. When the second operation instruction is a logical operation instruction, embodiments of the present application can initiate a flexible transaction and call the corresponding adapter in each database integration module in the database integration cluster to pre-execute the operation corresponding to the second operation instruction.

[0055] It should be noted that the terms "first database integration module" and "second database integration module" are merely used to distinguish the database integration modules in the database integration cluster and have no practical significance. The first database integration module can be any database integration module in the database integration cluster, while the second database integration module can be any database integration module in the database integration cluster other than the first database integration module.

[0056] The adapter-based database integration system of the embodiment of the present application includes a database integration cluster; the database integration cluster includes several database integration modules; wherein, when the first database integration module obtains the first operation instruction sent by the user end, the first operation instruction is translated into a second operation instruction; the first database integration module is any database integration module in the database integration cluster; when the second operation instruction is a logical operation instruction, the first database integration module will notify the second database integration module to perform the operation corresponding to the second operation instruction; the first database integration module performs the operation corresponding to the second operation instruction based on the adapter. Since the first operation instruction is translated into the second operation instruction by the database integration module, the dialect conversion of various database types is realized, and the adaptation of different databases is completed. Compared with the previous technology, the solution of the present application can adapt to databases with large differences, thereby improving the adaptation range of database integration.

[0057] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 2 , Figure 2 This is a structural diagram of the database integration module of the second embodiment of the adapter-based database integration system of this application.

[0058] In the embodiment of the present application, the system further includes: a cluster construction module;

[0059] The cluster building module is used to obtain database links and server cluster parameters;

[0060] The cluster building module is further configured to build a database integration cluster based on the database link and the server cluster parameters.

[0061] It should be noted that the above-mentioned cluster construction module is used to build a database integration cluster. In an embodiment of the present application, the system of the present application can be installed and deployed on the original server and parameter configuration can be performed. Specifically, the cluster construction module can obtain the database link and server cluster parameters (such as interconnection port, access port, cluster server address, etc.) configured by the user for use on the server. The cluster construction module can identify the corresponding database type (such as database types can include mysq, redis, nosql) based on different database links, and adaptively select the corresponding adapter. At the same time, the topology structure of the database module under the corresponding cluster can be formed according to the configured server cluster parameters, so as to facilitate the implementation of subsequent distributed coordination component interaction mechanisms. Specifically, the cluster construction module is also used to generate the topology structure of the database integration module under the database integration cluster based on the server cluster parameters; in the database integration cluster, the database integration module corresponds to the database.

[0062] like Figure 2 As shown, the deployed database integration module may include a translator, a distributed coordination component, and an adapter. The database integration module can receive a first operation instruction and, through the translator in the database integration module, translate the first operation instruction into a second operation instruction for the database corresponding to the data integration cluster. The distributed coordination component then identifies whether the corresponding second operation instruction is a logical operation instruction. If the second operation instruction is a logical operation instruction, a flexible transaction is initiated. The distributed coordination component notifies each database integration module within the database integration cluster, and each database integration module then calls the corresponding adapter (second adapter) to pre-execute the operation corresponding to the second operation instruction. Specifically, the first database integration module includes a first translator, a first distributed coordination component, and a first adapter. The translator is configured to translate the first operation instruction sent by the user into the second operation instruction for the database corresponding to the first database integration module. The first distributed coordination component is configured to identify the second operation instruction and, if the second operation instruction is a logical operation, notify the second database integration module to pre-execute the operation corresponding to the second operation instruction. The first distributed coordination component is also configured to send the second operation instruction to the first adapter. The first adapter is configured to pre-execute the operation corresponding to the second operation instruction.

[0063] It should be noted that this embodiment of the application deploys a database consolidation cluster composed of database consolidation modules in different server scenarios. For each existing database, a corresponding link to the database consolidation module of this application is configured. Multiple database consolidation modules within the cluster are then configured based on a topology file, and the necessary communication ports between the database consolidation modules are opened. Users only need to replace the database link of the application service with the database link corresponding to the database consolidation module of this application.

[0064] It needs to be explained that the core of the database integration module of this application lies in the design of three major components: translator, distributed coordination component, and adapter. The translator is used to unify the dialects of various databases and promote a unified standard database language; the distributed coordination component is used to meet the ACID principle of the database and coordinate database integration modules deployed in different environments. Finally, adapters for different types of databases are used to abstract the corresponding basic operations, save and modify the database, and form an overall database integration cluster to achieve database integration and coordination. In the embodiment of the present application, the translator defines a standard database language specification for database operations, which can translate the received standard database language (first operation instruction) into the most basic basic operation dialect (second operation instruction) that can be recognized by various databases, such as connect, disconnect, execute, query, beginTransaction (start transaction), commit, rollback and other operations; then coordinate other deployed database integration modules through the distributed coordination component to complete unified transaction scheduling and distributed lock operations, and then use the flexible transaction method to notify the adapter to pre-execute the corresponding operation. When all database integration modules return the pre-processing results, the distributed coordination component will uniformly return the results; and notify the adapter to actually execute the operation, thereby completing the implementation of the ACID principle in a distributed environment.

[0065] As you can understand, soft transactions are a distributed transaction solution that adheres to the BASE theory and features basic availability, soft state, and eventual consistency. Basic availability allows for some loss of availability when a distributed system fails; soft state allows for intermediate states without affecting overall system availability; and eventual consistency ensures that, after a period of data synchronization, all data replicas in the system eventually reach a consistent state.

[0066] In some implementations of the present application, when the second operation instruction is an operation instruction that does not require modification of a data structure file (e.g., a query operation instruction), the database integration module of the present application can call the cache to return the execution result of the second operation instruction. Specifically, the first distributed coordination component is further configured to, when the second operation instruction is a query operation instruction, execute the operation corresponding to the second operation instruction via the first adapter and call the query cache as the query result of the operation.

[0067] It should be noted that the embodiment of the present application defines a unified database language operation specification through a translator, and realizes the conversion of the first operation instruction and the second operation instruction based on various database types. It also uses a distributed coordination component, adopts a partial cache read-write separation method, and implements distributed function expansion through the development of flexible transactions. It splits the atomic operations of each database through the adapter to complete the adaptation of different databases.

[0068] The first database integration module of the embodiment of the present application includes: a first translator, a first distributed coordination component and a first adapter; when the translator receives the first operation instruction sent by the user, the translator translates the first operation instruction into the second operation instruction of the database corresponding to the first database integration module; the first distributed coordination component identifies the second operation instruction, and when the second operation instruction is a logical operation, it notifies the second database integration module to pre-execute the operation corresponding to the second operation instruction; the first distributed coordination component sends the second operation instruction to the first adapter; the first adapter pre-executes the operation corresponding to the second operation instruction. Since the various database dialects are unified by setting the translator, the user-oriented operation mode is unified, the system has better usability, and the functionality of the underlying database that does not support distributed operation is expanded, which greatly improves the availability and interoperability of cross-platform deployment. At the same time, since different adapters are selected to implement the underlying operations of different databases, other types of databases that are subsequently withdrawn can be easily expanded horizontally. It only needs to add the corresponding adapter to it, which has good scalability.

[0069] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment and / or the second embodiment can be referred to the above introduction and will not be described in detail later. Figure 3 , Figure 3 This is a schematic diagram of the overall workflow of the adapter-based database integration system of this application.

[0070] In the embodiment of the present application, the first adapter is further configured to obtain an execution result of the second operation instruction, and send the first execution result of the second operation instruction to the first distributed coordination component;

[0071] The first distributed coordination component is further configured to obtain the first execution result and the second execution result of the second database integration module, and determine whether execution is possible based on the first execution result and the second execution result;

[0072] The first distributed coordination component is further configured to notify the database integration module in the database integration cluster to execute the operation corresponding to the second operation instruction when the first execution result and the second execution result are executable.

[0073] It should be noted that in the embodiments of the present application, system parameter configuration can be performed through a cluster construction module, and by identifying the original database type in the server, an adaptive adapter based on the database type is configured to achieve the construction of a database integration cluster. When the translator receives the first operation instruction, it translates it into the second operation instruction of the corresponding database. At the same time, based on the second operation instruction, it distinguishes between query and logical operation processing. When it is a query operation, the query is performed and the query result is returned; when it is a logical operation instruction, a flexible transaction is started, and each database integration module is coordinated to pre-execute the second operation instruction and summarize the first execution result and second execution result obtained by each database integration module pre-execution of the second operation instruction. When the first execution result and the second execution result are executable, each database integration module is notified to execute, and the flexible transaction is closed, the execution result of some data is cached, and the execution success is returned. If the first execution result or the second execution result is not executable, the pre-execution is rolled back. When the rollback is complete, the flexible transaction is closed and the execution failure is returned. That is, the first adapter is also used to roll back the first execution result and the second execution result obtained by the pre-execution when the first execution result and the second execution result are not executable.

[0074] In some implementations of the present application, when the adapter pre-executes the operation corresponding to the second operation instruction, it can report the pre-execution results to its own distributed coordination component. Finally, the results are aggregated to the distributed coordination component of the initiator's database integration module (i.e., the first database integration module), which then determines whether the current operation can be executed. If it cannot be executed, a failure is returned, and the distributed coordination components (participants) of all database integration modules in the database integration cluster are notified to roll back the current operation. If the second operation instructions are all pre-executed sequentially, the distributed coordinators of all database integration modules are notified, and these distributed coordinators notify their respective adapters to execute the current operation.

[0075] It is understandable that, when the execution is successful, the table database involved in the execution of the second operation may be partially cached to provide for subsequent query operations.

[0076] In some implementations of the present application, a server can use Open Database Connectivity (ODBC) to access the database of the database integration module of the present application and other database integration modules within the database integration cluster. The client can use native ODBC to access the database link provided by the present application. Through the configured cluster topology, transaction-related processing can be coordinated and completed. The first ODBC operation instruction can be atomized into basic operations and synchronized with other databases in the cluster. After aggregating the operation results, the native database corresponding to each application server can be called to perform the atomic operation.

[0077] In the embodiment of the present application, the first adapter obtains the execution result of the second operation instruction and sends the first execution result of the second operation instruction to the first distributed coordination component; the first distributed coordination component obtains the first execution result and the second execution result of the second database integration module, and based on whether the first execution result and the second execution result are executable, the first distributed coordination component notifies the database integration modules within the database integration cluster to execute the operation corresponding to the second operation instruction when the first execution result and the second execution result are executable. Since the atomic operations of each database are split through the adapters of each database adaptation module, the adaptation of different databases is completed, and the ACID principle is implemented in a distributed environment.

[0078] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the adapter-based database integration method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0079] This application also provides a database integration method based on adapter, please refer to Figure 4 , Figure 4 This is a schematic diagram of the workflow of the adapter-based database integration method according to an embodiment of the present application. The adapter-based database integration method includes:

[0080] Step S10: When a first operation instruction sent by a user terminal is obtained, the first database integration module translates the first operation instruction into a second operation instruction; the first database integration module is any database integration module in the database integration cluster;

[0081] Step S20: When the second operation instruction is a logic operation instruction, the first database integration module notifies the second database integration module to execute the operation corresponding to the second operation instruction; the second database integration module is another database integration module in the database integration cluster except the first database integration module;

[0082] Step S30: the first database integration module executes the operation corresponding to the second operation instruction based on the adapter.

[0083] The adapter-based database integration method provided in this application, utilizing the adapter-based database integration system described in the aforementioned embodiments, can address the technical issue of traditional database integration methods' difficulty adapting to highly differentiated databases. Compared to existing technologies, the adapter-based database integration method provided in this application offers the same beneficial effects as the adapter-based database integration system described in the aforementioned embodiments. Other technical features of the adapter-based database integration method are the same as those disclosed in the aforementioned embodiments and are not further elaborated here.

[0084] The present application provides an adapter-based database integration device, which includes: at least one processor; and a memory communicatively connected 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 execute the adapter-based database integration method in the above-mentioned embodiment 1.

[0085] Reference below Figure 5 , which shows a schematic diagram of the structure of an adapter-based database integration device suitable for implementing embodiments of the present application. The adapter-based database integration device in embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The adapter-based database integration device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0086] like Figure 5As shown, the adapter-based database integration device may include a processing device 1001 (e.g., a central processing unit, graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the adapter-based database integration device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007, such as a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008, such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003, such as a magnetic tape or hard disk; and communication device 1009. The communication device 1009 can allow the adapter-based database integration device to communicate with other devices wirelessly or by wire to exchange data. Although the diagram shows the adapter-based database integration device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have alternatively.

[0087] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0088] The adapter-based database integration device provided in this application, utilizing the adapter-based database integration method described in the aforementioned embodiment, can address the technical issue of traditional database integration methods' difficulty adapting to highly differentiated databases. Compared to existing technologies, the adapter-based database integration device provided in this application offers the same beneficial effects as the adapter-based database integration method described in the aforementioned embodiment. Other technical features of this adapter-based database integration device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.

[0089] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0090] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0091] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, wherein the computer-readable program instructions are used to execute the adapter-based database integration method in the above embodiment.

[0092] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0093] The computer-readable storage medium may be included in the adapter-based database integration device, or may exist independently without being assembled into the adapter-based database integration device.

[0094] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the adapter-based database integration device, the adapter-based database integration device:

[0095] When the first database integration module obtains the first operation instruction sent by the user terminal, the first operation instruction is translated into a second operation instruction; the first database integration module is any database integration module in the database integration cluster;

[0096] When the second operation instruction is a logic operation instruction, the first database integration module will notify the second database integration module to execute the operation corresponding to the second operation instruction; the second database integration module is another database integration module in the database integration cluster except the first database integration module;

[0097] The first database integration module executes the operation corresponding to the second operation instruction based on the adapter.

[0098] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0099] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0100] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0101] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the adapter-based database integration method described above. This computer-readable storage medium can address the technical issue of traditional database integration methods being unable to adapt to highly differentiated databases. Compared to existing technologies, the computer-readable storage medium provided in this application offers the same beneficial effects as the adapter-based database integration method provided in the aforementioned embodiments, and will not be elaborated upon here.

[0102] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned adapter-based database integration method when executed by a processor.

[0103] The computer program product provided in this application can address the technical issue of traditional database integration methods being unable to adapt to highly differentiated databases. Compared to the prior art, the beneficial effects of the computer program product provided in this application are similar to those of the adapter-based database integration method provided in the aforementioned embodiment, and are not further elaborated here.

[0104] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A database integration system based on an adapter, characterized in that: The system includes: a database integration cluster; The database integration cluster includes several database integration modules; The first database integration module is configured to translate a first operation instruction sent by a user terminal into a second operation instruction upon obtaining the first operation instruction; The first database integration module is any database integration module in the database integration cluster; The first database integration module is further configured to, when the second operation instruction is a logic operation instruction, notify the second database integration module to execute the operation corresponding to the second operation instruction; The second database integration module is another database integration module in the database integration cluster except the first database integration module; The first database integration module is further configured to execute the operation corresponding to the second operation instruction based on the adapter; The system further comprises: a cluster building module; The cluster building module is used to obtain database links and server cluster parameters; The cluster building module is further used to build a database integration cluster based on the database link and the server cluster parameters; The cluster building module is further configured to generate a topology structure of a database integration module under the database integration cluster based on the server cluster parameters; In the database integration cluster, the database integration module corresponds to the database; The first database integration module includes: a first translator, a first distributed coordination component and a first adapter; The translator is configured to, upon receiving a first operation instruction sent by a user, translate the first operation instruction into a second operation instruction of the database corresponding to the first database integration module; The first distributed coordination component is configured to identify the second operation instruction and start a flexible transaction when the second operation instruction is a logical operation instruction; The first distributed coordination component is further configured to notify the second database integration module to pre-execute an operation corresponding to the second operation instruction; The first distributed coordination component is further configured to send the second operation instruction to the first adapter; The first adapter is configured to pre-execute an operation corresponding to the second operation instruction; The second adapter is used to pre-execute the operation corresponding to the second operation instruction. The second adapter is the adapter of the second database integration module.

2. The adapter-based database integration system according to claim 1, wherein: The first adapter is further configured to obtain an execution result of the second operation instruction, and send the first execution result of the second operation instruction to the first distributed coordination component; The first distributed coordination component is further configured to obtain the first execution result and the second execution result of the second database integration module, and determine whether execution is possible based on the first execution result and the second execution result; The first distributed coordination component is further configured to notify the database integration module in the database integration cluster to execute the operation corresponding to the second operation instruction when the first execution result and the second execution result are executable.

3. The adapter-based database integration system according to claim 2, wherein: The first adapter is further configured to roll back the first execution result and the second execution result obtained by the pre-execution when the first execution result and the second execution result are not executable.

4. The adapter-based database integration system according to claim 1, wherein: The first distributed coordination component is further configured to, when the second operation instruction is a query operation instruction, execute the operation corresponding to the second operation instruction through the first adapter, and call the query cache as the query result of the operation.

5. A database integration method based on an adapter, characterized in that: The method is based on the adapter-based database integration system according to any one of claims 1 to 4, and the method comprises: When the first database integration module obtains the first operation instruction sent by the user terminal, the first operation instruction is translated into a second operation instruction; The first database integration module is any database integration module in the database integration cluster; When the second operation instruction is a logic operation instruction, the first database integration module will notify the second database integration module to execute the operation corresponding to the second operation instruction; The second database integration module is another database integration module in the database integration cluster except the first database integration module; The first database integration module executes the operation corresponding to the second operation instruction based on the adapter; The system further includes: a cluster building module; the method further includes: The cluster building module obtains database links and server cluster parameters; The cluster building module builds a database integration cluster based on the database link and the server cluster parameters; The cluster construction module generates a topological structure of a database integration module under the database integration cluster based on the server cluster parameters; in the database integration cluster, the database integration module corresponds to the database; The first database integration module includes: a first translator, a first distributed coordination component and a first adapter; When the translator receives the first operation instruction sent by the user, the translator translates the first operation instruction into a second operation instruction of the database corresponding to the first database integration module; The first distributed coordination component identifies the second operation instruction, and when the second operation instruction is a logical operation instruction, starts a flexible transaction; The first distributed coordination component notifies the second database integration module to pre-execute an operation corresponding to the second operation instruction; The first distributed coordination component sends the second operation instruction to the first adapter; The first adapter pre-executes an operation corresponding to the second operation instruction; The second adapter pre-executes the operation corresponding to the second operation instruction, and the second adapter is the adapter of the second database integration module.

6. A database integration device based on an adapter, characterized in that: The device includes: a memory, a processor, and an adapter-based database integration program stored in the memory and executable on the processor, wherein the adapter-based database integration program is configured to implement the steps of the adapter-based database integration method according to claim 5 .

7. A storage medium, characterized in that: The storage medium stores an adapter-based database integration program, which, when executed by a processor, implements the steps of the adapter-based database integration method according to claim 5 .

Citation Information

Patent Citations

  • Database adaptation method and device based on JDBC

    CN116089542A