Database object management method and device, equipment and storage medium

By dynamically managing the database object pool, adjusting the acquisition and release of objects according to business needs, the problem of resource waste in the existing technology is solved, resource release in the leisure time of business and resource expansion at the peak of business, and supporting multi-threaded concurrency.

CN119201939APending Publication Date: 2024-12-27HNAC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411263290.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, the management method of database objects usually uses a fixed number of object pools, resulting in wasting system resources in the leisure time of business and the inability to dynamically adjust resource usage.

Method used

By receiving a database object acquisition request, we judge whether there are objects in the object pool that meet the conditions, and take out the object when it exists and put it back into the pool after returning; if the object is idle for more than the threshold, delete the object, dynamically manage the object pool, and create a new one. Or wait for the object to meet business needs.

Benefits of technology

It realizes automatic release of system resources in business leisure, dynamically manages database objects, reduces resource waste, and supports multi-threaded and business-changing concurrent requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201939A_ABST
    Figure CN119201939A_ABST
Patent Text Reader

Abstract

The invention provides a database object management method and device, equipment and a storage medium. The database object management method comprises the following steps: receiving a database object acquisition request sent by a first thread; if it is determined that the first database object meeting the object obtaining condition exists in the object pool, the first database object in the object pool is extracted based on the database object obtaining request, so that the first thread executes database operation based on the first database object; receiving a first database object returned by the first thread, and putting the first database object back to the object pool; and determining and deleting a second database object meeting the object release condition in the object pool. By means of the method, after the first database object is taken out to execute related operation and returned, the second database object meeting the object release condition in the object pool is determined and deleted, system resources can be automatically released in business leisure time, and therefore dynamic management of the database objects is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for managing database objects. Background Art

[0002] In the prior art, an object pool is used to manage database objects. Currently, the method of managing database objects through an object pool often only sets a fixed number of database objects. In order to support multi-threaded access, a large number of database objects are often preset, which will cause a waste of system resources when the business is idle. Summary of the invention

[0003] In view of this, the purpose of the present application is to provide a database object management method, apparatus, device and storage medium to dynamically use resources to adapt to business changes and reduce the waste of system resources.

[0004] To achieve the above objectives, the present application discloses the following technical solutions:

[0005] In a first aspect, the present application provides a method for managing a database object, comprising:

[0006] receiving a database object acquisition request sent by a first thread, wherein the database object acquisition request is used to request to acquire a first database object in an object pool;

[0007] Determine whether there is a first database object that meets the object acquisition condition in the object pool;

[0008] If it is determined that there is a first database object that meets the object acquisition condition in the object pool, taking out the first database object in the object pool based on the database object acquisition request, so that the first thread performs a database operation based on the first database object;

[0009] receiving a first database object returned by the first thread, and putting the first database object back into the object pool;

[0010] Determine a second database object in the object pool that meets the object release condition, where the second database object is a database object in the object pool other than the first database object;

[0011] The second database object is deleted from the object pool.

[0012] Optionally, the determining the second database object in the object pool that meets the object release condition includes:

[0013] Detecting the usage record time of the second database object;

[0014] determining an idle time of the second database object based on the usage record time;

[0015] The second database object whose idle time exceeds the time threshold is determined as the second database object that meets the object release condition.

[0016] Optionally, the method further includes: if it is determined that there is no first database object satisfying the object acquisition condition in the object pool, creating the first database object.

[0017] Optionally, if it is determined that there is no first database object satisfying the object acquisition condition in the object pool, then creating the first database object comprises:

[0018] If it is determined that there is no first database object satisfying the object acquisition condition in the object pool and the number of created objects in the object pool is less than a first quantity threshold, then the first database object is newly created.

[0019] Optionally, the method further includes:

[0020] If it is determined that there is no first database object satisfying the object acquisition condition in the object pool and the number of created objects in the object pool is greater than or equal to the first quantity threshold, wait for the second thread to return the first database object.

