Database internal lightweight autonomous optimization system and method

By building the database autonomy function into the database and using components such as Server, Autonomous Manager and Module, the problems of high labor costs and low efficiency of external autonomous systems in traditional database management are solved, and efficient and standardized autonomous optimization is achieved.

CN120336285APending Publication Date: 2025-07-18上海沄熹科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510399049.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing database management methods rely on manual operations, resulting in high labor costs and potential failure risks. The external autonomous systems have problems such as low real-time and complex deployment.

Method used

Built into the database autonomy function, and realize the full process integration and management of autonomous tasks through Server, autonomous manager, autonomous module, autonomous data warehouse and autonomous result interface.

Benefits of technology

It improves the efficiency and scalability of autonomous optimization, simplifies the deployment process, reduces operation and maintenance costs, and ensures the standardization and real-time nature of autonomous functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336285A_ABST
    Figure CN120336285A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight autonomous optimization system and method in a database, and relates to the technical field of databases, and the system comprises a Server which is used as a core program for database operation, is synchronously started when the database is started, and bears important responsibilities for coordinating and managing various key operations of the database; the autonomous manager is responsible for comprehensively managing each autonomous module, formulating an overall autonomous task execution strategy according to the operation state of the database and a preset rule, and comprehensively arranging the working sequence and resource allocation of each autonomous module; at least one autonomous module, each autonomous module focuses on an autonomous task of a specified type, thereby realizing fine management of different functions; the autonomous data warehouse is used for storing intermediate data and a final result generated in the execution process of the autonomous task; and the autonomous result interface is used for assisting an external system to obtain an execution result of the autonomous task. According to the invention, various tasks of database autonomy are built in the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of databases, and specifically to a lightweight autonomous optimization system and method inside a database. Background Art

[0002] As a core component of modern information systems, the stable and efficient operation of a database is crucial for the normal development of various services, which is also the main goal that database management systems have always pursued. In practical applications, a database will face many problems such as performance degradation and unreasonable resource allocation due to factors such as continuous growth of data volume, increasing complexity of business logic, and changes in user access frequency. Therefore, the maintenance and optimization of the database are essential.

[0003] Under the traditional database management mode, these maintenance and optimization tasks mainly rely on database administrators (DBAs) to execute manually. The DBA needs to regularly perform tasks such as database performance monitoring, including checking metrics such as the CPU usage rate, memory occupancy, and disk I / O read and write speed of the database; performing database backup and recovery operations to ensure data security and recoverability; and performing database index optimization by adjusting the index structure to improve data query efficiency. However, this manual management method has many drawbacks. On the one hand, with the continuous increase in the scale and complexity of the database, the amount of data and workload that the DBA needs to handle increase exponentially. This not only requires the DBA to have profound professional knowledge and rich practical experience, but also requires a large amount of time and effort, and the labor cost is extremely high. On the other hand, manual operations are inevitably prone to human errors. Once the operation is improper, it may lead to database failures, affect the continuity of services, and cause immeasurable losses.

[0004] To overcome the limitations of the traditional database management method, modern databases are committed to achieving autonomous operation and maintenance optimization, that is, automatically completing database maintenance and optimization tasks by designing appropriate autonomous algorithms or tools. Currently, most autonomous systems are external to the database. The workflow of these external autonomous systems is usually as follows: First, relevant data is obtained from the database through specific data collection interfaces, such as the running status information of the database, table structure information, data access frequency, etc. Then, the collected data is extracted to an external system for storage and preprocessing. Next, autonomous algorithms are run in the external system, and the data is analyzed and processed according to preset rules and models to generate optimization strategies, such as adjusting the parameter configuration of the database, optimizing the query statement execution plan, etc. Finally, the optimization results obtained from the algorithm operation are applied back to the database to complete an autonomous optimization process.

