Database transaction management method, terminal and storage medium

The CNN and MBRL models are updated through the incremental learning mechanism, which solves the performance bottleneck and scalability problems of traditional database transaction management methods when the scale and complexity increase, and improves the performance and adaptability of database transaction management.

CN118409830BActive Publication Date: 2024-09-24TIANJIN NANKAI UNIV GENERAL DATA TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410866031.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-09-24
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

Traditional database transaction management methods face performance bottlenecks and scalability issues when the database scale increases and complexity increases.

Method used

The incremental learning mechanism is used to update the CNN model and MBRL model, and the CNN model is used to extract features of new transaction data. The MBRL model optimizes the transaction management strategy, realizes resource sharing and data exchange through the data sharing agreement, and continuously monitors performance indicators and adjusts Optimal model parameters and thresholds.

Benefits of technology

It improves the performance and adaptability of database transaction management, breaks through performance bottlenecks and scalability limitations, and improves the system's concurrent processing capabilities and transaction processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118409830B
    Figure CN118409830B
Patent Text Reader

Abstract

The present invention provides a database transaction management method, terminal and storage medium, which relate to the field of database. The method includes: obtaining new transaction data of the database; triggering an incremental learning scheduling mechanism based on the new transaction data, and performing incremental learning on a CNN model and an MBRL model based on the scheduling mechanism; the CNN model is used to extract features of the new transaction data of the database; the MBRL model is used to optimize the transaction management strategy of the database; and database transaction management is performed based on the CNN model and the MBRL model after incremental learning. The present application can improve the feature extraction capability of the CNN model, the optimization capability of the MBRL model for the transaction management strategy, and the adaptability of the model to new transaction data through incremental learning, and the CNN model and the MBRL model after incremental learning are applied to database transaction management, which can improve the performance and adaptability of database transaction management and break through performance bottlenecks and scalability issues.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and in particular to a database transaction management method, a terminal and a storage medium. Background Art

[0002] Database transaction management is an important part of the database system. Through database transaction management, data consistency and integrity can be ensured. Traditional database transaction management methods mainly rely on strict ACID properties to ensure data consistency and integrity. However, as the scale and complexity of the database increase, traditional database transaction management methods may face performance bottlenecks and scalability issues. Summary of the invention

[0003] The embodiments of the present invention provide a database transaction management method, a terminal and a storage medium to solve the performance bottleneck and scalability problems that may be faced by existing methods.

[0004] In a first aspect, an embodiment of the present invention provides a database transaction management method, including:

[0005] Get new transaction data from the database;

[0006] Based on new transaction data, the scheduling mechanism of incremental learning is triggered, and based on the scheduling mechanism, the CNN model and MBRL model are incrementally learned; the CNN model is used to extract features of the new transaction data of the database; the MBRL model is used to optimize the transaction management strategy of the database;

[0007] Database transaction management is performed based on the CNN model and MBRL model after incremental learning.

[0008] In a possible implementation, based on new transaction data, a scheduling mechanism for incremental learning is triggered, and based on the scheduling mechanism, incremental learning is performed on the CNN model and the MBRL model, including:

[0009] When the amount of new transaction data is greater than or equal to the preset data volume threshold, the incremental learning of the CNN model is triggered;

[0010] The current transaction conflict rate is obtained, and when the current transaction conflict rate is greater than or equal to a preset conflict rate threshold or the increment of the current transaction conflict rate is greater than or equal to a preset increment threshold, the incremental learning of the MBRL model is triggered.

[0011] In a possible implementation, the database transaction management method further includes:

[0012] In the process of triggering the scheduling mechanism of incremental learning based on new transaction data and performing incremental learning on the CNN model and the MBRL model based on the scheduling mechanism, data exchange and resource sharing between the incremental learning of the CNN model and the incremental learning of the MBRL model are realized through the data sharing protocol.

[0013] In a possible implementation, the database transaction management method further includes:

[0014] Continuously monitor the performance indicators of database transaction management;

[0015] When the performance indicators do not meet the expected goals, the performance tuning mechanism is triggered; the performance tuning mechanism includes sequentially triggering the learning strategies for adjusting the incremental learning of the CNN model and the MBRL model, optimizing the parameters of the CNN model and the MBRL model, and adjusting the trigger thresholds for the incremental learning of the CNN model and the MBRL model.

[0016] In a possible implementation, database transaction management is performed based on the MBRL model after incremental learning, including:

[0017] Determine the current transaction management strategy based on the MBRL model after incremental learning;