[0021] Optionally, before receiving the database object acquisition request, the method further includes:

[0022] Get database connection request;

[0023] The first database object is established according to the database connection request.

[0024] In a second aspect, the present application provides a database object management device, including:

[0025] A receiving unit, configured to receive a database object acquisition request sent by a first thread, wherein the database object acquisition request is used to request to acquire a first database object in an object pool;

[0026] A determination unit, used to determine whether there is a first database object that meets the object acquisition condition in the object pool;

[0027] a fetching unit, configured to fetch the first database object from the object pool based on a database object fetching request if it is determined that there is a first database object satisfying the object fetching condition in the object pool, so that the first thread performs a database operation based on the first database object;

[0028] The receiving unit is further configured to receive a first database object returned by the first thread;

[0029] The determining unit is further used to determine a second database object in the object pool that meets the object release condition, where the second database object is a database object in the object pool other than the first database object;

[0030] A deleting unit is used to delete the second database object from the object pool.

[0031] Optionally, the determining unit specifically includes:

[0032] A detection subunit, used for detecting the usage record time of the second database object;

[0033] a determination subunit, configured to determine an idle time of the second database object based on the usage record time;

[0034] The determining subunit is further configured to determine the second database object whose idle time exceeds a time threshold as the second database object that meets the object release condition.

[0035] In a third aspect, the present application provides a database object management device, including:

[0036] Memory for storing computer programs;

[0037] A processor is used to execute the computer program stored in the memory to implement the steps of the database object management method provided in the first aspect.

[0038] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of the database object management method provided in the first aspect.

[0039] The present application provides a database object management method, device, equipment and storage medium. In a database object management method, a database object acquisition request sent by a first thread is received, and the database object acquisition request is used to request to obtain a first database object in an object pool; determine whether there is a first database object that meets the object acquisition condition in the object pool; if it is determined that there is a first database object that meets the object acquisition condition in the object pool, then take out the first database object in the object pool based on the database object acquisition request, so that the first thread performs a database operation based on the first database object; receive the first database object returned by the first thread, and put the first database object back into the object pool; determine a second database object in the object pool that meets the object release condition, and the second database object is a database object other than the first database object in the object pool; delete the second database object from the object pool. Through the above method, after taking out the first database object to perform related operations and returning, the second database object that meets the object release condition in the object pool is determined and deleted, so that system resources can be automatically released when the business is idle, thereby realizing dynamic management of database objects. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 It is a flowchart of a method for managing a database object provided in an embodiment of the present application;

[0042] Figure 2 It is a flowchart of another database object management method provided by an embodiment of the present application;

[0043] Figure 3 It is a structural diagram of a database object management device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] To facilitate understanding of the technical solution provided by the present application, a database object management method provided by the present application will be described below in conjunction with the accompanying drawings. Figure 1 , which is a schematic diagram of a process flow of a database object management method provided by an embodiment of the present application, such as Figure 1 As shown, the method includes S101-S106. The present application can be applied to any system for managing an object pool.

[0046] S101: receiving a database object acquisition request sent by a first thread, where the database object acquisition request is used to request to acquire a first database object in an object pool.

[0047] It is understandable that the first thread can be any thread that needs to call a database object. All threads need to call database objects during execution to complete corresponding operations, and each thread will only use one object for execution. Database objects refer to various entities and structures used to store and manage data in a database. Database objects may include one or more of the following: tables, views, indexes, triggers, stored procedures, functions, sequences, synonyms, and constraints. In the embodiment of the present application, any one or more database objects may be provided in the object pool, and the first database object is any database object in the object pool.

[0048] S102: Determine whether there is a first database object that meets the object acquisition condition in the object pool.

[0049] In the embodiment of the present application, after receiving a database object acquisition request, it is determined whether there is a first database object that meets the object acquisition condition in the object pool.