[0005] However, this external autonomous system has obvious defects. First, during the process of data collection from the database to the external system and then applying the optimization results back to the database, multiple data transmissions and conversions are required. The load data makes a detour outside the database before returning to the database. This process not only increases the time overhead of data transmission but also may be affected by factors such as network latency and bandwidth limitations during data transmission, resulting in a significant reduction in the real-time performance of autonomy, low overall efficiency, and inability to respond promptly to the performance change requirements of the database. Second, since the autonomous tool runs independently of the database, a separate operating environment needs to be set up for it, including server resources, network configuration, etc. This undoubtedly increases the difficulty and cost of system deployment. In addition, during subsequent use, specialized operation and maintenance management of the autonomous tool are required, such as software version updates, fault troubleshooting and repair, etc., which is also a challenging task for operation and maintenance personnel. Summary of the Invention

[0006] In view of the requirements and deficiencies in the current technological development, the present invention provides a lightweight autonomous optimization system and method inside a database, which improves the development efficiency and scalability of autonomous optimization by internalizing various tasks of database autonomy within the database.

[0007] In a first aspect, for a lightweight autonomous optimization system inside a database according to the present invention, the technical solution adopted to solve the above technical problems is as follows:

[0008] A lightweight autonomous optimization system inside a database, which includes:

[0009] Server, as the core program for database operation, is synchronously started when the database starts and undertakes the important responsibility of coordinating and managing various key operations of the database;

[0010] The autonomous manager is responsible for comprehensively managing each autonomous module, formulating an overall autonomous task execution strategy according to the running state of the database and preset rules, and overall arranging the working order and resource allocation of each autonomous module;

[0011] At least one autonomous module, and each autonomous module focuses on a specified type of autonomous task, thereby realizing refined management of different functions;

[0012] The autonomous data warehouse is used to store intermediate data and final results generated during the execution of autonomous tasks;

[0013] The autonomous result interface is used to assist external systems in obtaining the execution results of autonomous tasks.

[0014] Optionally, the involved autonomous manager is integrated inside the Server;

[0015] When the Server starts, it will immediately trigger the startup of the autonomous manager, providing a basic environment for the operation of the autonomous function.

[0016] Optionally, the involved autonomous manager manages each autonomous module through the following steps:

[0017] First, identify and record all autonomous modules in the system, and collect information on the functions and resource requirements of each autonomous module;

[0018] Subsequently, based on the real-time operating status of the database and preset rules, formulate an overall autonomous task execution strategy, and coordinate the working order and resource allocation of each autonomous module;

[0019] Finally, send task startup instructions to each autonomous module according to the established working order.

[0020] Optionally, the involved autonomous modules carry out four major steps in sequence: initializing table creation, data collection and storage, algorithm operation and processing, and result application, to complete the full-process autonomous task from data acquisition to the implementation of optimization strategies, specifically including:

[0021] (1) Initialize the autonomous module and create Stage 1 and Stage 2 tables: When the autonomous module starts, the system performs initialization operations and creates two tables, Stage 1 and Stage 2, in the database. Among them, the Stage 1 table is used to temporarily store the original data collected from the database, and the Stage 2 table is used to store the operation results of the autonomous algorithm;

[0022] (2) Collect the original data and store it in the Stage 1 table: After initialization, the autonomous module collects data from the database data source according to preset rules and stores it in the Stage 1 table in real time, providing a basis for subsequent analysis and processing;

[0023] (3) Run the autonomous algorithm and store the results in the Stage 2 table: When the Stage 1 table has accumulated enough data, the autonomous module will trigger the operation of the internal autonomous algorithm, conduct in-depth analysis, calculation, and mining of the original data in the Stage 1 table, extract valuable information, and generate optimization strategies or decision-making suggestions, which are written into the Stage 2 table and wait to be applied;

[0024] (4) Apply the autonomous results: The autonomous module reads the operation results of the autonomous algorithm from the Stage 2 table and applies them to the database or related business systems.

[0025] Optionally, the involved system includes two-level switches, where:

[0026] The first-level switch is responsible for controlling the opening and closing of the autonomous manager;

[0027] The secondary switch, as a module switch, has the same number as and corresponds one-to-one with the number of autonomous modules, and is responsible for controlling the opening and closing of specific autonomous modules to achieve refined management of different functions.