[0018] Based on the current transaction management strategy, transaction identification, transaction dispatch, transaction status management, transaction monitoring and transaction logging are performed.

[0019] In a possible implementation, after acquiring new transaction data of the database, the database transaction management method further includes:

[0020] Perform data cleaning, data conversion, feature extraction and data integration based on the CNN model on the new transaction data to obtain the pre-processed new transaction data;

[0021] Accordingly, based on the new transaction data, the scheduling mechanism of incremental learning is triggered, and based on the scheduling mechanism, the CNN model and the MBRL model are incrementally learned, including:

[0022] Based on the preprocessed new transaction data, the scheduling mechanism of incremental learning is triggered, and based on the scheduling mechanism, the CNN model and the MBRL model are incrementally learned.

[0023] In a possible implementation, before triggering a scheduling mechanism for incremental learning based on new transaction data and performing incremental learning on the CNN model and the MBRL model based on the scheduling mechanism, the database transaction management method further includes:

[0024] Based on the historical data of the database, the transaction characteristics of the database and the rules of the database, the environment modeling is carried out to build the MBRL model;

[0025] Optimize MBRL models based on exploration and reinforcement learning algorithms;

[0026] Using the optimized MBRL model, determine the optimal transaction management strategy;

[0027] Obtain the execution results of the optimal transaction management strategy, and update the optimized MBRL model based on the execution results.

[0028] In a possible implementation, the database transaction management method further includes:

[0029] Continuously monitor the performance indicators of database transaction management;

[0030] Analyze performance indicators to determine the factors that cause performance degradation in database transaction management;

[0031] Generate tuning suggestions for database transaction management based on the factors causing performance degradation; the tuning suggestions are used to instruct staff to perform tuning operations.

[0032] In a second aspect, an embodiment of the present invention provides a database transaction management device, including:

[0033] The acquisition module is used to obtain new transaction data from the database;

[0034] Integrate multiple incremental learning modules to trigger the scheduling mechanism of incremental learning based on new transaction data, and perform incremental learning on the CNN model and MBRL model based on the scheduling mechanism; the CNN model is used to extract features from the new transaction data of the database; the MBRL model is used to optimize the transaction management strategy of the database;

[0035] The transaction management module is used to manage database transactions based on the CNN model and MBRL model after incremental learning.

[0036] In a third aspect, an embodiment of the present invention provides a terminal, comprising a memory and a processor, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the database transaction management method as described in the first aspect or any possible implementation of the first aspect.

[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the database transaction management method as described in the first aspect or any possible implementation method of the first aspect.

[0038] The embodiment of the present invention provides a database transaction management method, a terminal and a storage medium. When new transaction data of a database arrives, the method triggers an incremental learning scheduling mechanism, and based on the scheduling mechanism, performs incremental learning of a CNN model and an MBRL model, updates the CNN model and the MBRL model, so as to improve the feature extraction capability of the CNN model, the optimization capability of the MBRL model for transaction management strategies and the adaptability of the model to new transaction data. The CNN model and the MBRL model after incremental learning are applied to database transaction management, so as to improve the performance and adaptability of database transaction management and break through the performance bottleneck and scalability problems that may be faced. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 It is a flowchart of a database transaction management method provided by an embodiment of the present invention;

[0041] Figure 2 is a schematic diagram of the structure of a database transaction management device provided by an embodiment of the present invention;

[0042] Figure 3 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0044] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0045] See also Figure 1 , which shows a flowchart of the implementation of the database transaction management method provided by the embodiment of the present invention. The execution subject of the above database transaction management method can be a terminal.

[0046] The above database transaction management method may include:

[0047] In S101, new transaction data of the database is obtained.

[0048] The new transaction data of the database refers to the transaction data newly flowing into the database, and may include at least one of new transaction logs and new user operation records.

[0049] In some possible implementations, new transaction data of the database may be acquired through a predetermined transaction data flow monitoring mechanism.

[0050] In some possible implementations, before S101, the database transaction management method may further include:

[0051] During the startup phase of the database transaction management system, initialization is performed. This initialization includes loading the pre-trained CNN (Convolutional Neural Networks) model and MBRL (Model-Based Reinforcement Learning) model, and determining the monitoring mechanism of the transaction data flow. The monitoring mechanism of the transaction data flow is used to monitor new transaction data so that new incoming transaction data can be captured in real time to provide data support for subsequent incremental learning. This initialization can also include the initialization of other necessary parameters and configurations.

[0052] In S102, based on the new transaction data, the scheduling mechanism of incremental learning is triggered, and based on the scheduling mechanism, the CNN model and the MBRL model are incrementally learned; the CNN model is used to extract features of the new transaction data of the database; the MBRL model is used to optimize the transaction management strategy of the database.