[0050] S103: If it is determined that there is a first database object that meets the object acquisition condition in the object pool, the first database object in the object pool is retrieved based on the database object acquisition request, so that the first thread performs a database operation based on the first database object.

[0051] The present application does not limit the specific content of the object acquisition condition. As a possible implementation method, the object acquisition condition may be that the object pool is not empty. If it is determined that there is a first database object that meets the object acquisition condition in the object pool, it includes: if the object pool is not empty, then it is determined that there is a first database object that meets the object acquisition condition in the object pool.

[0052] The present application does not limit the specific method of retrieving the first database object in the object pool based on the database object acquisition request. As an example, the present application can retrieve the database object at the top of the object pool as the first database object and send it to the first thread so that the first thread performs database operations based on the first database object.

[0053] The present application does not limit the specific content of the database operation, and the database operation can satisfy any database operation of the Structured Query Language (SQL) command.

[0054] S104: Receive the first database object returned by the first thread, and put the first database object back into the object pool.

[0055] In the embodiment of the present application, after the first thread completes executing the database operation based on the first database object, it is necessary to put the first database object back into the object pool.

[0056] S105: Determine a second database object in the object pool that meets the object release condition, where the second database object is a database object in the object pool other than the first database object.

[0057] In an embodiment of the present application, after the first database object is put back into the object pool, it will be checked whether there is a second database object in the object pool that meets the object release condition. It can be understood that the second database object is a database object in the object pool other than the first database object, that is, the present application checks the database objects in the object pool other than the first database object that has just been put back.

[0058] The present application does not limit the specific method of determining the second database object in the object pool that meets the object release condition. As a possible implementation method, the present application may determine the second database object in the object pool that meets the object release condition by using a least recently used algorithm (LRU). Specifically, determining the second database object in the object pool that meets the object release condition includes the following steps A1-A3:

[0059] A1: Detect the usage record time of the second database object.

[0060] In the embodiment of the present application, when each database object is called by a thread, the time when each database object is called is recorded as the usage record time. As an example, the usage record time can be accurate to seconds.

[0061] A2: Determine the idle time of the second database object based on the usage record time.

[0062] In an embodiment of the present application, after obtaining the usage record time of each second database object, the idle time of the second database object can be determined based on the usage record time. The present application does not limit the determination of the idle time of the second database object based on the usage record time. As a possible implementation method, the present application can obtain the current time and compare the current time with the last time the second database object was called to obtain the idle time of the second database object. The idle time of the second database object means the time when the second database object has not been called by a thread.

[0063] A3: Determine the second database object whose idle time exceeds the time threshold as the second database object that meets the object release condition.

[0064] In the embodiment of the present application, after the idle time of the second database object is determined, it is determined whether the idle time of the second database object exceeds the time threshold. It can be understood that if the idle time of the second database object exceeds the time threshold, it means that the idle time of the second database object is too long. Since the execution of each thread needs to take out a database object for execution, it means that there is a database object that has not been taken out for a long time, and the business is relatively idle. Therefore, the second database object whose idle time exceeds the time threshold can be regarded as the second database object that meets the object release condition and is subsequently deleted to release more system resources.

[0065] This application does not limit the specific duration of the time threshold, and the specific duration of the time threshold can be flexibly adjusted according to actual needs.

[0066] S106: Deleting the second database object from the object pool.

[0067] In the embodiment of the present application, after determining that the second database object needs to be deleted, the second database object can be deleted from the object pool.

[0068] Through the above method, after taking out the first database object to perform related operations and return, the second database object that meets the object release condition in the object pool is determined and deleted, so that system resources can be automatically released when the business is idle, thereby realizing dynamic management of database objects.

[0069] In addition, the present application supports multiple database objects and supports multi-threading. The database objects used by each thread are different and do not interfere with each other, thus reducing the competition caused by competing database objects and reducing synchronization overhead.