[0028] In a second aspect, a lightweight autonomous optimization method for a database internal, the technical solution adopted to solve the above technical problems is as follows:

[0029] A lightweight autonomous optimization method for a database internal, based on the system described in the first aspect, includes the following steps:

[0030] Step 1: Start the Server and the autonomous manager;

[0031] Step 2: The autonomous manager overall manages the autonomous modules;

[0032] Step 3: The autonomous modules execute autonomous tasks;

[0033] Step 4: The autonomous data warehouse stores the intermediate data and final results generated during the task execution by the autonomous modules;

[0034] Step 5: The external system obtains the execution results of the autonomous tasks through the autonomous result interface.

[0035] Optionally, step S1 specifically includes:

[0036] The database starts, and the system loads the Server program;

[0037] The Server initializes its own configuration, creates necessary processes and threads, establishes a connection with the database, and at the same time scans and loads the internally integrated autonomous manager;

[0038] The autonomous manager conducts its own initialization, establishes a communication channel with the Server component, and ensures the smooth progress of subsequent work.

[0039] Optionally, step S2 specifically includes:

[0040] The autonomous manager first identifies and records all autonomous modules in the system, and collects the function and resource requirement information of each autonomous module;

[0041] The autonomous manager then formulates an overall autonomous task execution strategy based on the real-time running state of the database and preset rules, and arranges the work order and resource allocation of each autonomous module overall;

[0042] Finally, the autonomous manager sends task start instructions to each autonomous module according to the established work order.

[0043] Optionally, step S3 is executed. The autonomous module sequentially performs four major steps of initialization table creation, data acquisition and storage, algorithm operation and processing, and result application to complete the full-process autonomous task from data acquisition to the implementation of optimization strategies, specifically including:

[0044] Step S3.1: Initialize the autonomous module and create Stage 1 and Stage 2 tables. When the autonomous module starts, the system performs an initialization operation and creates two tables, Stage 1 and Stage 2, in the database. Among them, the Stage 1 table is used to temporarily store the raw data collected from the database, and the Stage 2 table is used to store the operation results of the autonomous algorithm.

[0045] Step S3.2: Collect raw data and store it in the Stage 1 table. After initialization, the autonomous module collects data from the database data source according to preset rules and stores it in the Stage 1 table in real time, providing a basis for subsequent analysis and processing.

[0046] Step S3.3: Run the autonomous algorithm and store the results in the Stage 2 table. When enough data has accumulated in the Stage 1 table, the autonomous module triggers the operation of the internal autonomous algorithm, deeply analyzes, calculates, and mines the raw data in the Stage 1 table, extracts valuable information, and generates optimization strategies or decision-making suggestions, which are written into the Stage 2 table and wait to be applied.

[0047] Step S3.4: Apply the autonomous results. The autonomous module reads the operation results of the autonomous algorithm from the Stage 2 table and applies them to the database or relevant business systems.

[0048] Optionally, the autonomous manager is controlled by a first-level switch to be turned on and off.

[0049] The autonomous module is controlled by a second-level switch to be turned on and off, and the second-level switch is a switch that controls the specific autonomous module separately on the basis that the autonomous manager has been started.

[0050] A lightweight autonomous optimization system and method inside a database according to the present invention has the beneficial effects compared with the prior art as follows:

[0051] The present invention integrates the autonomous function inside the database, which can improve the operation efficiency of autonomy and simplify the deployment process; modularizes the autonomous tasks of the database according to different autonomous functions, and each module can be controlled to be turned on and off by a switch, which can improve the development efficiency of the autonomous function; defines the standard process for developing autonomous modules, including four major steps of initialization table creation, data acquisition and storage, algorithm operation and processing, and result application, and each module uses this process for development, which can improve the standardization of database autonomy. Description of the Drawings

[0052] Appendix Figure 1 is the system architecture diagram of Embodiment 1 of the present invention;

[0053] Appendix Figure 2 is the method flowchart of Embodiment 2 of the present invention;

[0054] Appendix Figure 3 is the working flowchart of the storage parameter autonomous module of Embodiment 3 of the present invention. Detailed implementation manners