[0053] When new transaction data flows in, the scheduling mechanism of incremental learning is triggered, including incremental learning of CNN model and incremental learning of MBRL model. Among them, incremental learning of CNN model can be understood as incremental training of CNN model; incremental learning of MBRL model can be understood as strategy optimization of MBRL model.

[0054] This embodiment can determine when to start incremental learning of the CNN model and incremental learning of the MBRL model based on new transaction data according to preset learning strategies and / or scheduling rules. Through incremental learning of the CNN model, the feature extraction capability of the CNN model for new transaction data can be improved, and through incremental learning of the MBRL model, the optimization capability of the MBRL model for the transaction management strategy of the database can be improved. Among them, the transaction management strategy can also be called a transaction processing strategy or a transaction execution strategy, etc.

[0055] Whenever new transaction data flows in, the scheduling mechanism of the incremental learning algorithm is triggered, so that the model can adapt to changes in the database environment and continuously optimize the database transaction processing performance.

[0056] In S103, database transaction management is performed based on the CNN model and the MBRL model after incremental learning.

[0057] After incremental learning, the CNN model and MBRL model will be updated, and reapplying the updated models to database transaction management can improve the accuracy and efficiency of transaction processing.

[0058] In this embodiment, when new transaction data of the database arrives, the scheduling mechanism of incremental learning is triggered, and based on the scheduling mechanism, incremental learning of the CNN model and the MBRL model is performed, and the CNN model and the MBRL model are updated to improve the feature extraction capability of the CNN model, the optimization capability of the MBRL model for transaction management strategies, and the adaptability of the model to new transaction data. The CNN model and the MBRL model after incremental learning are applied to database transaction management, which can improve the performance and adaptability of database transaction management and break through the performance bottlenecks and scalability problems that may be faced.

[0059] In some embodiments, the above S102 may include:

[0060] When the amount of new transaction data is greater than or equal to the preset data volume threshold, the incremental learning of the CNN model is triggered;

[0061] The current transaction conflict rate is obtained, and when the current transaction conflict rate is greater than or equal to a preset conflict rate threshold or the increment of the current transaction conflict rate is greater than or equal to a preset increment threshold, the incremental learning of the MBRL model is triggered.

[0062] In this embodiment, when the amount of new transaction data monitored in the database reaches a certain threshold, that is, greater than or equal to the preset data amount threshold, the incremental learning of the CNN model is triggered, and the incremental training of the CNN model is performed to improve the feature extraction ability and adaptability of the CNN model.

[0063] The transaction conflict rate can be understood as the ratio of transactions with data conflicts to the total number of transactions during the transaction processing of the database. When the transaction conflict rate is too high or increases, it means that the current transaction management strategy is no longer applicable to the current transaction management, and the MBRL model needs to be updated to obtain a new transaction management strategy. Therefore, if the current transaction conflict rate is greater than or equal to the preset conflict rate threshold (that is, the current transaction conflict rate is too high) or the increment of the current transaction conflict rate is greater than or equal to the preset increment threshold (that is, the current transaction conflict rate increases), the incremental learning of the MBRL model is triggered, and the strategy optimization of the MBRL model is performed.

[0064] Among them, this embodiment can periodically calculate the transaction conflict rate, and the duration of a single cycle can be set according to actual needs, and no specific restrictions are made here. The current transaction conflict rate can be understood as the transaction conflict rate of the current cycle. The increment of the current transaction conflict rate is the difference between the transaction conflict rate of the current cycle and the transaction conflict rate of the previous cycle.

[0065] The values ​​of the above-mentioned preset data volume threshold, preset conflict rate threshold and preset increment threshold can be set according to actual needs and are not specifically limited here.

[0066] In some embodiments, the above database transaction management method may further include:

[0067] In the process of triggering the scheduling mechanism of incremental learning based on new transaction data and performing incremental learning on the CNN model and the MBRL model based on the scheduling mechanism, data exchange and resource sharing between the incremental learning of the CNN model and the incremental learning of the MBRL model are realized through the data sharing protocol.

[0068] In the process of incremental learning of CNN model and incremental learning of MBRL model, there may be the possibility of data and resource conflicts. Therefore, this embodiment formulates a data sharing protocol to coordinate data exchange and resource sharing between different incremental learning algorithms to ensure that the incremental learning of CNN model and the incremental learning of MBRL model can work together to avoid resource conflicts and waste.