[0070] As a possible implementation manner, the method provided in the present application further includes: if it is determined that there is no first database object satisfying the object acquisition condition in the object pool, then creating a new first database object.

[0071] In the embodiment of the present application, the object acquisition condition recorded above may be that the object pool is not empty as an example. If it is determined that the first database object that meets the object acquisition condition does not exist in the object pool, it includes: if the object pool is empty, determining that the first database object that meets the object acquisition condition does not exist in the object pool.

[0072] It is understandable that if the first database object that meets the object acquisition condition does not exist in the object pool, the application can also automatically create a new first database object so as to complete the execution of the first thread based on the newly created first database object. In this way, the application can automatically create a new database object and automatically expand resources to support more concurrent requests when the business is urgent and concurrent.

[0073] This application is not limited. As a possible implementation, if it is determined that there is no first database object that meets the object acquisition condition in the object pool, then a new first database object is created, including:

[0074] If it is determined that there is no first database object satisfying the object acquisition condition in the object pool and the number of created objects in the object pool is less than the first quantity threshold, a new first database object is created.

[0075] It is understandable that, after determining that there is no first database object satisfying the object acquisition condition in the object pool, the present application will further determine whether the number of objects created in the object pool is less than the first quantity threshold. It is understandable that the first quantity threshold is used to represent the maximum number of objects in the object pool.

[0076] The present application creates a new first database object only when there is no first database object that meets the object acquisition condition in the object pool and the number of objects already created in the object pool is less than the first quantity threshold. The present application sets the first quantity threshold to avoid creating too many first database objects and occupying too many system resources.

[0077] As a possible implementation, if it is determined that there is no first database object satisfying the object acquisition condition in the object pool and the number of created objects in the object pool is greater than or equal to the first quantity threshold, wait for the second thread to return the first database object.

[0078] In the embodiment of the present application, the second thread is also a thread that needs to call a database object. When the present application determines that there is no first database object that meets the object acquisition condition in the object pool, and the number of objects that have been built in the object pool is greater than or equal to the first quantity threshold, the present application will not create a new first database object, but wait for other threads to return the first database object. It can be understood that the execution of each thread will only use one database object, and as long as any database object returns to the object pool, it can continue to be called by the first thread, further realizing the dynamic management of database objects.

[0079] As a possible implementation, before receiving a database object acquisition request, a database object management method provided by the present application further includes the following steps:

[0080] B1: Get database connection request.

[0081] In the embodiment of the present application, the present application does not limit the specific content of the database connection request. As an example, the database connection request may include: database port, database IP address, user name, password, etc.

[0082] B2: Create a first database object according to the database connection request.

[0083] The present application does not limit the specific number of first database objects established. As a possible implementation method, the present application can only establish one first database object to avoid occupying too many system resources. The creation and deletion of subsequent database objects can refer to the above, thereby effectively realizing the dynamic management of database objects.

[0084] As another possible implementation, the database connection request may also include the required number of first database objects to be established. The present application may establish the first database object according to the required number so that the number of established first database objects is the same as the required number.

[0085] The present application is further described below in conjunction with specific application scenarios. Figure 2 As shown, Figure 2 A flowchart of another method for managing a database object provided in an embodiment of the present application. The present application takes the MyDbLib object as an example to illustrate the solution of the present application. The MyDbLib object is a database base class, including connection, release, and command execution interfaces. The present application can achieve the management of the MyDbLib object by setting the DbLib class. It can be understood that the DbLib class is a class for managing the MyDbLib object and is also a singleton interface class for the outside world.

[0086] When the technical solution of this application is executed, the following processes are realized:

[0087] First, initialization will be performed, and the initialization process includes C11-C12:

[0088] C11: First set the maximum value of the object pool and the release time of the object when it is inactive. It can be understood that the maximum value of the object pool is the first quantity threshold recorded above, and the release time of the object when it is inactive is the time threshold recorded above.

[0089] C12: Pass in the connection information and automatically create the first database MyDbLib object.