[0055] To make the technical solutions, the technical problems to be solved, and the technical effects of the present invention clearer and more understandable, the following describes the technical solutions of the present invention clearly and completely in conjunction with specific embodiments.

[0056] Embodiment 1:

[0057] Referring to Appendix Figure 1 , this embodiment proposes a lightweight autonomous optimization system inside a database, which includes:

[0058] Server, as the core program for database operation, is synchronously started when the database starts, and undertakes the important responsibility of coordinating and managing various key operations of the database;

[0059] The autonomous manager is integrated inside the Server and is automatically triggered to start after the Server starts. It is responsible for comprehensively managing each autonomous module, formulating an overall autonomous task execution strategy according to the running state of the database and preset rules, and overall arranging the working sequence and resource allocation of each autonomous module; it is controlled by a primary switch to turn on and off;

[0060] At least one autonomous module, each autonomous module focuses on a specified type of autonomous task, so as to achieve refined management of different functions; a secondary switch is used as the module switch, and the number of secondary switches is the same as and corresponds one-to-one with the number of autonomous modules, and is responsible for controlling the opening and closing of specific autonomous modules to achieve refined management of different functions;

[0061] The autonomous data warehouse is used to store intermediate data and final results generated during the execution of autonomous tasks;

[0062] The autonomous result interface is used to assist external systems in obtaining the execution results of autonomous tasks.

[0063] In this embodiment, the autonomous manager manages each autonomous module through the following steps:

[0064] First, identify and record all autonomous modules in the system, and collect the function and resource requirement information of each autonomous module;

[0065] Subsequently, according to the real-time operating status of the database and preset rules, an overall autonomous task execution strategy is formulated to overall arrange the working sequence and resource allocation of each autonomous module;

[0066] Finally, task start instructions are sent to each autonomous module according to the established working sequence.

[0067] In this embodiment, the involved autonomous modules carry out four major steps in sequence: initializing table creation, data collection and storage, algorithm operation and processing, and result application, to complete the full-process autonomous task from data acquisition to the implementation of optimization strategies, specifically including:

[0068] (1) Initialize the autonomous module and create Stage 1 and Stage 2 tables: When the autonomous module starts, the system performs initialization operations to create two tables, Stage 1 and Stage 2, in the database. Among them, the Stage 1 table is used to temporarily store the raw data collected from the database, and the Stage 2 table is used to store the operation results of the autonomous algorithm;

[0069] (2) Collect raw data and store it in the Stage 1 table: After initialization, the autonomous module collects data from the database data source according to preset rules and stores it in the Stage 1 table in real time to provide a basis for subsequent analysis and processing;

[0070] (3) Run the autonomous algorithm and store the results in the Stage 2 table: When the Stage 1 table has accumulated enough data, the autonomous module will trigger the operation of the internal autonomous algorithm to deeply analyze, calculate, and mine the raw data in the Stage 1 table, extract valuable information, and generate optimization strategies or decision-making suggestions, which are written into the Stage 2 table and waiting for application;

[0071] (4) Apply the autonomous results: The autonomous module reads the operation results of the autonomous algorithm from the Stage 2 table and applies them to the database or related business systems.

[0072] In terms of deployment, the autonomous optimization system is compiled together with the database. During the development and construction stage of the database, the code of the autonomous optimization framework is integrated with the core code of the database and compiled uniformly. After compilation, it is deployed to the target operating environment together with the release of the database. For users or operation and maintenance personnel, there is no need to perform additional complex deployment operations like external autonomous tools, such as configuring the server environment, installing specific software, and setting up network connections. Just install and start the database normally, and the embedded autonomous optimization function can be automatically obtained, greatly simplifying the usage process and reducing the usage threshold and overall cost.

[0073] Embodiment 2:

[0074] Based on the system of Embodiment 1, this embodiment proposes a lightweight autonomous optimization method inside a database, including the following steps:

[0075] Step 1: Start the Server and the autonomous manager, specifically including:

[0076] When the database starts, the system loads the Server program;

[0077] The Server initializes its own configuration, creates necessary processes and threads, establishes a connection with the database, and simultaneously scans and loads the internally integrated autonomous manager;