[0069] The above data sharing protocol defines the format of exchanged data, communication channels, data transmission methods, etc. By using the same protocol, the effectiveness and consistency of data exchange can be ensured.

[0070] In some embodiments, the above database transaction management method further includes:

[0071] Continuously monitor the performance indicators of database transaction management;

[0072] When the performance indicators do not meet the expected goals, the performance tuning mechanism is triggered; the performance tuning mechanism includes sequentially triggering the learning strategies for adjusting the incremental learning of the CNN model and the MBRL model, optimizing the parameters of the CNN model and the MBRL model, and adjusting the trigger thresholds for the incremental learning of the CNN model and the MBRL model.

[0073] This embodiment will continuously monitor the performance indicators of database transaction management to provide data support for subsequent model tuning. Among them, the performance indicators may include at least one of the indicators such as transaction processing speed, transaction conflict rate, transaction conflict number, transaction delay rate, transaction delay duration, transaction delay number, query response time and resource utilization.

[0074] Each performance indicator has a corresponding expected performance target. When at least one of the performance indicators does not meet the corresponding expected performance target, it is determined that the performance indicator of the database transaction management does not meet the expected target.

[0075] When it is detected that the performance indicators of database transaction management do not meet the expected goals, the performance tuning mechanism will be triggered. The performance tuning mechanism includes three tuning strategies that are triggered in sequence. When the performance indicators do not meet the expected goals, the tuning strategy of adjusting the learning strategy of incremental learning of CNN model and MBRL model is triggered. After the tuning strategy is executed, if the performance indicators still do not meet the expected goals, the tuning strategy of optimizing the parameters of CNN model and MBRL model is triggered. If the performance indicators still do not meet the expected goals after the tuning strategy is executed, the tuning strategy of adjusting the trigger threshold of incremental learning of CNN model and MBRL model is triggered.

[0076] Adjusting the learning strategy for incremental learning of the CNN model and the MBRL model may include at least one of adjusting the learning rate, increasing the number of samplings, and reselecting the learning strategy.

[0077] The learning rate may be adjusted dynamically according to the current task or data distribution. For example, a learning rate decay strategy or an adaptive learning rate algorithm (eg, Adam algorithm) may be used to adjust the learning rate.

[0078] In ensemble learning, increasing the number of samples can better adapt to changes in data.

[0079] Reselecting the learning strategy may reselect a suitable learning strategy according to the characteristics of the current data and the requirements of the task. Exemplarily, the learning strategy may include online learning, online batch learning, online micro-batch learning, and the like.

[0080] Optimizing the parameters of the CNN model and the MBRL model may include at least one of parameter initialization, parameter updating using a parameter updating method, and adding a regularization term.

[0081] Parameter initialization: You can use a suitable parameter initialization method, such as Xavier initialization or He initialization, to initialize the parameters, which helps to better adapt to new input data in incremental learning.

[0082] Parameter update: You can use incremental learning specific parameter update methods to update parameters, such as online gradient descent, online gradient descent acceleration methods (such as stochastic gradient descent with momentum SGD Momentum), or incremental PCA (Principal Component Analysis).

[0083] By adding regularization terms (for example, L1 regularization or L2 regularization), the stability of model parameters can be controlled to prevent overfitting and over-adaptation to new data.

[0084] Adjust the trigger threshold of incremental learning of the CNN model and the MBRL model, that is, adjust the preset data volume threshold, the preset conflict rate threshold and the preset increment threshold. The trigger threshold can be adjusted according to the requirements of the task and the characteristics of the data stream. For example, if the task requires a faster response time, the trigger threshold can be lowered to update the model more frequently. If the task requires a slower response time, the trigger threshold can be increased to avoid frequent model updates.

[0085] The trigger threshold can be adjusted dynamically by real-time data flow status. For example, the threshold is adjusted dynamically by monitoring the flow speed, abnormal conditions, distribution changes, etc. of the data flow of the transaction data.

[0086] This embodiment can ensure that the performance of the database transaction management system is always maintained in the best state through continuous performance monitoring and tuning.

[0087] The integrated multi-incremental learning in the embodiment of the present application can achieve the collaborative work between the incremental learning of the CNN model and the incremental learning of the MBRL model through a reasonable work scheduling mechanism, and can dynamically adjust the learning strategy and model application according to the actual needs of database transaction management, so as to continuously optimize the transaction processing performance, which is beneficial to improving the concurrent processing capability of the database system, reducing the conflict rate and reducing delays.

[0088] In some embodiments, before the above S102, the above database transaction management method may further include:

