Method, device and equipment for remotely operating database and storage medium

By obtaining links to the target database from a database connection pool that supports different types of databases, the problem of being restricted by specific types of databases when operating the database remotely is solved, and seamless adaptation and operational experience for different types of databases are achieved.

CN120179716APending Publication Date: 2025-06-20GUANGDONG ESHORE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311757939.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The prior art is restricted by specific types of databases when operating databases remotely, increasing the difficulty of access and operation.

Method used

By getting the database operation request, building a session, and getting the link to the target database from a database connection pool that supports different types of databases, performing the database operation, and returning the result.

Benefits of technology

It realizes seamless adaptation to different types of databases, reduces the difficulty of access and operation, and provides a good remote operation experience for requesting objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179716A_ABST
    Figure CN120179716A_ABST
Patent Text Reader

Abstract

The invention provides a method, device and equipment for remotely operating a database and a storage medium, and the method for remotely operating the database comprises the steps: obtaining a database operation request of a request object, constructing a session according to the database operation request, according to the method, the link of the target database is obtained from the database connection pool, the corresponding link of the target database is provided for the request object by setting the database connection pool supporting the databases of different types, the databases of specific types are not limited, seamless adaptation to the databases of different types is facilitated, and the access and operation difficulty is reduced; and executing database operation on the target database according to the operation information and the link of the target database to obtain an operation result, returning the operation result to the request object, and providing good remote operation experience for the request object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of databases, and particularly to a method, apparatus, device, and storage medium for remotely operating a database. Background Art

[0002] In today's information age, as a core tool for information storage and retrieval, databases have been widely used in various fields. With the rapid development of the Internet and the emerging data processing requirements, the need for remotely operating databases has become increasingly prominent. Currently, remotely operating a database requires direct access to the target database and is limited to specific types of databases, so there are restrictions when accessing the database, increasing the difficulty of access and operation. Summary of the Invention

[0003] Embodiments of this application provide a method, apparatus, device, and storage medium for remotely operating a database to solve at least one problem existing in the related art. The technical solutions are as follows:

[0004] In a first aspect, embodiments of this application provide a method for remotely operating a database, including:

[0005] Obtain a database operation request of a request object, and construct a session according to the database operation request, where the database operation request includes operation information and database information;

[0006] According to the session and the database information, obtain a link to the target database from a database connection pool, where the database connection pool supports different types of databases;

[0007] Execute a database operation on the target database according to the operation information and the link to the target database to obtain an operation result;

[0008] Return the operation result to the request object.

[0009] In an implementation, the database information includes a database type and a database URL; the step of obtaining a link to the target database from a database connection pool according to the session and the database information includes:

[0010] Match the database type and database URL in the session with different types of databases supported by the database connection pool through a data source management module of the database connection pool, and determine the target type database and the link to the target type database from the database connection pool.

[0011] In an implementation, the step of executing a database operation on the target database according to the operation information and the link to the target database to obtain an operation result includes:

[0012] Establish a connection with the target database through the link of the target database;

[0013] Perform database operations on the target database according to the operation information to obtain an operation result.

[0014] In one implementation, the performing database operations on the target database according to the operation information to obtain an operation result includes:

[0015] When the operation information includes a query SQL, perform dynamic SQL parsing on the operation information to construct an SQL statement;

[0016] Create a Statement according to the SQL statement;

[0017] Execute the SQL statement through the Statement to obtain an execution result;

[0018] Perform construction processing on the execution result to obtain the operation result.

[0019] In one implementation, the creating a Statement according to the SQL statement includes:

[0020] Perform filling processing on the SQL statement to fill data for the placeholders in the SQL;

[0021] When the SQL statement is used for paging query, trigger a paging plugin, execute paging logic through the paging plugin, so that the SQL statement includes a spliced paging statement, and create a Statement using this SQL statement.

[0022] In one implementation, the performing construction processing on the execution result to obtain the operation result includes:

[0023] Extract data from the execution result to obtain an extraction result;

[0024] Construct a paging object according to the extraction result to determine the operation result.

[0025] In one implementation, the method further includes:

[0026] Perform availability detection on the link of the target database when the operation result is obtained;