[0078] The autonomous manager conducts its own initialization, establishes a communication channel with the Server component, and ensures the smooth progress of subsequent work.

[0079] Step 2: The autonomous manager overall manages the autonomous modules, specifically including:

[0080] The autonomous manager first identifies and records all the autonomous modules in the system, and collects the function and resource requirement information of each autonomous module;

[0081] Subsequently, the autonomous manager formulates an overall autonomous task execution strategy according to the real-time running state of the database (including key indicators such as CPU usage rate, memory occupancy, data read and write frequency, etc.) and preset rules, and overall arranges the working order and resource allocation of each autonomous module (such as CPU time slices, memory space, etc.);

[0082] Finally, the autonomous manager sends task start instructions to each autonomous module according to the established working order.

[0083] The autonomous manager is controlled by a first-level switch to be turned on and off; the autonomous module is controlled by a second-level switch to be turned on and off, and the second-level switch is a switch that controls a specific autonomous module separately on the basis that the autonomous manager has been started.

[0084] Step 3: The autonomous modules sequentially carry out four major steps of initializing table creation, data collection and storage, algorithm operation and processing, and result application, and complete the full-process autonomous task from data acquisition to the implementation of the optimization strategy, referring to Appendix Figure 2 , specifically including:

[0085] Step S3.1: Initialize the autonomous module and create Stage 1 and Stage 2 tables: When the autonomous module starts, the system performs an initialization operation and creates two tables, Stage 1 and Stage 2, in the database. Among them, the Stage 1 table is used to temporarily store the original data collected from the database, and the Stage 2 table is used to store the operation results of the autonomous algorithm;

[0086] Step S3.2: Invoke the data collector to collect the original data and store it in the Stage 1 table. After initialization, the autonomous module collects data from the database data source according to the preset rules and stores it in the Stage 1 table in real time, providing a basis for subsequent analysis and processing.

[0087] Step S3.3: Run the autonomous algorithm and store the results in the Stage 2 table. When enough data has accumulated in the Stage 1 table, the autonomous module will trigger the operation of the internal autonomous algorithm to deeply analyze, calculate, and mine the original data in the Stage 1 table, extract valuable information, and generate optimization strategies or decision-making suggestions, which are written into the Stage 2 table and waiting to be applied.

[0088] Step S3.4: Apply the autonomous results. The autonomous module reads the operation results of the autonomous algorithm from the Stage 2 table and applies them to the database or relevant business systems.

[0089] Step 4: The autonomous data warehouse stores the intermediate data and final results generated by the autonomous module during the task execution process.

[0090] Specifically, the autonomous data warehouse classifies and stores data according to information such as data type and affiliated module, establishes an index for quick retrieval; regularly checks the stored data, deletes expired or useless data, and reclaims storage space; optimizes the storage structure of the data warehouse to improve the efficiency of data storage and query.

[0091] Step 5: The external system obtains the execution results of the autonomous task through the autonomous result interface.

[0092] Specifically, the external system sends a result acquisition request to the autonomous result interface according to the format and protocol specified by the interface; the autonomous result interface parses the request and verifies the legality and permissions of the request; after passing the verification, the interface retrieves the corresponding result data from the autonomous data warehouse; converts and encapsulates the retrieved data according to the format required by the external system, and finally returns it to the external system.

[0093] Embodiment 3:

[0094] Currently, some time-series storage spaces in the database are pre-allocated. For example, max_block_per_segment specifies the maximum number of blocks allowed to be stored in each segment, and max_rows_per_block defines the maximum number of rows allowed to be stored when allocating block space. If these parameters are too large, it will cause waste of storage space, and if they are too small, it will cause frequent creation of new storage objects. Therefore, certain autonomous algorithms can be used to automatically adjust these parameters according to historical behavior information to optimize the storage space.

[0095] Reference appendix Figure 1 and 3 To solve the above problems, taking the system of Embodiment 1 as an example and taking the storage parameter autonomy module as an example, the process of adding and running a specific autonomy module in the lightweight autonomy optimization system will be introduced.

