Dynamically loaded database operation method, system, electronic device and storage medium
Through dynamically loading the database operation method, the problems of long startup time and resource waste in traditional mode are solved, resource optimization and system stability are improved, and are suitable for complex application scenarios.
Patent Information
- Application Number
- CN202510668107.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-05-23
AI Technical Summary
In the traditional database operation mode, the startup time is long, the resource waste is severe and the system stability is poor, especially in complex application scenarios.
The dynamically loaded database operation method is adopted to verify the existence of database and tables through library table verification components, and only the necessary basic components and target data processing components are loaded, and the modular loading and resource optimization of components are achieved in combination with cache management and monitoring interface components.
Significantly shorten the startup time, optimize resource utilization, improve system flexibility and scalability, reduce maintenance costs, ensure consistency and security of the development process, and promote efficient project progress.
Smart Images

Figure CN120179341B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of database data processing, and in particular to a dynamically loaded database operation method, system, electronic device and storage medium. Background Art
[0002] In traditional database operation models, applications typically preload all possible database connections and operation classes during startup to ensure smooth execution of subsequent business logic. While this one-time loading approach may meet requirements in simple application scenarios, its drawbacks become increasingly prominent in complex application scenarios involving numerous database operations, some of which are less frequently used.
[0003] First, because applications must complete all database connections and load operational classes during the initialization phase, startup time is significantly extended, especially in large systems. This not only degrades the user experience but also potentially impacts the system's ability to quickly deploy and scalably scale.
[0004] Secondly, in traditional models, even if certain database operations are rarely called during actual operation, their corresponding resources will still reside in memory for a long time, resulting in inefficient use of memory resources. This resource waste not only increases system operating overhead, but can also cause performance degradation and even stability issues due to excessive memory pressure, especially in resource-constrained environments. Summary of the Invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides a method, system, electronic device and storage medium for dynamically loaded database operation. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0006] A first aspect of an embodiment of the present invention provides a dynamically loaded database operation method, comprising the following steps:
[0007] A method for dynamically loading a database comprises the following steps:
[0008] In response to a database operation request sent by the data engine module, establishing a connection with a preset data source according to the database operation request; wherein the database operation request indicates the preset data source and data source operation configuration information;
[0009] Calling the database table verification component to verify the database and target business table of the preset data source according to the data source operation configuration information;
[0010] Dynamic loading step: if the database and target business table of the preset data source already exist, then load the basic component and determine whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information;
[0011] If it has been loaded, obtaining a reference to the target data processing component from the component container, and then the data engine calling the reference to execute the database operation indicated by the data source operation configuration information;
[0012] If not loaded, searching for the target data processing component from the component container and loading it, then obtaining a reference to the target data processing component, and the data engine calling the reference to execute the database operation indicated by the data source operation configuration information;
[0013] If the database of the preset data source already exists and the target business table does not exist, the target business table is created according to the data source operation configuration information, and then the process returns to the dynamic loading step.
[0014] In one embodiment of the present invention, if the database and target business table of the preset data source already exist, loading the basic component and determining whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information includes:
[0015] If the database of the preset data source and the target business table already exist, load the basic component and determine whether the structure of the target business table is consistent with the structure of the target business table indicated by the data source operation configuration information;
[0016] If they are inconsistent, the structure of the target business table is updated, and then it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information;
[0017] If they are consistent, it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
[0018] In one embodiment of the present invention, the method further comprises:
[0019] Cache the loaded target data processing component into the cache management module;
[0020] Determine whether the database operation request is the first database operation request;
[0021] If not, obtaining a reference to the target data processing component from the cache management module;
[0022] The cache management module uninstalls the target data processing component according to the cache space and the cache elimination algorithm.
[0023] In one embodiment of the present invention, the method further comprises:
[0024] The monitoring interface component is loaded from the component container, and then a reference to the monitoring interface component is obtained to monitor the status of the preset data source.
[0025] A second aspect of an embodiment of the present invention provides a dynamically loaded database operating system, including:
[0026] a processing module, configured to respond to a database operation request sent by the data engine module and establish a connection with a preset data source according to the database operation request; wherein the database operation request indicates the preset data source and data source operation configuration information;
[0027] A calling module, configured to call a library table verification component to verify a preset data source database and a target business table according to the data source operation configuration information;
[0028] A loading module is used for the dynamic loading step: if the database of the preset data source and the target business table already exist, the basic component is loaded and the target data processing component indicated by the data source operation configuration information is determined based on the data source operation configuration information.
[0029] an acquisition module, configured to acquire a reference to the target data processing component from a component container if the target data processing component has been loaded, and then the data engine calls the reference to execute the database operation indicated by the data source operation configuration information;
[0030] a search module configured to search for and load the target data processing component from the component container if the target data processing component is not loaded, and then obtain a reference to the target data processing component, and the data engine calls the reference to execute the database operation indicated by the data source operation configuration information;
[0031] The management module is configured to create the target business table according to the data source operation configuration information if the database of the preset data source already exists and the target business table does not exist, and then return to the dynamic loading step.
[0032] In one embodiment of the present invention, if the database and target business table of the preset data source already exist, loading the basic component and determining whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information includes:
[0033] If the database of the preset data source and the target business table already exist, load the basic component and determine whether the structure of the target business table is consistent with the structure of the target business table indicated by the data source operation configuration information;
[0034] If they are inconsistent, the structure of the target business table is updated, and then it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information;
[0035] If they are consistent, it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
[0036] In one embodiment of the present invention, it further comprises:
[0037] A cache management module, configured to cache the loaded target data processing component into the cache management module;
[0038] A judgment module, used to judge whether the database operation request is the first database operation request;
[0039] The acquisition module is further configured to, if not, acquire a reference to the target data processing component from the cache management module;
[0040] The cache management module is further configured to uninstall the target data processing component according to the cache space and the cache elimination algorithm.
[0041] In one embodiment of the present invention, it further comprises:
[0042] The monitoring loading module is used to load the monitoring interface component from the component container and then obtain a reference to the monitoring interface component to monitor the status of the preset data source.
[0043] A third aspect of an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a dynamically loaded database operation method provided by the first aspect of an embodiment of the present invention is implemented.
[0044] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements a dynamically loaded database operation method provided by the first aspect of the embodiment of the present invention.
[0045] Beneficial effects of the present invention:
[0046] The present invention verifies the existence of databases and tables through the library table verification component to ensure the normal operation of subsequent data processing. At the same time, by only loading the basic components and target data processing components, it effectively avoids the waste of resources caused by loading all database operation components at startup; modularizing the data processing components for on-demand loading further optimizes resource utilization efficiency, avoids unnecessary waste of resources, and realizes the maximum utilization of resources. In the complex scenario of parallel development of multiple data engines, unified management of all data source operation items and methods is achieved, ensuring the standardization and consistency of the development process, effectively improving development efficiency, reducing repeated development work, providing great convenience for team collaboration and project management, and promoting the efficient advancement and successful delivery of projects.
[0047] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0048] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0050] Figure 1 A schematic diagram of a flow chart of a dynamically loaded database operation method provided by an embodiment of the present invention;
[0051] Figure 2 A schematic block diagram of a dynamically loaded database operating system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The present invention will be further described in detail below with reference to specific examples, but the embodiments of the present invention are not limited thereto.
[0053] like Figure 1 As shown, a first aspect of an embodiment of the present invention provides a dynamically loaded database operation method, comprising the following steps:
[0054] Step 11: In response to the database operation request sent by the data engine module, a connection is established with a preset data source according to the database operation request.
[0055] The database operation request indicates a preset data source and data source operation configuration information.
[0056] Step 12: Call the database table verification component to verify the database and target business table of the preset data source according to the data source operation configuration information.
[0057] Step 13, dynamic loading step: if the database and target business table of the preset data source already exist, then load the basic components and determine whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
[0058] Step 14: If it has been loaded, a reference to the target data processing component is obtained from the component container, and the data engine calls the reference to execute the database operation indicated by the data source operation configuration information.
[0059] Step 15: If it is not loaded, search for the target data processing component from the component container and load it, and then obtain a reference to the target data processing component.
[0060] Step 16: If the database of the preset data source already exists and the target business table does not exist, the target business table is created according to the data source operation configuration information, and then the process returns to the dynamic loading step.
[0061] In this embodiment, the basic components are loaded first, followed by the required components, significantly shortening the application startup time and effectively avoiding the resource waste caused by loading all database operation components at startup. Independently encapsulating database functions into components and pre-storing them in a component container greatly improves the flexibility and scalability of the system, making it easy and convenient to add and update database operation components without restarting the application, effectively reducing system maintenance costs and downtime. At the same time, it can perfectly adapt to the data engine's various data sources, enabling efficient data operations and management of various data sources to meet the diverse needs of different users and business scenarios.
[0062] At the same time, the on-demand loading feature of the data processing component further optimizes resource utilization efficiency, avoids unnecessary resource waste, and maximizes resource utilization. As an independent project, the data processing component successfully achieves code and resource isolation, effectively reducing mutual interference between operations of different data sources, greatly facilitating system maintenance and upgrades, significantly improving system security and stability, and safeguarding enterprise data security. Moreover, in complex scenarios where multiple data engines are developed in parallel, unified management of all data source operation items and methods is achieved, ensuring the standardization and consistency of the development process, effectively improving development efficiency, reducing duplication of development work, and providing great convenience for team collaboration and project management, promoting the efficient advancement and successful delivery of projects.
[0063] On the basis of the first aspect of the embodiment of the present invention, the second aspect of the embodiment of the present invention further describes in detail a method for operating a dynamically loaded database. The second aspect of the embodiment of the present invention provides a method for operating a dynamically loaded database, comprising the following steps:
[0064] Step 21: In response to the database operation request sent by the data engine module, a connection is established with a preset data source according to the database operation request. This step is when the data engine module or application receives the database operation request in the initialization state.
[0065] The database operation request indicates a preset data source and data source operation configuration information.
[0066] Data sources include source data, target data, database management data, object storage data, and other database data types that require synchronization and are operated on by data engines or applications. Data source operation configuration information specifies the relevant parameters for operating the database, including but not limited to the type of operation and business parameters.
[0067] The preset data source information indicated in the database operation request is the data source that the data engine or application needs to operate, and a connection is established with the preset data source based on the information.
[0068] Here, the database operation request may also be sent by the application.
[0069] Step 22: Call the database table verification component to verify the database and target business table of the preset data source according to the data source operation configuration information.
[0070] In this step, after establishing a connection with the preset data source, you need to verify the existence of the database and business tables of the preset data source. Verification of their existence ensures that subsequent database operations can proceed normally. The target business table is one of the business parameters. It is the database table that the data engine or application needs to operate. The data engine or application can perform various data processing and operations on the target business table, including but not limited to adding, deleting, modifying, querying, statistics, incremental synchronization, and full synchronization.
[0071] Step 23: If the database and target business table of the preset data source already exist, load the basic component from the component container and determine whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
[0072] In this step, the component container stores various independently encapsulated database operation components, including foundational components and various data processing components. Components in the component container are stored in a hash table. If the database and target business tables for the preset data source already exist, the foundational components can be loaded first. Foundational components are the core components required for database operations and system operation.
[0073] For example, the basic components include a basic configuration file reader component, a basic logging component, an interface class detection component, etc. In the initialization state, the basic components need to be loaded first. In the non-initialization state, since the basic components have been loaded in the initialization state, there is no need to load the basic components, and it is directly determined whether to load the target data processing component.
[0074] Determine whether the required target database operation components have been loaded based on parameters such as the operation type parameter in the data source operation configuration information. Data processing components include source-side data processing components, target-side data processing components, database management business data processing components, and object storage data processing components. Each of these four types of components includes corresponding business operation interface components and monitoring interface components. For example, business operation interface components include, but are not limited to, engine statistics writing components, alarm writing components, incremental synchronization operation components, and full synchronization operation components.
[0075] Specifically, the specific steps of step 23 include steps 231 to 233:
[0076] Step 231: If the database of the preset data source and the target business table already exist, load the basic component and determine whether the structure of the target business table is consistent with the structure of the target business table indicated by the data source operation configuration information.
[0077] Step 232: If there is no consistency, then update the structure of the target business table, and then determine whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
[0078] In this step, ensure that the business tables in the data source meet the requirements of the required business processing.
[0079] Step 233: If they are consistent, determine whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
[0080] Step 24: If the target data processing component indicated by the data source operation configuration information has been loaded, a reference to the target data processing component is obtained from the component container, and then the data engine or application calls the reference to execute the database operation indicated by the data source operation configuration information.
[0081] If the target data processing component has been loaded, a reference to the component is obtained so as to quickly call the component to perform database operations.
[0082] Step 25: If not loaded, search for the target data processing component from the component container and load it, then obtain a reference to the target data processing component, and then the data engine or application calls the reference to execute the database operation indicated by the data source operation configuration information.
[0083] For example, if the operation type parameter in the data source operation configuration information is the statistical type, the engine statistical information writing component is loaded; if the parameter is the incremental synchronization type, the incremental synchronization operation component is loaded. The incremental synchronization type parameters are shown in Table 1:
[0084] Table 1
[0085]
[0086] In this embodiment, the target data processing component is found in the hash table in the component container, wherein the hash value is calculated based on the parameter information such as the data source type, version identifier, schema, library table, etc. in the data source operation configuration information.
[0087] In one feasible implementation, the loaded target data processing component is cached in a cache management module. When a database operation request is received again, it is determined whether the database operation request is a first-time database operation request or a previous request. If it is a second-time request, a reference to the target data processing component is obtained from the cache management module.
[0088] The cache management module uninstalls the target data processing component based on cache space and a cache elimination algorithm. The cache management module decides whether to uninstall the component based on a preset strategy, taking into account factors such as the likelihood of the component being used again in the near future and the availability of system memory resources.
[0089] Step 26 : If the database of the preset data source already exists and the target business table does not exist, then the target business table is created according to the data source operation configuration information, and then the process returns to step 23 .
[0090] In this step, if the target business table does not exist in the database, the required target business table is created according to the parameters. Usually, the target business table that does not exist is the business table that needs to write data.
[0091] If the database of the preset data source does not exist, an exception prompt message will be returned.
[0092] In one feasible implementation, during the loading of the target data processing component and the process of the data engine invoking a reference to the target data processing component to perform database operations, a monitoring interface component can be loaded from the component container and a reference obtained to perform monitoring operations on the pre-set data source. This dynamically monitors access to connected data sources, providing real-time output and statistics of key metrics such as the number of connections, tablespace usage, CPU and memory usage, disk I / O, query performance, and cache hit rate, enabling timely identification and resolution of potential issues. Continuous real-time monitoring of designated data sources, accurately counting and outputting various monitoring metrics, provides critical data support for system performance optimization and risk warnings.
[0093] For example, the monitoring interface components include: database engine status monitoring interface component, JVM memory monitoring interface component, CPU monitoring interface component, etc. One or more of these components can be loaded for monitoring, and the monitoring parameters are shown in Table 2.
[0094] Table 2
[0095]
[0096] In one possible implementation, the data source operation configuration information in a database operation request can include monitoring-related parameters. For example, if the operation type parameter specifies CPU monitoring, the CPU monitoring interface component is loaded. If the database operation request includes some of the parameters listed in Table 2, only those CPU attributes are monitored. If no parameters are included, all CPU attributes listed in Table 2 are monitored by default.
[0097] The present invention is used in scenarios where source-side and target-side data synchronization is achieved. Furthermore, the present invention implements database operations through a lazy loading mechanism.
[0098] like Figure 2 As shown, a third aspect of an embodiment of the present invention provides a dynamically loaded database operating system, including:
[0099] The processing module 31 is configured to respond to a database operation request sent by the data engine module and establish a connection with a preset data source according to the database operation request; wherein the database operation request indicates the preset data source and data source operation configuration information;
[0100] The calling module 32 is used to call the library table verification component to verify the database and target business table of the preset data source according to the data source operation configuration information;
[0101] The loading module 33 is used for the dynamic loading step: if the database and target business table of the preset data source already exist, the basic component is loaded and the target data processing component indicated by the data source operation configuration information is determined based on the data source operation configuration information.
[0102] The acquisition module 34 is used to obtain a reference to the target data processing component from the component container if it has been loaded, and then the data engine calls the reference to perform the database operation indicated by the data source operation configuration information;
[0103] The search module 35 is used to search for the target data processing component from the component container and load it if it is not loaded, and then obtain a reference to the target data processing component. The data engine calls the reference to execute the database operation indicated by the data source operation configuration information;
[0104] The management module 36 is configured to create the target business table according to the data source operation configuration information if the database of the preset data source already exists and the target business table does not exist, and then return to the dynamic loading step.
[0105] In one embodiment of the present invention, if the database and target business table of the preset data source already exist, loading the basic component and determining whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information includes:
[0106] If the database and target business table of the preset data source already exist, load the basic component and determine whether the structure of the target business table is consistent with the structure of the target business table indicated by the data source operation configuration information;
[0107] If they are inconsistent, the structure of the target business table is updated, and then it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information;
[0108] If they are consistent, it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
[0109] In one embodiment of the present invention, it further comprises:
[0110] A cache management module, configured to cache the loaded target data processing component into the cache management module;
[0111] A judgment module, used to judge whether the database operation request is the first database operation request;
[0112] The acquisition module is further used to obtain a reference to the target data processing component from the cache management module if not;
[0113] The cache management module is also used to uninstall the target data processing component according to the cache space and cache elimination algorithm.
[0114] In one embodiment of the present invention, it further comprises:
[0115] The monitoring loading module is used to load the monitoring interface component from the component container and then obtain the reference of the monitoring interface component to monitor the status of the preset data source.
[0116] A fourth aspect of an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a dynamically loaded database operation method provided by the above-mentioned embodiment of the present invention is implemented.
[0117] A fifth aspect of an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of a dynamically loaded database operation method provided in the above-mentioned embodiment of the present invention are implemented.
[0118] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0119] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware systems.
[0120] The method provided in the embodiments of the present invention can be applied to electronic devices. Specifically, the electronic devices can be desktop computers, portable computers, smart mobile terminals, servers, etc. This is not limited here; any electronic device that can implement the present invention falls within the scope of protection of the present invention.
[0121] As for the system / electronic device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0122] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0123] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system that is implemented in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0125] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A method for operating a dynamically loaded database, characterized in that: The following steps are involved: In response to a database operation request sent by the data engine module, establishing a connection with a preset data source according to the database operation request; wherein the database operation request indicates the preset data source and data source operation configuration information; Calling the database table verification component to verify the database and target business table of the preset data source according to the data source operation configuration information; Dynamic loading step: if the database and target business table of the preset data source already exist, then load the basic component and determine whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information; If it has been loaded, obtaining a reference to the target data processing component from the component container, and then the data engine calling the reference to execute the database operation indicated by the data source operation configuration information; If not loaded, searching for the target data processing component from the component container and loading it, then obtaining a reference to the target data processing component, and the data engine calling the reference to execute the database operation indicated by the data source operation configuration information; If the database of the preset data source already exists and the target business table does not exist, the target business table is created according to the data source operation configuration information, and then the process returns to the dynamic loading step.
2. The method according to claim 1, wherein If the database and target business table of the preset data source already exist, loading the basic component and determining whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information, including: If the database of the preset data source and the target business table already exist, load the basic component and determine whether the structure of the target business table is consistent with the structure of the target business table indicated by the data source operation configuration information; If they are inconsistent, the structure of the target business table is updated, and then it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information; If they are consistent, it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
3. The method according to claim 1, wherein The method further comprises: Cache the loaded target data processing component into the cache management module; Determine whether the database operation request is the first database operation request; If not, obtaining a reference to the target data processing component from the cache management module; The cache management module uninstalls the target data processing component according to the cache space and the cache elimination algorithm.
4. The method according to claim 1, wherein The method also includes: The monitoring interface component is loaded from the component container, and then a reference to the monitoring interface component is obtained to monitor the status of the preset data source.
5. A dynamically loaded database operating system, characterized in that: include: a processing module, configured to respond to a database operation request sent by the data engine module and establish a connection with a preset data source according to the database operation request; wherein the database operation request indicates the preset data source and data source operation configuration information; A calling module, configured to call a library table verification component to verify a preset data source database and a target business table according to the data source operation configuration information; A loading module is used for the dynamic loading step: if the database of the preset data source and the target business table already exist, the basic component is loaded and the target data processing component indicated by the data source operation configuration information is determined based on the data source operation configuration information. an acquisition module, configured to acquire a reference to the target data processing component from a component container if the target data processing component has been loaded, and then the data engine calls the reference to execute the database operation indicated by the data source operation configuration information; a search module configured to search for and load the target data processing component from the component container if the target data processing component is not loaded, and then obtain a reference to the target data processing component, and the data engine calls the reference to execute the database operation indicated by the data source operation configuration information; The management module is configured to create the target business table according to the data source operation configuration information if the database of the preset data source already exists and the target business table does not exist, and then return to the dynamic loading step.
6. The system according to claim 5, wherein: If the database and target business table of the preset data source already exist, loading the basic component and determining whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information, including: If the database of the preset data source and the target business table already exist, load the basic component and determine whether the structure of the target business table is consistent with the structure of the target business table indicated by the data source operation configuration information; If they are inconsistent, the structure of the target business table is updated, and then it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information; If they are consistent, it is determined whether the target data processing component indicated by the data source operation configuration information has been loaded according to the data source operation configuration information.
7. The system according to claim 5, wherein: Also includes: A cache management module, configured to cache the loaded target data processing component into the cache management module; A judgment module, used to judge whether the database operation request is the first database operation request; The acquisition module is further configured to, if not, acquire a reference to the target data processing component from the cache management module; The cache management module is further configured to uninstall the target data processing component according to the cache space and the cache elimination algorithm.
8. The system according to claim 5, wherein: Also includes: The monitoring loading module is used to load the monitoring interface component from the component container and then obtain a reference to the monitoring interface component to monitor the status of the preset data source.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the dynamically loaded database operation method according to any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the dynamically loaded database operation method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Data index result calculation processing method, calculation processing system and application
CN118484474A
Shared library loading using predefined loading policy
US20240111550A1