[0027] When the link of the target database is available, return the link of the target database to the database connection pool;

[0028] When the link of the target database is unavailable, destroy the link of the target database.

[0029] In a second aspect, an embodiment of the present application provides a device for remotely operating a database, including:

[0030] A construction module, configured to obtain a database operation request of a request object, and construct a session according to the database operation request, where the database operation request includes operation information and database information;

[0031] An acquisition module, configured to obtain a link to a target database from a database connection pool according to the session and the database information, where the database connection pool supports different types of databases;

[0032] An execution module, configured to execute a database operation on the target database according to the operation information and the link to the target database to obtain an operation result;

[0033] A return module, configured to return the operation result to the request object.

[0034] In an implementation manner, the return module is further configured to:

[0035] When obtaining the operation result, perform an availability detection on the link to the target database;

[0036] When the link to the target database is available, return the link to the target database to the database connection pool;

[0037] When the link to the target database is unavailable, destroy the link to the target database.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory, where instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method in any implementation manner of the above aspects.

[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed, the method in any implementation manner of the above aspects is implemented.

[0040] The beneficial effects in the above technical solutions at least include:

[0041] By obtaining a database operation request of a request object and constructing a session according to the database operation request, the database operation request includes operation information and database information. According to the session and the database information, a link to a target database is obtained from a database connection pool. By setting up a database connection pool that supports different types of databases to provide a corresponding link to the target database for the request object, it is not limited to a specific type of database, which is beneficial for seamlessly adapting to different types of databases and reducing the difficulty of access and operation. According to the operation information and the link to the target database, a database operation on the target database is executed to obtain an operation result, and the operation result is returned to the request object, providing a good remote operation experience for the request object.

[0042] The above summary is only for the purpose of the specification and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will be readily apparent by reference to the drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In the drawings, unless otherwise specified, the same reference numerals throughout the several views denote the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0044] Figure 1 It is a schematic flowchart of the steps of a method for remotely operating a database according to an embodiment of the present application;

[0045] Figure 2 It is a schematic flowchart of remotely operating a database according to an embodiment of the present application;

[0046] Figure 3 It is a structural block diagram of a device for remotely operating a database according to an embodiment of the present application;

[0047] Figure 4 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] In the following, only some exemplary embodiments are briefly described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present application. Therefore, the drawings and the description are considered to be exemplary in nature rather than restrictive.

[0049] Refer to Figure 1 and Figure 2, showing a flowchart of a method for remotely operating a database according to an embodiment of the present application. The method for remotely operating a database may at least include steps S100 - S400:

[0050] S100. Obtain a database operation request of a request object, and construct a session according to the database operation request.