[0096] 1. When the autonomy manager starts, it starts the storage parameter autonomy module it manages. When starting this module for the first time, the Stage 1 and Stage 2 tables are created in the way of "Create if not exists".

[0097] 2. It starts at 23:00 every day through the definition of the scheduler timer to start the autonomy data collection task. The data of each time series table is collected cyclically, including: (1) The number of newly added rows (insert_rows_per_day) from 23:00 the previous day to 23:00 today; (2) The total number of current devices (device_num). The collected data is stored in the table autonomy.ts_table_statistics.

[0098] 3. After the collection is completed, the autonomy algorithm is started. The autonomy algorithm takes the data collected in the previous step as input, calculates the autonomy result of each table as output, and stores the output autonomy result in the tables autonomy.ts_table_autonomy and autonomy.ts_segment_autonomy. The storage parameter autonomy algorithm is a rule-based algorithm, and each module needs to implement its own autonomy algorithm function.

[0099] 4. When the time series storage allocation module allocates new subgroups, segments, and blocks, it reads the autonomy result parameters for the allocation of new space.

[0100] In summary, by adopting a lightweight autonomy optimization system and method inside a database of the present invention, the entire autonomy function is built into the database in a lightweight manner, eliminating the process of additionally deploying and maintaining a new autonomy tool, greatly saving the deployment and maintenance costs; it can manage one or more autonomy modules, facilitating the rapid expansion of new autonomy functions; a unified autonomy process is specified for each autonomy module, including four major steps of initializing table creation, data collection and storage, algorithm operation and processing, and result application, ensuring the unity of the autonomy process.

[0101] The above specific application examples have elaborated in detail the principles and implementation manners of the present invention. These examples are only used to help understand the core technical content of the present invention. Based on the above specific embodiments of the present invention, any improvements and modifications made by those skilled in the art of this technical field without departing from the principles of the present invention shall fall within the scope of patent protection of the present invention.

Claims

1. A lightweight autonomous optimization system inside a database, characterized in that, It includes: Server, which is the core program running the database, starts synchronously when the database starts, and undertakes the important responsibility of coordinating and managing various key operations of the database; Autonomous Manager, which is responsible for comprehensively managing each autonomous module, formulates the overall autonomous task execution strategy according to the running state of the database and preset rules, and overall arranges the working order and resource allocation of each autonomous module; At least one autonomous module, and each autonomous module focuses on a specified type of autonomous task, so as to achieve refined management of different functions; Autonomous Data Warehouse, which is used to store the intermediate data and final results generated during the execution of autonomous tasks; Autonomous Result Interface, which is used to assist external systems in obtaining the execution results of autonomous tasks.

2. The lightweight autonomous optimization system inside a database according to claim 1, wherein The Autonomous Manager is integrated inside the Server; When the Server starts, it will immediately trigger the start of the Autonomous Manager, providing a basic environment for the operation of the autonomous function.

3. The lightweight autonomous optimization system inside a database according to claim 1, wherein The Autonomous Manager manages each autonomous module through the following steps: First, identify and record all autonomous modules in the system, and collect the function and resource requirement information of each autonomous module; Subsequently, according to the real-time running state of the database and preset rules, formulate the overall autonomous task execution strategy, and overall arrange the working order and resource allocation of each autonomous module; Finally, send task start instructions to each autonomous module according to the established working order.

4. A lightweight autonomous optimization system inside a database according to claim 1, characterized in that, The autonomous module sequentially carries out four major steps of initializing table creation, data collection and storage, algorithm operation and processing, and result application to complete the full-process autonomous task from data acquisition to the implementation of optimization strategies, specifically including: (1) Initialize the autonomous module and create Stage 1 and Stage 2 tables: When the autonomous module starts, the system performs initialization operations and creates two tables, Stage 1 and Stage 2, in the database. Among them, the Stage 1 table is used to temporarily store the original data collected from the database, and the Stage 2 table is used to store the operation results of the autonomous algorithm; (2) Collect the original data and store it in the Stage 1 table: After initialization, the autonomous module collects data from the database data source according to preset rules and stores it in the Stage 1 table in real time, providing a basis for subsequent analysis and processing; (3) Run the autonomous algorithm and store the results in the Stage 2 table: When enough data has accumulated in the Stage 1 table, the autonomous module will trigger the operation of the internal autonomous algorithm, deeply analyze, calculate and mine the original data in the Stage 1 table, extract valuable information, and generate optimization strategies or decision-making suggestions, which are written into the Stage 2 table and wait to be applied; (4) Apply the autonomous results: The autonomous module reads the operation results of the autonomous algorithm from the Stage 2 table and applies them to the database or related business systems.