[0090] Secondly, the multi-threaded business starts: The execution process of the multi-threaded business includes the following steps:.

[0091] C2: Receive a database object acquisition request and obtain a database object from the object pool queue. There are three cases for obtaining database objects: a, b, and c:

[0092] a) If the object pool queue is not empty, a MyDbLib object is returned directly from the top of the object pool;

[0093] b) If the object pool queue is empty and the number of created objects is less than the maximum value of the object pool, a new MyDbLib object is created and returned.

[0094] c) If the object pool queue is empty and the number of created objects is not less than the maximum value of the object pool, wait for other processes to put the borrowed objects back into the object pool, and then return a MyDbLib object from the object pool.

[0095] C3: Use the MyDbLib object to perform database operations, obtain execution results, and record the usage time of this object.

[0096] C4: Put the MyDbLib object back into the object pool.

[0097] C5: After putting it back, perform LRU check; LRU check is to check objects other than the MyDbLib object just put back. It can be understood that the LRU check is to determine whether the idle time of the MyDbLib object is too long, so as to delete the MyDbLib object that has been idle for too long from the object pool and release the database connection.

[0098] Through the above method, a new database object can be automatically created, so that when there are many urgent concurrent businesses, resources can be automatically expanded. Through the above method, MyDbLib objects that have been idle for too long in the object pool can also be determined and deleted, so that system resources can be automatically released when the business is idle, thereby realizing dynamic management of database objects.

[0099] In addition, the present application can also develop related components based on the above method, and the components can implement the steps provided in the above embodiment, and reduce the pressure of application use by managing the resources of the components. The components developed by the above method do not use the thread pool, and the object pool will also be dynamically managed according to the business concurrency, which will not cause waste of system resources. In addition, the components developed by the above method solve the problem of single operation object in singleton mode. The singleton of this solution supports multiple database objects and supports multi-threading. The database objects used by each thread are different and do not interfere with each other.

[0100] See also Figure 3 , Figure 3 A schematic diagram of the structure of a database object management device provided by an embodiment of the present invention, the device includes a receiving unit 301, a determining unit 302, a fetching unit 303 and a deleting unit 304.

[0101] The receiving unit 301 is used to receive a database object acquisition request sent by a first thread, where the database object acquisition request is used to request to acquire a first database object in an object pool;

[0102] A determination unit 302 is used to determine whether there is a first database object that meets the object acquisition condition in the object pool;

[0103] The fetching unit 303 is configured to fetch the first database object in the object pool based on the database object fetching request if it is determined that there is a first database object satisfying the object fetching condition in the object pool, so that the first thread performs a database operation based on the first database object;

[0104] The receiving unit 301 is further configured to receive a first database object returned by the first thread;

[0105] The determining unit 302 is further configured to determine a second database object in the object pool that meets the object release condition, where the second database object is a database object in the object pool other than the first database object;

[0106] The deleting unit 304 is configured to delete the second database object from the object pool.

[0107] Through the above device, after taking out the first database object to perform related operations and returning, the second database object that meets the object release condition in the object pool is determined and deleted, which can automatically release system resources when the business is idle, thereby realizing dynamic management of database objects.

[0108] As a possible implementation manner, the determining unit 302 specifically includes:

[0109] A detection subunit, used for detecting the usage record time of the second database object;

[0110] a determination subunit, configured to determine an idle time of the second database object based on the usage record time;

[0111] The determining subunit is further configured to determine the second database object whose idle time exceeds a time threshold as the second database object that meets the object release condition.

[0112] As a possible implementation manner, the device further includes:

[0113] The new creation unit is used to create the first database object if it is determined that there is no first database object meeting the object acquisition condition in the object pool.

[0114] As a possible implementation manner, the creating unit is specifically configured to create the first database object if it is determined that there is no first database object satisfying the object acquisition condition in the object pool and the number of created objects in the object pool is less than a first quantity threshold.