[0051] Optionally, the database operation request includes operation information and database information. The database information includes, but is not limited to, the URL of the database, the database type, the username and password, etc. The operation information includes, but is not limited to, the operation type (such as query, modification, reading metadata, etc. In this embodiment of the present application, query is taken as an example) and operation parameters (such as query SQL, modification SQL, which tables' metadata to read, the transaction isolation level, etc. In this embodiment of the present application, query SQL is set, and the default transaction isolation level).

[0052] S200. Obtain a link to the target database from the database connection pool according to the session and the database information.

[0053] Optionally, the database connection pool supports different types of databases. The database connection pool is managed by a data source management module, which can create connections / links to different types of databases and perform pooling management on the connections / links to provide an available data source for the session. At the same time, the data source management module provides a monitoring function for various metrics of the database connection pool, such as the number of active connections, the number of idle connections, the average database usage time, and other key metrics, facilitating users to adjust the parameters of the database connection pool and optimize resource configuration.

[0054] S300. Execute a database operation on the target database according to the operation information and the link to the target database to obtain an operation result.

[0055] S400. Return the operation result to the request object.

[0056] The method for remotely operating a database according to the embodiment of the present application can be executed by an electronic control unit, a controller, a processor, etc. of terminals such as a computer, a mobile phone, a tablet, a vehicle-mounted terminal, etc., or can also be executed by a cloud server, for example, executed by a system in the cloud server.

[0057] The technical solution of the embodiment of the present application obtains the database operation request of the request object and constructs a session according to the database operation request. The database operation request includes operation information and database information. According to the session and the database information, a link to the target database is obtained from the database connection pool. By setting up a database connection pool that supports different types of databases, a link to the corresponding target database is provided for the request object, without being limited to a specific type of database, which is conducive to seamlessly adapting to different types of databases and reducing the difficulty of access and operation. According to the operation information and the link to the target database, a database operation on the target database is performed to obtain an operation result, and the operation result is returned to the request object, providing a good remote operation experience for the request object.

[0058] In one implementation, in step S100, the system provides an external API interface: provides functional interfaces for the convenience of the user to call, such as SQL execution interfaces, database metadata extraction interfaces, database connection pool monitoring interfaces, etc. When the request object needs to operate on the database, it can remotely send a database operation request through the API interface. After the system receives the database operation request, a session is constructed through the session factory in response to the database operation request. In the embodiment of the present application, the system has a service session module: one database operation / usage is abstracted as one session, and in one session, the data source, transaction control, executor, log control, etc. used in this database operation / usage are managed.

[0059] In one implementation, step S200 is specifically: through the data source management module of the database connection pool, the database type and database URL in the session are matched with different types of databases supported by the database connection pool, and the target type database and the link to the target type database are determined from the database connection pool, so that the session obtains the link to the target type database.

[0060] In one implementation, step S300 includes steps S310 - S320:

[0061] S310. Establish a connection with the target database through the link to the target database.

[0062] Optionally, establish a connection with the target database through the link to the target database in the session.

[0063] S320. Perform a database operation on the target database according to the operation information to obtain an operation result.

[0064] Optionally, step S320 includes steps S3201 - S3204:

[0065] S3201. When the operation information includes a query SQL, perform dynamic SQL parsing on the operation information to construct an SQL statement.

[0066] In the embodiment of the present application, the system has an executor module, that is, a module that specifically executes a database operation / usage. A default executor can be constructed in the executor module, and it has a parameter processor and a Statement processor; specific database operations such as database queries, database data modification, metadata queries, and transaction control are implemented through the executor. Among them, the parameter processor is responsible for processing the request parameters of the executor and SQL dynamic parameters such as operation parameters. At the same time, if the SQL dynamic parameters such as operation parameters have specific tags, the specific tags in the SQL can be parsed through the tag parsing module of the system to implement dynamic SQL construction. In addition, the Statement processor: The JDBC operates the database mainly through the Statement, and this processor is responsible for constructing a Statement for the executor; the result processor: processes the execution result of the database operation, such as data filtering, mapping, etc., and provides the processed data to the executor.

[0067] Optionally, when the operation information includes a query SQL, perform dynamic SQL parsing on the operation information to construct the SQL statement to be executed.

[0068] The embodiment of the present application also provides a log module: providing the ability to add logs without invading the original logic. Users can write their own log components to monitor each stage of the execution process and JDBC native objects, and implement functions such as printing the executed SQL and transaction logs.

[0069] S3202. Create a Statement according to the SQL statement.

[0070] Optionally, process the request parameters of the executor and SQL dynamic parameters such as operation parameters through the parameter processor, and then use the Statement processor to perform filling processing on the SQL statement to fill data for the placeholders in the SQL. When the SQL statement is used for paging query, trigger the paging plugin, and execute the paging logic through the paging plugin, so that the SQL statement includes the spliced paging statement. For example, query the total number of records through the SQL, construct a paging object, splice the paging statement for the SQL, and finally create a Statement using this SQL statement.

[0071] It should be noted that the system provides a plugin module that defines the above paging plugin, and the plugin module provides the ability to add additional functions and processing without invading the original logic of the executor. Users can customize the plugin to proxy the methods at each stage of the executor. Such as paging plugins, SQL audit plugins, etc.

[0072] S3203. Execute the SQL statement through the Statement to obtain the execution result.

[0073] Optionally, execute an SQL statement through a Statement to perform a database operation and obtain an execution result.

[0074] S3204. Perform construction processing on the execution result to obtain an operation result.

[0075] Optionally, a result processor processes the result. For example, data extraction is performed on the execution result to obtain an extraction result, and a paging object is constructed based on the extraction result to determine the operation result. Among them, the operation result is returned to the request object.

[0076] In one implementation, the method for remotely operating a database according to an embodiment of the present application may further include steps S510 - S530:

[0077] S510. When an operation result is obtained, perform an availability detection on the link to the target database.

[0078] Optionally, when an operation result is obtained, perform an availability detection on the link to the target database to determine whether the link to the current target database is available.

[0079] S520. When the link to the target database is available, return the link to the target database to the database connection pool.

[0080] Optionally, when the link to the target database is available, return the link to the target database to the database connection pool for use when the same database needs to be called next time or by other users, and modify the link to the target database to an idle state without closing the link.

[0081] S530. When the link to the target database is unavailable, destroy the link to the target database.

[0082] In an embodiment of the present application, when the link to the target database is unavailable, the link to the target database is destroyed at this time.

[0083] Through the method according to an embodiment of the present application, at least the following effects can be achieved:

[0084] 1). The concept of database connection pool management is introduced, and optimizations are made for supporting multiple database types (such as MySQL, PG), realizing seamless adaptation to various mainstream databases, reducing the restrictions of database types on operations, thereby improving the adaptability and flexibility of database operations; through centralized management and reuse of database connections, the overhead caused by the establishment and disconnection of connections can be effectively reduced, thereby improving the performance and efficiency of database operations. This pooling management strategy provides better resource utilization and stability for the service of remotely operating a database;