5. A lightweight autonomous optimization system inside a database according to claim 1, characterized in that, The system includes two-level switches, where: The first-level switch is responsible for controlling the opening and closing of the Autonomous Manager; The second-level switch is used as a module switch, and its quantity is the same as and corresponds one-to-one with the number of autonomous modules, and is responsible for controlling the opening and closing of specific autonomous modules to achieve refined management of different functions.

6. A lightweight autonomous optimization method inside a database, characterized in that, Based on the system described in claim 1, the method includes the following steps: Step 1: Start the Server and the autonomous manager; Step 2: The autonomous manager overall manages the autonomous modules; Step 3: The autonomous modules execute autonomous tasks; Step 4: The autonomous data warehouse stores the intermediate data and final results generated during the task execution by the autonomous modules; Step 5: The external system obtains the execution result of the autonomous task through the autonomous result interface.

7. A lightweight autonomous optimization method inside a database according to claim 6, characterized in that The specific content of step S1 includes: The database starts, and the system loads the Server program; The Server initializes its own configuration, creates necessary processes and threads, establishes a connection with the database, and at the same time scans and loads the internally integrated autonomous manager; The autonomous manager conducts its own initialization, establishes a communication channel with the Server component, and ensures the smooth progress of subsequent work.

8. A lightweight autonomous optimization method inside a database according to claim 6, characterized in that The specific content of step S2 includes: The autonomous manager first identifies and records all autonomous modules in the system, and collects the function and resource requirement information of each autonomous module; Subsequently, the autonomous manager formulates an overall autonomous task execution strategy based on the real-time running status of the database and preset rules, and arranges the work order and resource allocation of each autonomous module overall; Finally, the autonomous manager sends task start instructions to each autonomous module according to the established work order.

9. A lightweight autonomous optimization method inside a database according to claim 6, characterized in that Execute step S3. The autonomous modules sequentially carry out four major steps of initializing table creation, data collection and storage, algorithm operation and processing, and result application to complete the full-process autonomous task from data acquisition to the implementation of the optimization strategy. Specifically, it includes: Step S3.1: Initialize the autonomous module and create Stage 1 and Stage 2 tables: When the autonomous module starts, the system executes the initialization operation and creates two tables, Stage 1 and Stage 2, in the database. Among them, the Stage 1 table is used to temporarily store the raw data collected from the database, and the Stage 2 table is used to store the operation results of the autonomous algorithm; Step S3.2: Collect raw data and store it in the Stage 1 table: After initialization, the autonomous module collects data from the database data source based on preset rules and stores it in the Stage 1 table in real time to provide a basis for subsequent analysis and processing; Step S3.3: Run the autonomous algorithm and store the results in the Stage 2 table: When enough data has accumulated in the Stage 1 table, the autonomous module will trigger the operation of the internal autonomous algorithm, deeply analyze, calculate, and mine the raw data in the Stage 1 table, extract valuable information, and generate optimization strategies or decision suggestions, which are written into the Stage 2 table and wait for application; Step S3.4: Apply the autonomous result: The autonomous module reads the operation result of the autonomous algorithm from the Stage 2 table and applies it to the database or related business systems.

10. A lightweight autonomous optimization method inside a database according to claim 6, characterized in that, The autonomous manager is controlled to be turned on and off by a first-level switch; The autonomous module is controlled to be turned on and off by a second-level switch, and the second-level switch is a switch that controls a specific autonomous module separately on the basis that the autonomous manager has been started.