[0089] Based on the historical data of the database, the transaction characteristics of the database and the rules of the database, the environment modeling is carried out to build the MBRL model;

[0090] Optimize the above MBRL model based on exploration and reinforcement learning algorithms;

[0091] Using the optimized MBRL model, determine the optimal transaction management strategy;

[0092] The execution result of the optimal transaction management strategy is obtained, and according to the execution result, the optimized MBRL model is updated to obtain an updated MBRL model.

[0093] Accordingly, in the above S102, performing incremental learning on the MBRL model may include: performing incremental learning on the updated MBRL model.

[0094] This embodiment first models the database transaction environment and constructs an MBRL model, which is a prediction model used to simulate the execution process of database transactions.

[0095] The historical data of the above database may include historical entity data, historical attribute data and historical relationship data. Historical entity data is the data record of a specific entity in the database; historical attribute data is the attribute data associated with the entity; and historical relationship data is the relationship information between entities. For example, for a database storing customer orders, entities may include customers, orders, products, etc., attributes may include the name of the customer, the amount of the order, and the quantity of the product, etc., and relationships may include the association relationship between orders and customers, the correspondence relationship between products and orders, etc.

[0096] The transaction characteristics of a database may include transaction identifier, timestamp, operation type, object of operation, and value of operation. The transaction identifier (Transaction ID) is a value that uniquely identifies a transaction; the timestamp (Timestamp) is used to indicate the time when a transaction occurs or is committed; the operation type (Operation Type) is used to describe the type of operation performed by the transaction, such as insert, update, delete, etc.; the object of operation (Operated Object) is used to indicate the specific entity or table of the transaction operation; the value of operation (Operated Value) is used to describe the specific value change or operation content of the transaction execution.

[0097] Database rules include business rules, data integrity rules, security rules and triggers. Business Rules: specify the allowed values, constraints or operation specifications of an entity or attribute in the database to ensure data consistency and integrity; Data Integrity Rules: define the constraints that must be met between entities and attributes in the database, such as primary keys, foreign keys, unique constraints, etc.; Security Rules: specify access rights to the database, user authentication requirements, data protection policies, etc.; Triggers: define operations or rules that are automatically triggered when specific operations or data changes occur.

[0098] In the initial stage after building the MBRL model, exploration will be carried out to try to execute different transaction management strategies to collect environmental information and reward signals for optimizing MBRL's prediction capabilities and transaction execution strategies.

[0099] Reinforcement learning algorithms are also used to optimize the MBRL model. For example, value iteration, policy iteration, Monte Carlo tree search and other methods can be used for optimization. By continuously iterating and updating the prediction results and transaction management strategies of the MBRL model, the MBRL model can learn better transaction management strategies, reduce sufficiency and delay, and improve concurrent processing capabilities.

[0100] As time goes by, it gradually turns to exploitation, that is, selecting the optimal transaction management strategy based on the prediction results of the optimized MBRL model to maximize the efficiency and performance of transaction processing.

[0101] When executing database transactions according to the optimal transaction management strategy, the actual execution results and reward signals are collected to evaluate the execution effect of the current strategy. This feedback information is used to update the prediction results and transaction management strategy of the MBRL model, forming a closed-loop learning process to achieve continuous learning and improvement.

[0102] This embodiment can realize intelligent decision-making of database transactions, can adaptively handle the ever-changing database environment, and improve the efficiency, accuracy and stability of database transaction processing.

[0103] In some embodiments, in the above S103, the above-mentioned MBRL model based on incremental learning performs database transaction management, including:

[0104] Determine the current transaction management strategy based on the MBRL model after incremental learning;

[0105] Based on the current transaction management strategy, transaction identification, transaction dispatch, transaction status management, transaction monitoring and transaction logging are performed.

[0106] Among them, the current transaction management strategy is the current optimal transaction management strategy determined by the MBRL model after incremental learning, which may include operations such as transaction start, commit, and rollback, as well as conflict resolution strategies (such as waiting, retrying, rollback, etc.) when conflicts occur.

[0107] Transaction identification: Transaction identification is performed based on the transaction semantics and data sets, and tasks are divided for transactions that cannot be completed locally. Transaction dispatching: The subtasks divided by transaction identification are dispatched to the corresponding server through the transaction dispatcher to complete the transaction. Transaction state management: When the application process execution ends or the execution is abnormal, the branch transaction object state change function is provided, and a state change notification is issued to the transaction coordination service. Transaction monitoring: Monitor the global transaction status to ensure the correctness and consistency of the transaction. Transaction logging: Intercept transaction requests, extract transaction context information and application process execution information as transaction log records, and provide the log server with the information required to organize the transaction propagation chain.