[0085] 2) Breakthroughly introduce the proxy and plugin mechanisms, enabling users to achieve various customized function expansions through proxies, thereby meeting personalized needs in different application scenarios. This flexible plugin mechanism adds more scalability and customization to the service of remotely operating databases;

[0086] 3) Make the remote operation of databases not only limited to executing SQL statements to perform operations such as adding, deleting, and modifying databases, but also possess the ability to read database metadata, which is of great value for data analysis, data governance, and system optimization. By obtaining the structure information and metadata of the database, users can better understand the data model, thereby more effectively performing data operations and business analysis, providing users with more comprehensive database operation capabilities, and enabling them to handle data more flexibly in remote operations;

[0087] 4) Provide metadata support: The metadata of the database contains the database structure and information, which is of great value for data analysis, business optimization, etc. This invention has the function of reading database metadata, enabling users to better understand the database structure, and thus more effectively performing data processing and analysis;

[0088] 5) Promote the development of data-driven applications: Through innovative technologies, provide more powerful remote database operation capabilities for the field of data-driven applications, and promote the innovation and development of applications.

[0089] Refer to Figure 3 , which shows the structural block diagram of the device for remotely operating a database according to an embodiment of the present application. The device may include:

[0090] A construction module, configured to obtain a database operation request of a request object and construct a session according to the database operation request. The database operation request includes operation information and database information;

[0091] An acquisition module, configured to obtain a link to the target database from a database connection pool according to the session and the database information. The database connection pool supports different types of databases;

[0092] An execution module, configured to execute a database operation on the target database according to the operation information and the link to the target database to obtain an operation result;

[0093] A return module, configured to return the operation result to the request object.

[0094] In some embodiments, the return module is further configured to:

[0095] When obtaining the operation result, perform an availability detection on the link to the target database;

[0096] When the link to the target database is available, return the link to the target database to the database connection pool;

[0097] When the link to the target database is unavailable, destroy the link to the target database.

[0098] For the functions of each module in each device of the embodiments of the present application, reference may be made to the corresponding descriptions in the above methods, which will not be elaborated herein.

[0099] Refer to Figure 4 , which shows a structural block diagram of an electronic device according to an embodiment of the present application. The electronic device includes: a memory 310 and a processor 320. The memory 310 stores instructions that can run on the processor 320. The processor 320 loads and executes the instructions to implement the method for remotely operating a database in the above embodiments. Among them, the number of the memory 310 and the processor 320 can be one or more.

[0100] In one implementation, the electronic device further includes a communication interface 330 for communicating with external devices and performing data interaction and transmission. If the memory 310, the processor 320, and the communication interface 330 are implemented independently, the memory 310, the processor 320, and the communication interface 330 can be interconnected through a bus and complete communication with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 4 only a thick line is used to represent it in