[0115] As a possible implementation, the device further includes: a waiting unit,

[0116] The waiting unit is used to wait for the second thread to return the first database object if it is determined that there is no first database object meeting the object acquisition condition in the object pool and the number of created objects in the object pool is greater than or equal to the first quantity threshold.

[0117] As a possible implementation manner, the device further includes:

[0118] The acquisition unit is also used to acquire a database connection request.

[0119] An establishing unit is used to establish the first database object according to the database connection request.

[0120] The present application also provides a database object management device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the terminal may also include various network interfaces, power supplies and other components.

[0121] It should be noted that a database object management device provided in an embodiment of the present application has the technical effects of any of the above embodiments, and the embodiments of the present application are not described in detail here.

[0122] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0123] It should be noted that a computer-readable storage medium provided in an embodiment of the present application has the technical effects of any of the above embodiments, and the embodiments of the present application are not described in detail here.

[0124] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0125] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0126] Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for managing database objects, characterized in that: The method comprises: receiving a database object acquisition request sent by a first thread, wherein the database object acquisition request is used to request to acquire a first database object in an object pool; Determine whether there is a first database object that meets the object acquisition condition in the object pool; If it is determined that there is a first database object that meets the object acquisition condition in the object pool, taking out the first database object in the object pool based on the database object acquisition request, so that the first thread performs a database operation based on the first database object; receiving a first database object returned by the first thread, and putting the first database object back into the object pool; Determine a second database object in the object pool that meets the object release condition, where the second database object is a database object in the object pool other than the first database object; The second database object is deleted from the object pool.

2. The method according to claim 1, characterized in that The step of determining a second database object in the object pool that meets the object release condition includes: Detecting the usage record time of the second database object; determining an idle time of the second database object based on the usage record time; The second database object whose idle time exceeds the time threshold is determined as the second database object that meets the object release condition.

3. The method according to claim 1, characterized in that The method further includes: if it is determined that there is no first database object satisfying the object acquisition condition in the object pool, creating the first database object.

4. The method according to claim 3, characterized in that If it is determined that there is no first database object satisfying the object acquisition condition in the object pool, then creating the first database object comprises: If it is determined that there is no first database object satisfying the object acquisition condition in the object pool and the number of created objects in the object pool is less than a first quantity threshold, then the first database object is newly created.

5. The method according to claim 4, characterized in that The method further comprises: If it is determined that there is no first database object satisfying the object acquisition condition in the object pool and the number of created objects in the object pool is greater than or equal to the first quantity threshold, wait for the second thread to return the first database object.

6. The method according to claim 1, characterized in that Before receiving the database object acquisition request, the method further includes: Get database connection request; The first database object is established according to the database connection request.

7. A database object management device, characterized in that: The device comprises: A receiving unit, configured to receive a database object acquisition request sent by a first thread, wherein the database object acquisition request is used to request to acquire a first database object in an object pool; A determination unit, used to determine whether there is a first database object that meets the object acquisition condition in the object pool; a fetching unit, configured to fetch the first database object from the object pool based on a database object fetching request if it is determined that there is a first database object satisfying the object fetching condition in the object pool, so that the first thread performs a database operation based on the first database object; The receiving unit is further configured to receive a first database object returned by the first thread; The determining unit is further used to determine a second database object in the object pool that meets the object release condition, where the second database object is a database object in the object pool other than the first database object; A deleting unit is used to delete the second database object from the object pool.

8. The device according to claim 7, characterized in that The determining unit specifically includes: A detection subunit, used for detecting the usage record time of the second database object; a determination subunit, configured to determine an idle time of the second database object based on the usage record time; The determining subunit is further configured to determine the second database object whose idle time exceeds a time threshold as the second database object that meets the object release condition.

9. A database object management device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program stored in the memory to implement the steps of the method for managing a database object according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the steps of the database object management method according to any one of claims 1 to 6.