[0108] This embodiment is responsible for coordinating and managing each stage of the transaction, ensuring the integrity and consistency of the data, and is a key process for ensuring the correct and efficient execution of database transactions.

[0109] In some embodiments, after S101, the database transaction management method further includes:

[0110] Perform data cleaning, data conversion, feature extraction and data integration based on the CNN model on the new transaction data to obtain the pre-processed new transaction data;

[0111] Accordingly, the above S102 may include:

[0112] Based on the preprocessed new transaction data, the CNN model and MBRL model are incrementally learned.

[0113] This embodiment can preprocess new transaction data to obtain effective and accurate preprocessed new transaction data, so as to facilitate subsequent incremental learning and data analysis, etc.

[0114] Data cleaning can remove noise, outliers, and incomplete data from raw data. Data cleaning can include deleting duplicate data, processing missing values, and correcting erroneous data. For example, for missing values, rows or columns containing missing values ​​can be deleted and filled.

[0115] Data transformation is the process of converting raw data into a format or form suitable for analysis. Data transformation can include data type conversion (for example, converting text to numeric values), data encoding (for example, converting categorical variables to dummy variables), data normalization or standardization, etc. The purpose of data transformation is to make the data more suitable for subsequent modeling and analysis.

[0116] Feature extraction is a key step in database transaction management. It involves extracting features from raw data that are useful for transaction processing. These features are obtained based on statistical properties of data, time series analysis, text mining, and other methods. This embodiment uses a CNN model to perform feature extraction, which can greatly reduce the dimension of the data and improve the efficiency and accuracy of subsequent modeling.

[0117] Data integration is the process of merging and integrating data from different data sources, which requires dealing with issues such as inconsistent data formats and differences in data structures. Through data integration, a comprehensive and consistent data set can be formed, providing a reliable data foundation for subsequent transaction processing.

[0118] This embodiment provides high-quality, standardized data input for database transaction management through data preprocessing, which is of great significance for improving the accuracy, efficiency and stability of transaction processing.

[0119] In some embodiments, the above database transaction management method further includes:

[0120] Continuously monitor the performance indicators of database transaction management;

[0121] Analyze performance indicators to determine the factors that cause performance degradation in database transaction management;

[0122] Generate tuning suggestions for database transaction management based on the factors causing performance degradation; the tuning suggestions are used to instruct staff to perform tuning operations.

[0123] In this embodiment, the performance indicators can be continuously monitored through the monitoring tools provided by the database, third-party monitoring software or custom scripts, and the monitored data will be stored in a central database for subsequent analysis and comparison.

[0124] By conducting in-depth analysis and comparison of the monitored performance indicators, you can identify possible performance bottlenecks and determine which operations or queries are the factors that cause performance degradation. The analysis can include query efficiency, index usage, resource contention, etc.

[0125] Based on the results of the performance analysis, i.e. the factors causing the performance degradation, corresponding tuning suggestions can be generated. The tuning suggestions may include at least one of optimizing query statements, adjusting index strategies, and increasing resource allocation. The purpose of the tuning suggestions is to improve the performance of the database, query efficiency, and processing speed.

[0126] After receiving the tuning suggestions, the staff (i.e., database administrator or operation and maintenance personnel) can perform the corresponding tuning operations according to the tuning suggestions. The tuning operations may include at least one of modifying configuration parameters, adjusting resource allocation, and optimizing query statements. After the tuning operations are implemented, performance monitoring and analysis are required again to ensure that the tuning effect meets the expectations.

[0127] The above performance monitoring and tuning is an ongoing process that can be performed periodically or in real time. As the database is used and changes, new performance issues may arise, so continuous monitoring and corresponding tuning measures need to be taken. Through continuous monitoring and tuning, you can ensure that the database is always in the best performance state and improve the performance and stability of the database.

[0128] The embodiment of the present application provides a database transaction management method integrating CNN and MBRL with multi-incremental learning, which can improve the performance of the model by continuously processing and learning new data. The CNN model can process and analyze images, multidimensional data or other unstructured data in the database, etc. The MBRL model can be used to model and predict the state and action in the database transaction, and the transaction management strategy can be optimized by using reinforcement learning strategy. By combining deep learning, reinforcement learning and incremental learning, efficient and intelligent management of database transactions can be achieved. This method can not only learn and optimize the model adaptively, but also improve the concurrent processing capability of the system, reduce the conflict rate and reduce delay.