[0101] Optionally, in a specific implementation, if the memory 310, the processor 320, and the communication interface 330 are integrated on a chip, the memory 310, the processor 320, and the communication interface 330 can complete communication with each other through an internal interface.

[0102] The embodiments of the present application provide a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the method for remotely operating a database provided in the above embodiments is implemented.

[0103] The embodiments of the present application further provide a chip, which includes a processor for calling and running instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the method provided in the embodiments of the present application.

[0104] An embodiment of the present application further provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is configured to execute the code in the memory. When the code is executed, the processor is configured to execute the method provided by the embodiment of the application.

[0105] It should be understood that the above-mentioned processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0106] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may further include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0107] In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0108] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0109] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present application, "a plurality of" means two or more unless otherwise specifically defined.

[0110] Any process or method description represented in the flowchart or described in other ways herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in a reverse order according to the involved functions, rather than in the order shown or discussed.

[0111] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatuses, or devices.

[0112] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above-described embodiment methods can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0113] In addition, each functional unit in various embodiments of the present application may be integrated into a processing module, or each unit may exist physically alone, or two or more units may be integrated into one module. The above integrated module may be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.

[0114] As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various changes or substitutions, and these should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for remotely operating a database, characterized in that, Including: Obtain a database operation request of a request object, and construct a session according to the database operation request, where the database operation request includes operation information and database information; According to the session and the database information, obtain a link to a target database from a database connection pool, where the database connection pool supports different types of databases; Execute a database operation on the target database according to the operation information and the link to the target database to obtain an operation result; Return the operation result to the request object.

2. The method for remotely operating a database according to claim 1, characterized in that: The database information includes a database type and a database URL; the obtaining a link to a target database from a database connection pool according to the session and the database information includes: Through a data source management module of the database connection pool, match the database type and database URL in the session with different types of databases supported by the database connection pool, and determine a target type database and a link to the target type database from the database connection pool.

3. The method for remotely operating a database according to claim 1 or 2, characterized in that: The executing a database operation on the target database according to the operation information and the link to the target database to obtain an operation result includes: Establish a connection with the target database through the link to the target database; Execute a database operation on the target database according to the operation information to obtain an operation result.

4. The method for remotely operating a database according to claim 3, characterized in that: The executing a database operation on the target database according to the operation information to obtain an operation result includes: When the operation information includes a query SQL, perform dynamic SQL parsing on the operation information to construct an SQL statement; Create a Statement according to the SQL statement; Execute the SQL statement through the Statement to obtain an execution result; Perform construction processing on the execution result to obtain the operation result.

5. The method for remotely operating a database according to claim 4, characterized in that: The creating a Statement according to the SQL statement includes: Perform filling processing on the SQL statement to fill data for placeholder in the SQL; When the SQL statement is used for paging query, trigger a paging plugin, execute paging logic through the paging plugin, so that the SQL statement includes a spliced paging statement, and create a Statement using the SQL statement.

6. The method for remotely operating a database according to claim 5, characterized in that: The performing construction processing on the execution result to obtain the operation result includes: Extract data from the execution result to obtain an extraction result; Construct a paging object according to the extraction result to determine the operation result.

7. The method for remotely operating a database according to claim 1, characterized in that: The method further includes: When obtaining the operation result, perform availability detection on the link to the target database; When the link to the target database is available, return the link to the target database to the database connection pool; When the link to the target database is unavailable, destroy the link to the target database.

8. An apparatus for remotely operating a database, characterized in that, Including: A construction module, configured to obtain a database operation request of a request object, and construct a session according to the database operation request, where the database operation request includes operation information and database information; An acquisition module, configured to obtain a link to a target database from a database connection pool according to the session and according to the database information, where the database connection pool supports different types of databases; An execution module, configured to execute a database operation on the target database according to the operation information and the link to the target database to obtain an operation result; A return module, configured to return the operation result to the request object.

9. An electronic device, characterized in that Comprising: A processor and a memory, where instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program which, when executed, implements the method according to any one of claims 1-7.