[0129] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0130] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0131] Figure 2 A schematic diagram of the structure of a database transaction management device provided by an embodiment of the present invention is shown. For ease of description, only the parts related to the embodiment of the present invention are shown, which are described in detail as follows:

[0132] like Figure 2 As shown, the database transaction management device 20 may include: an acquisition module 21, an integrated multi-incremental learning module 22 and a transaction management module 23.

[0133] An acquisition module 21 is used to acquire new transaction data from a database;

[0134] An integrated multi-incremental learning module 22 is used to trigger a scheduling mechanism for incremental learning based on new transaction data, and to perform incremental learning on a CNN model and an MBRL model based on the scheduling mechanism; the CNN model is used to extract features from new transaction data of the database; and the MBRL model is used to optimize the transaction management strategy of the database;

[0135] The transaction management module 23 is used to perform database transaction management based on the CNN model and MBRL model after incremental learning.

[0136] In a possible implementation, the integrated multi-incremental learning module 22 is specifically used for:

[0137] When the amount of new transaction data is greater than or equal to the preset data volume threshold, the incremental learning of the CNN model is triggered;

[0138] The current transaction conflict rate is obtained, and when the current transaction conflict rate is greater than or equal to a preset conflict rate threshold or the increment of the current transaction conflict rate is greater than or equal to a preset increment threshold, the incremental learning of the MBRL model is triggered.

[0139] In a possible implementation, the integrated multi-incremental learning module 22 is further used for:

[0140] In the process of triggering the scheduling mechanism of incremental learning based on new transaction data and performing incremental learning on the CNN model and the MBRL model based on the scheduling mechanism, data exchange and resource sharing between the incremental learning of the CNN model and the incremental learning of the MBRL model are realized through the data sharing protocol.

[0141] In a possible implementation, the database transaction management device 20 may further include: a performance monitoring and tuning module.

[0142] The performance monitoring and tuning module can be used for:

[0143] Continuously monitor the performance indicators of database transaction management;

[0144] When the performance indicators do not meet the expected goals, the performance tuning mechanism is triggered; the performance tuning mechanism includes sequentially triggering the learning strategies for adjusting the incremental learning of the CNN model and the MBRL model, optimizing the parameters of the CNN model and the MBRL model, and adjusting the trigger thresholds for the incremental learning of the CNN model and the MBRL model.

[0145] In a possible implementation, in the transaction management module 23, the MBRL model based on incremental learning performs database transaction management, including:

[0146] Determine the current transaction management strategy based on the MBRL model after incremental learning;

[0147] Based on the current transaction management strategy, transaction identification, transaction dispatch, transaction status management, transaction monitoring and transaction logging are performed.

[0148] In a possible implementation, the database transaction management device 20 may further include: a data preprocessing module.

[0149] The data preprocessing module is used to:

[0150] After acquiring the new transaction data from the database, the new transaction data is cleaned, converted, feature extracted based on the CNN model, and integrated to obtain the pre-processed new transaction data;

[0151] Accordingly, the integrated multi-incremental learning module 22 is specifically used for:

[0152] Based on the preprocessed new transaction data, the scheduling mechanism of incremental learning is triggered, and based on the scheduling mechanism, the CNN model and the MBRL model are incrementally learned.

[0153] In a possible implementation, the database transaction management device 20 may further include: an MBRL decision module.

[0154] MBRL decision-making modules are used to:

[0155] Based on the historical data of the database, the transaction characteristics of the database and the rules of the database, the environment modeling is carried out to build the MBRL model;

[0156] Optimize MBRL models based on exploration and reinforcement learning algorithms;

[0157] Using the optimized MBRL model, determine the optimal transaction management strategy;

[0158] Obtain the execution results of the optimal transaction management strategy, and update the optimized MBRL model based on the execution results.

[0159] In a possible implementation, the performance monitoring and tuning module can also be used to:

[0160] Continuously monitor the performance indicators of database transaction management;

[0161] Analyze performance indicators to determine the factors that cause performance degradation in database transaction management;

[0162] Generate tuning suggestions for database transaction management based on the factors causing performance degradation; the tuning suggestions are used to instruct staff to perform tuning operations.

[0163] Figure 3 is a schematic diagram of a terminal provided by an embodiment of the present invention. Figure 3 As shown, the terminal 3 of this embodiment includes: a processor 30 and a memory 31. The memory 31 is used to store a computer program 32, and the processor 30 is used to call and run the computer program 32 stored in the memory 31 to perform the steps in the above-mentioned various database transaction management method embodiments, such as Figure 1 Alternatively, the processor 30 is used to call and run the computer program 32 stored in the memory 31 to implement the functions of each module / unit in the above-mentioned device embodiments, for example Figure 2 Functionality of the modules shown.

[0164] Exemplarily, the computer program 32 may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 32 in the terminal 3. For example, the computer program 32 may be divided into Figure 2 The modules shown.

[0165] The terminal 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of terminal 3 and does not constitute a limitation on terminal 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0166] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0167] The memory 31 may be an internal storage unit of the terminal 3, such as a hard disk or memory of the terminal 3. The memory 31 may also be an external storage device of the terminal 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal 3. The memory 31 is used to store the computer program and other programs and data required by the terminal. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0168] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0169] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0170] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0171] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0172] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0173] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0174] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned database transaction management method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium.

[0175] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A database transaction management method, characterized in that: include: Get new transaction data from the database; Based on the new transaction data, triggering a scheduling mechanism for incremental learning, and performing incremental learning on a CNN model and an MBRL model based on the scheduling mechanism; The CNN model is used to extract features from new transaction data in the database; The MBRL model is used to optimize the transaction management strategy of the database; Database transaction management is performed based on the CNN model and MBRL model after incremental learning; The triggering of the scheduling mechanism of incremental learning based on the new transaction data, and performing incremental learning on the CNN model and the MBRL model based on the scheduling mechanism, includes: When the data volume of the new transaction data is greater than or equal to a preset data volume threshold, triggering incremental learning of the CNN model; The current transaction conflict rate is obtained, and when the current transaction conflict rate is greater than or equal to a preset conflict rate threshold or an increment of the current transaction conflict rate is greater than or equal to a preset increment threshold, the incremental learning of the MBRL model is triggered.

2. The database transaction management method according to claim 1, characterized in that: The database transaction management method also includes: In the process of triggering the scheduling mechanism of incremental learning based on the new transaction data and performing incremental learning on the CNN model and the MBRL model based on the scheduling mechanism, data exchange and resource sharing between the incremental learning of the CNN model and the incremental learning of the MBRL model are achieved through a data sharing protocol.

3. The database transaction management method according to claim 1, characterized in that: The database transaction management method also includes: Continuously monitor the performance indicators of database transaction management; When the performance indicator does not meet the expected target, a performance tuning mechanism is triggered; the performance tuning mechanism includes sequentially triggering a learning strategy for adjusting the incremental learning of the CNN model and the MBRL model, optimizing the parameters of the CNN model and the MBRL model, and adjusting the trigger threshold of the incremental learning of the CNN model and the MBRL model.

4. The database transaction management method according to claim 1, characterized in that: Based on the MBRL model after incremental learning, database transaction management is performed, including: Determine the current transaction management strategy based on the MBRL model after incremental learning; Based on the current transaction management strategy, transaction identification, transaction dispatch, transaction status management, transaction monitoring and transaction log recording are performed.

5. The database transaction management method according to claim 1, characterized in that: After acquiring the new transaction data of the database, the database transaction management method further includes: Performing data cleaning and data conversion on the new transaction data, extracting features based on the CNN model, and data integration to obtain pre-processed new transaction data; The triggering of the scheduling mechanism of incremental learning based on the new transaction data, and performing incremental learning on the CNN model and the MBRL model based on the scheduling mechanism, includes: Based on the preprocessed new transaction data, a scheduling mechanism for incremental learning is triggered, and based on the scheduling mechanism, incremental learning is performed on the CNN model and the MBRL model.

6. The database transaction management method according to claim 1, characterized in that: Before triggering the scheduling mechanism of incremental learning based on the new transaction data and performing incremental learning on the CNN model and the MBRL model based on the scheduling mechanism, the database transaction management method further includes: Based on the historical data of the database, the transaction characteristics of the database and the rules of the database, environmental modeling is performed to construct an MBRL model; Optimizing the MBRL model based on exploration and reinforcement learning algorithms; Using the optimized MBRL model, determine the optimal transaction management strategy; The execution result of the optimal transaction management strategy is obtained, and the optimized MBRL model is updated according to the execution result.

7. The database transaction management method according to any one of claims 1 to 6, characterized in that: The database transaction management method also includes: Continuously monitor the performance indicators of database transaction management; Analyze the performance indicators to determine factors causing performance degradation of database transaction management; Based on the factors causing the performance degradation, a tuning suggestion for database transaction management is generated; the tuning suggestion is used to instruct the staff to perform tuning operations.

8. An electronic terminal, characterized in that: The system comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the database transaction management method according to any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the database transaction management method according to any one of claims 1 to 7 are implemented.