A method and system for global deadlock detection in distributed databases based on deep learning

CN122570197APending Publication Date: 2026-08-14SHANGHAI THERMAL NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-26
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

1.环境噪声识别能力不足,导致误判率高,传统死锁检测多依赖于事务阻塞时长或简单的依赖链分析,难以区分由于网络瞬时抖动、物理链路延迟等外部环境噪声引起的“伪死锁”信号与真实的逻辑死锁,特别是在计算节点与存储节点跨机房部署的场景下,网络链路的瞬时抖动或半同步复制产生的延迟可能达到百毫秒级,现有技术极易将此类瞬时停滞误判为死锁并触发无谓的事务回滚,导致系统吞吐量异常波动,严重影响业务连续性

Benefits of technology

1、本发明引入了因果科学推断机制,相比于传统仅依赖时长的检测方法,利用结构因果模型和反事实干预模拟,能够从逻辑层面剥离跨机房网络时延对阻塞表征的影响,这种逻辑探测机制确保了系统能够精准区分瞬时环境噪声与真实逻辑死锁,有效避免了在高并发及跨地域场景下因误判触发的无谓事务回滚,显著提升了系统在高波动环境下的吞吐量平稳性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570197A_ABST
    Figure CN122570197A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for global deadlock detection in distributed databases based on deep learning, relating to the field of database management technology. The system constructs a multimodal heterogeneous transaction hypergraph, quantifies the intensity of resource contention and topological relationships, and then uses spatiotemporal feature diffusion modeling to capture the evolution trajectory of transaction states using convolution operators and attention mechanisms. It then uses a structural causal model to perform counterfactual intervention, stripping away the pseudo-deadlock illusion caused by network jitter. At the global center, it uses contrastive learning to reconstruct the manifold in the latent space, eliminating phase deviations caused by physical clock offsets and restoring long dependency chains with global temporal consistency. Finally, it discretizes the state through vector quantization and combines it with a Markov evolution model to predict the deadlock probability. When the risk reaches its peak, it selects the sacrificed transaction to perform self-healing based on a weighted cost function. This effectively solves the problems of high misjudgment rate, fragmented cross-node views, and blind resolution strategies in existing technologies, achieving high-precision and low-loss global deadlock control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database management technology, specifically to a method and system for global deadlock detection in distributed databases based on deep learning. Background Technology

[0002] As the global internet architecture evolves towards ultra-large-scale clusters, scenarios such as financial settlement, cross-border transfers, and e-commerce promotions place extremely high demands on the transaction concurrency and data consistency of distributed databases. In typical distributed transactional databases such as HotDB Server, the system usually adopts an architecture that separates compute nodes and storage nodes. Data is distributed across different physical storage nodes according to sharding rules. In cross-data center disaster recovery or dual-active scenarios, compute nodes need to coordinate distributed transactions across regions. This leads to resource competition relationships exhibiting extremely complex nonlinear characteristics. In order to ensure system liveness, timely and accurate detection and resolution of global deadlocks has become a core challenge in the design of distributed database kernels. Currently, mainstream distributed database deadlock detection technologies mainly rely on timeout detection mechanisms and distributed wait graphs. Timeout detection sets a preset time threshold and judges transactions that have not responded after the time limit as potential deadlocks and forces them to roll back. Distributed wait graphs attempt to piece together a complete transaction dependency chain at the global center of gravity by passing "wait path" information between shards.

[0003] However, existing distributed deadlock detection technologies face the following key technical challenges in meeting these requirements: 1. Insufficient environmental noise recognition capabilities lead to a high false positive rate. Traditional deadlock detection relies heavily on transaction blocking duration or simple dependency chain analysis, making it difficult to distinguish between "pseudo-deadlock" signals caused by external environmental noise such as network jitter and physical link delays and real logical deadlocks. Especially in scenarios where compute and storage nodes are deployed across data centers, the latency caused by network link jitter or semi-synchronous replication can reach hundreds of milliseconds. Existing technologies are very likely to misjudge such momentary pauses as deadlocks and trigger unnecessary transaction rollbacks, resulting in abnormal fluctuations in system throughput and seriously affecting business continuity.

[0004] 2. Cross-node view reconstruction is difficult and there are blind spots in detection. When dealing with transaction dependencies distributed across different physical shards, existing technologies often use centralized aggregation logs or periodic exchange of dependency graphs. Due to the unavoidable system clock phase deviation between different physical nodes and different data centers, the transaction execution trajectories reported by each shard are difficult to align on the timeline, making it impossible to restore a long chain of global dependencies with time-series consistency. This makes it difficult to detect complex distributed deadlocks (especially loops involving three or more nodes) in a timely manner, resulting in long-term illegal occupation of resources.

[0005] 3. Deadlock resolution decisions lack cost awareness, resulting in significant system overhead. Existing deadlock resolution strategies are often quite simplistic, frequently employing "first-come, first-served" or random termination principles. In complex industrial applications, the number of locks held by different transactions, the CPU / memory resources consumed, and the business priorities vary greatly. Resolution mechanisms lacking fine-grained evaluation often sacrifice high-priority large transactions that are about to complete, leading to a significant waste of computing resources and high rollback I / O overhead. It is difficult to achieve the optimal balance between deadlock resolution and ensuring the overall system operating efficiency. Summary of the Invention

[0006] Technical problems to be solved

[0007] To address the shortcomings of existing technologies, this invention provides a method and system for global deadlock detection in distributed databases based on deep learning, which solves the problems mentioned in the background section above.

[0008] Technical solution To achieve the above objectives, the present invention provides the following technical solution: a method for global deadlock detection in a distributed database based on deep learning, the method comprising the following steps: Sp1: Collect transaction metadata and lock contention topology of each node in the distributed database, construct a heterogeneous transaction hypergraph, and integrate the non-linear competition relationship between multiple transactions and a set of logical resources through hyperedges; Sp2: Perform spatiotemporal feature diffusion on the hypergraph, use convolution operators to fuse dynamic execution metrics of transactions, and generate a state embedding vector representing the blocking depth of transactions; Sp3: Implement causal intervention analysis, perform intervention simulation on the state embedding vector through structural causal model, and identify and eliminate pseudo deadlock feature signals caused by distributed network latency; Sp4: Perform latent space alignment of local features, aggregate feature embeddings of each node, and reconstruct the cross-node transaction evolution manifold at the global center using a contrastive learning mechanism; Sp5: Perform deadlock state decoding and prediction, discretize the state of the transaction evolution manifold, and output the deadlock closed-loop path and the corresponding transaction sacrifice decision.

[0009] Preferably, the method for constructing a heterogeneous transaction hypergraph in Sp1 includes the following steps: SP1.1: Real-time monitoring of the lock request queue of the database transaction manager, extracting a multimodal lock mode matrix including exclusive locks, shared locks, and intention locks; Sp1.2: Identify the primary key range and physical sharding location of the data objects accessed by a transaction, and associate transaction vertices involving the same atomic resource contention domain with the same hyperedge; Sp1.3: Calculate and assign the corresponding weights to the hyperedges based on the frequency of transaction concurrency conflicts, the real-time I / O load of resource sharding, and the data version chain depth under multi-version concurrency control.

[0010] Preferably, the method for performing spatiotemporal feature diffusion in Sp2 includes the following steps: Sp2.1: Define a Laplacian operator on the hypergraph topology to capture the state evolution trajectory of transaction nodes within a preset observation time window; Sp2.2: Utilizes a multi-head attention mechanism to allocate feature aggregation weights, and dynamically adjusts the contribution of different transaction nodes to the hyperedge features based on the historical activity level and current resource consumption level of the transaction. Sp2.3: Performs spatiotemporal convolution operations to map the aggregated hypergraph features into state embedding vectors with temporal continuity in a low-dimensional latent space.

[0011] Preferably, the method for implementing causal intervention analysis in Sp3 includes the following steps: SP3.1: Construct a structural causal model based on transaction waiting behavior to determine the causal logical path between network transmission delay, transaction waiting time and resource release signal; Sp3.2: The network transmission delay variable is assigned a value by the intervention quantifier, and the probability distribution of transaction blocking state transition under manual intervention is calculated. Sp3.3: Compare the original observed distribution with the probability distribution after intervention. When the distribution offset between the two is lower than the preset deviation threshold, the dependency relationship is determined to have causal stability and is retained as a true deadlock candidate feature.

[0012] Preferably, the method for performing local feature latent space alignment in Sp4 includes the following steps: Sp4.1: The position-sensitive hashing algorithm is used to pre-cluster the local feature embedding vectors of each node in order to establish a cross-node candidate association set; Sp4.2: Performs contrastive learning training at the global detection centroid, eliminating manifold feature phase deviation caused by physical node clock asynchrony by maximizing the similarity loss function of positive sample pairs; SP4.3: Associates transaction evolution manifolds of different nodes, and reconstructs long chains of cross-shard transaction dependencies with global temporal consistency.

[0013] Preferably, the method for performing deadlock state decoding and prediction in Sp5 includes the following steps: SP5.1: Utilizes vector quantization techniques to map continuous evolving manifold embeddings into discrete deadlock state codes of finite dimensions; Sp5.2: Input the state code into a pre-trained Markov evolutionary model to predict the closed-loop evolution probability of the current transaction dependency in a future preset period; SP5.3: Evaluate the cost of transaction rollback, taking into account the amount of transaction rollback logs, consumed system resources, and business priority indicators, and select the sacrificed transaction from the high-probability deadlock loop and generate a release instruction.

[0014] Preferably, the system includes: The multimodal feature perception module is used to capture transaction lock contention data of the distributed database kernel in real time, perform heterogeneous transaction hypergraph construction and feature diffusion operation, and generate embedding vectors that reflect the local resource contention state. The spatiotemporal feature calculation module is used to perform feature diffusion operations on the hypergraph topology. By fusing time series information with the graph topology, it captures the state evolution trajectory of transactions and generates a state embedding vector that represents the blocking depth of transactions. The causal denoising module is connected to the multimodal feature perception module and is used to perform intervention analysis on local features through a structural causal model to filter out pseudo-dependency features generated by network jitter. The global manifold reconstruction module is used to asynchronously aggregate the feature embeddings of each shard node and use a contrastive learning algorithm to align the transaction state manifolds of different nodes in the latent space to restore the global transaction dependency chain. The intelligent decision-making and self-healing module is connected to the global manifold reconstruction module. It is used to perform discretization decoding and evolution prediction of deadlock state, and issue deadlock resolution instructions based on the transaction rollback cost evaluation results.

[0015] Preferably, the global manifold reconstruction module supports streaming incremental alignment, and utilizes the geometric continuity of the manifold for state compensation when communication of some nodes is blocked, thereby ensuring the availability of the detection task.

[0016] Preferably, the intelligent decision-making and self-healing module has a built-in reinforcement learning optimizer that dynamically fine-tunes the causal intervention model parameters in the causal denoising processing module online based on the feedback signal of the system throughput after deadlock resolution.

[0017] Preferably, the multimodal feature perception module directly reads the database transaction slot status through memory mapping technology, which reduces the intrusion into the main business path of the database while ensuring real-time detection.

[0018] Beneficial effects This invention provides a method and system for global deadlock detection in distributed databases based on deep learning. It has the following beneficial effects: 1. This invention introduces a causal scientific inference mechanism. Compared with traditional detection methods that only rely on duration, it uses structural causal models and counterfactual intervention simulations to logically isolate the impact of cross-data center network latency on congestion representation. This logical detection mechanism ensures that the system can accurately distinguish between instantaneous environmental noise and real logical deadlock, effectively avoiding unnecessary transaction rollbacks triggered by misjudgment in high-concurrency and cross-regional scenarios, and significantly improving the throughput stability of the system in high-fluctuation environments.

[0019] 2. This invention achieves logical feature alignment through global manifold reconstruction under latent space contrastive learning. It no longer relies on fragile absolute physical timestamps, but uses contrastive learning algorithms to calibrate the phase of the transaction feature manifold in latent space. By calculating the directional gradient and logical temporal correlation between alignment vectors, the system can cross physical partition boundaries and restore a global dependency chain with temporal consistency. This enables complex loops involving multiple nodes to be captured in real time and completely, eliminating the monitoring blind spots of traditional centralized solutions in distributed environments.

[0020] 3. This invention establishes a refined multi-dimensional decision-making system through discretization decoding and cost-aware deadlock resolution. It utilizes a Markov model to predict the inevitability of deadlock evolution and, combined with a weighted cost function, comprehensively evaluates the transaction rollback log volume, consumed resources, and business priority. By selecting the transaction with the "lowest cost" as the sacrifice, the system can accurately break the deadlock impasse, rather than blindly terminating high-priority or large transactions that are about to complete. This mechanism, while resolving deadlocks, maximizes the preservation of the system's effective computational results and significantly reduces the costs associated with rollbacks. This approach minimizes overhead and achieves an optimal balance between resource utilization and business stability. Attached Figure Description

[0021] Figure 1 This is a flowchart illustrating the overall method of the present invention; Figure 2 This is a flowchart of the Sp1 process of the present invention; Figure 3 This is a flowchart of the Sp2 process of the present invention; Figure 4 This is the Sp3 flowchart of the present invention; Figure 5 This is the Sp4 flowchart of the present invention; Figure 6 This is the Sp5 flowchart of the present invention; Figure 7 This is a diagram of the deadlock detection system architecture of the present invention; Figure 8 This is a diagram showing the main interface of the system according to the present invention; Figure 9 This is a diagram showing the interface of the system deadlock detection results of the present invention; Figure 10 This is a diagram showing the system transaction dependency graph interface of the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Specific Implementation Example 1: Please see Figure 1 and Figure 7 As shown, the method for global deadlock detection in a distributed database based on deep learning includes the following steps: Please see Figure 2 As shown, Sp1: Heterogeneous Transaction Hypergraph Construction under Multimodal Feature Perception: The work begins with the multimodal feature perception module, which serves as the perception center of the entire deadlock detection system. It is deeply embedded in the storage engine layer and transaction management layer of the distributed database. Its main function is to achieve non-intrusive perception of the operating status of the distributed database kernel. By interacting with the shared memory of the database kernel, the multimodal feature perception module can monitor the transaction execution flow of each node in real time, capture lock state snapshots in memory, and extract metadata of resource contention. This allows the fragmented underlying database operations to be transformed into structured high-dimensional features, providing the most original and accurate data support for subsequent hypergraph modeling.

[0024] Since the multimodal feature perception module has established a data channel with the database kernel, the system can execute the SP1.1 phase. To accurately characterize inter-transaction dependencies and delve into the micro-modal characteristics of lock requests, the system first needs to understand "who is requesting what" at the atomic level. The multimodal feature perception module directly mounts the shared memory segment of the database transaction manager using memory mapping technology. The system scans the linked list structure of transaction slots and the lock manager in real time using predefined offsets. When a transaction initiates a lock request, the module intercepts the semaphore of the request and reads the lock type. For each resource object, the module extracts the lock type, including the exclusive lock. Shared locks and intention lock Including state information, the system employs an algorithm combining one-hot coding and intensity-weighted mapping to transform discrete lock modes into numerical matrices. Its formula is: ; in, They represent affairs and resources, respectively. Mapping functions for lock modes (such as...) The lock mapping is 1.0. (Lock mapping is 0.5). As the mutual exclusion strength coefficient, this process transforms the raw signaling in memory into a modal matrix describing resource contention attributes, thus completing the initial transformation from underlying signals to quantitative indicators.

[0025] After obtaining the modal strength of the lock request, in order to determine the physical boundaries and contention range of these conflicts—that is, which transactions are vying for the same atomic resource—the system naturally transitions to the SP1.2 stage. The multimodal feature perception module accurately identifies the primary key range of the data objects accessed by the transaction and their corresponding physical shard locations by parsing the execution plan and transaction metadata. Specifically, a set of resources with overlapping primary key ranges and located in the same shard is defined as an atomic resource contention domain, and each active transaction is assigned a unique vertex. If transaction Simultaneously competing for resource domains Then use a super edge Enclosing all three vertices simultaneously constitutes a vertex association. The system uses an R-tree spatial index model to quickly determine the intersection of primary key ranges, and then assigns the primary key ranges requested by each transaction. Mapped to a one-dimensional space segment, an R-tree is used for range search. Once overlapping intervals are found and their physical partition locations are consistent, they are determined to belong to the same competing domain, and these transaction vertices are associated with the same hyperedge. This process constructs the association matrix of the primary key range metadata of the transaction request into a hypergraph. ,in Represents the transaction vertex Belongs to superedge By successfully integrating the nonlinear relationships between multiple transactions and a set of resources through hyperedges, it achieves efficient encapsulation of transaction vertices involving the same atomic resource competition domain, thereby completing the topological reconstruction of transaction dependencies.

[0026] After successfully integrating the non-linear competition relationship between transactions and resources through hyperedges, the system must enter the Sp1.3 stage for deep weight assignment in order to further quantify the risk probability of deadlock caused by different competition domains. At this time, the multimodal feature perception module will synchronously call the database performance counters to extract dynamic indicators from three engineering dimensions: transaction concurrency conflict frequency. Resource sharding and real-time I / O load and MVCC data version chain depth Among them, the frequency of conflict To count the number of times a contention domain triggers a fallback or retrieval per unit of time, the load... To read the disk IOPS and CPU utilization of the shards, the version chain depth ( To measure the length of undo records, reflecting the density of data updates, a nonlinear dynamic weighting algorithm is used to calculate the final weight of hyperedges. Its formula is: ; in, For normalization function, The sensitivity factor is a learnable factor, and the denominator is the moving average benchmark during system operation. The module acquires monitoring indicators in real time, inputs them into the above formula for fusion, and outputs a... The continuous values ​​between them are assigned to the corresponding hyperedges. This weighting mechanism enables the hypergraph to not only have a topological structure, but also dynamic quantitative information representing physical pressure. This completes the construction of the heterogeneous transaction hypergraph.

[0027] Please see Figure 3 As shown, Sp2: Spatiotemporal feature diffusion modeling based on convolution operators: After the heterogeneous transaction hypergraph is constructed, in order to further explore the dynamic changes of transactions in the time dimension and their impact on resource congestion, the system performs spatiotemporal feature diffusion modeling. This is carried out through the spatiotemporal feature calculation module. The main function of this module is to transform the static competition relationship into a dynamic state evolution logic. By fusing time series information and graph topology, it quantifies the degree of stagnation of each transaction during execution. The spatiotemporal feature calculation module has powerful high-dimensional tensor processing capabilities and can coordinate spatial convolution and temporal convolution operators. Its core function is to capture the state drift of transactions in the resource competition domain, transform fragmented instantaneous conflict data into a congestion depth representation with temporal continuity, and finally generate a state embedding vector that can represent the congestion depth of transactions, providing a basic representation with temporal features for subsequent causal analysis.

[0028] Since Sp1 already provides the topological tensor of the heterogeneous transaction hypergraph, the system can initiate the Sp2.1 phase. Based on the heterogeneous transaction hypergraph provided by Sp1, the spatiotemporal feature calculation module defines a hypergraph Laplacian operator through matrix operations. This operator refers to the structure constructed by the system by integrating the hypergraph correlation matrix and weight matrix, which can describe the diffusion law of signals among different transaction vertices. Specifically, the system uses a matrix factorization algorithm to generate a standardized hypergraph Laplacian matrix. The formula for characterizing the structural properties of a hypergraph is: ; in, It is the identity matrix. For the hypergraph incidence matrix, This is the hyperedge weight matrix. and These are the node degree matrix and the hyperedge degree matrix, respectively. Through this operator, the system can describe the diffusion characteristics of signals among the vertices of the hypergraph. Based on this, the system starts a feature sampling program to continuously capture the state data of each transaction vertex, i.e., the state evolution trajectory, within a preset observation time window. The so-called state evolution trajectory refers to the feature vector sequence of a transaction over multiple consecutive sampling periods, consisting of its carried state, waiting time, SQL execution progress, and resource consumption. This process realizes the transformation from an instantaneous static snapshot to a continuous time stream. This sequence reflects the dynamic displacement of the transaction in resource contention over time, enabling the system to observe how the transaction gradually falls into a blocked state over time.

[0029] After establishing the evolutionary trajectory, to differentiate the contributions of different transactions to the pressure of the competing domain—that is, to identify which transactions are the core contradictions causing resource stagnation, rather than all competing transactions having equal blocking influence—the system naturally transitions to the Sp2.2 stage. It utilizes a multi-head attention mechanism to allocate feature aggregation weights. In this process, the system introduces two key evaluation metrics: historical activity and current resource occupancy level. Historical activity refers to the frequency of instruction execution and the ratio of successful commits or rollbacks within a preset period, reflecting the transaction's operational efficiency. Current resource occupancy level is determined by the number of exclusive locks held by the transaction, the size of locked data pages, and memory usage, reflecting the transaction's actual control over the system. The system uses a multi-head attention mechanism, employing historical activity as the query vector and resource occupancy level as the key vector. By calculating the matching degree between the two, it dynamically adjusts the contribution of different transaction nodes to their respective hyperedge features. Through parallel computation of multiple attention heads, it captures the complex and implicit dependency weights between transactions. The formula is as follows: ; in, The query vector is mapped from the historical activity of transactions. The key vector is mapped from the current resource occupancy level. (Value vector) represents the original state features. As a feature dimension, the system can dynamically adjust the weights of different transaction nodes in the hypergraph convolution process, thereby ensuring that key blocking nodes with high occupancy and low activity dominate the feature aggregation.

[0030] After dynamically calibrating node contributions through the attention mechanism, to ultimately generate the state embedding vector representing the transaction blocking depth, the Sp2.3 stage must be entered to perform spatiotemporal convolution operations. The spatiotemporal feature calculation module performs spatiotemporal convolution operations, which combines hypergraph convolution in the spatial domain with causal convolution in the temporal domain, deeply fusing the spatial topological information of the hypergraph with the evolutionary momentum of the time series. During this process, the system inputs the aggregated feature sequence into the encoder, and through nonlinear transformation, compresses the high-dimensional, sparse transaction state into a low-dimensional, dense latent space vector, i.e., the state embedding vector. The state embedding vector is a high-dimensional feature representation located in the low-dimensional latent space. This vector can simultaneously encode the transaction's structural position in the hypergraph, the intensity of competition with adjacent tasks, and the blocking severity over time. Specifically, the system uses a spatiotemporal synchronous convolution operator to achieve deep feature mapping, the formula of which is: ; in, The time of generation The state embedding vector, Features of the current moment, For the Laplace operator, and These are the learnable weight matrices for the spatial and temporal dimensions, respectively. As the activation function, the specific operation process is as follows: the module receives the weighted feature matrix, extracts deep associations through multi-layer spatiotemporal convolution, and finally outputs a latent space vector describing the transaction blocking depth. This vector not only retains the spatial location information of the transaction in the hypergraph, but also incorporates the dynamic features of the blocking state evolving over time, which can accurately characterize the current blocking depth of the transaction. At this point, the spatiotemporal feature calculation module has completed the deep modeling of the transaction behavior, and the generated embedding vector will be used as the core data input to guide the system into Sp3.

[0031] Please see Figure 4As shown, Sp3: Pseudo-deadlock intervention and elimination based on structural causal model: After the spatiotemporal characteristics of heterogeneous transactions are modeled, in order to remove physical noise in the distributed environment and restore the logical essence of transaction blocking, the system enters Sp3. This stage mainly carries out the core work through the causal denoising processing module. As the key to achieving high accuracy in the deadlock detection system, this module mainly plays a role in using the methodology of causal science to remove phantom signals generated by noise in the distributed environment from the logical level. The functions of the causal denoising processing module include building a structural causal model that can describe the internal mechanism of transaction behavior, performing intervention-based deep simulation tests, and screening suspected deadlock features according to the causal stability discrimination index. This can effectively distinguish between continuous blocking caused by logical infinite loops and instantaneous blocking caused by network latency, and finally generate deadlock candidate feature vectors that have been denoised and retain only the true causal relationships, providing high-purity logical input for subsequent global manifold reconstruction.

[0032] Since Sp2 has already generated state embedding vectors with temporal momentum, the system can start the Sp3.1 phase to construct a structural causal model and determine the causal logical path. During this process, the causal denoising module constructs a structural causal model of transaction waiting behavior based on prior knowledge and historical execution trajectories. This model abstracts complex system behavior into a directed acyclic graph (DAG). ), and define a set of structural equations between the variables. The formula for representing the generation mechanism between variables is: ; in, Represents network transmission latency. The actual waiting time for a transaction. Sending a signal for resources For unobserved external random disturbances, To represent the eventual observable transaction blocking, this model clarifies, in the process of determining the causal logical path, aspects such as the path itself. Representative network latency pseudo-blocking and path The process of identifying resource competition and blocking, which represents the process of moving from superficial observation to the underlying mechanism, enables the system to identify which variables are potential noise sources that cause abnormal state behavior. By processing transaction execution logs and network monitoring data, the system outputs a causal topology diagram and initial causal path of transaction waiting behavior, laying a solid foundation for eliminating the impact of network latency in the future.

[0033] After determining the causal logical path between variables, in order to explore the specific contribution of network latency to the representation of transaction state and thus achieve noise removal, the system naturally transitions to the SP3.2 stage. This stage utilizes the interference modulator to intervene in variables and calculate probability distributions. During this process, the system uses the interference modulator to cut off variables in the causal graph that point to network transmission delay. All incoming edges are forcibly assigned a set reference value (such as zero latency or mean latency in an ideal state). This operation simulates a parallel world scenario of "how the state of a transaction would change if we could instantly fix network latency," thus providing a key reference benchmark for noise stripping. Based on the state embedding vector generated by Sp2, the system uses a variational autoencoder simulator to calculate the probability distribution of transaction blocking state transitions under manual intervention. A deep intervention network is used to estimate the counterfactual distribution after intervention, and the formula is as follows: ; This formula adjusts the network latency variable. For a specific value Furthermore, by marginalizing other confounding factors, a state probability distribution derived purely from the causal chain is obtained.

[0034] After calculating the ideal probability distribution after intervention, in order to ultimately assess whether the observed blocking state fluctuates due to network fluctuations and thus filter out physically deterministic true deadlocks, it is necessary to enter the Sp3.3 stage for distribution offset comparison and feature filtering. The causal denoising module compares the original observed state distribution. Probability distribution after intervention To assess the sensitivity of congestion to environmental noise, the statistical difference between the two is measured (e.g., ...). The divergence is used to measure the distribution shift, and its formula is: ; in, For the original distribution, For the distribution after intervention, The specific operation process, based on the preset causal stability threshold, is as follows: The module receives two sets of probability distribution data, performs divergence calculation, quantifies the distance between the two distributions, and compares it with the preset causal stability threshold. The system compares the data to generate a corresponding binary mask. A binary mask is a logical vector generated based on the divergence calculation results. Transactions meeting stability requirements are marked as retained, while noise-driven pseudo-signals are marked as discarded. The system uses this mask to filter and map the state embedding vector, setting noise components identified as pseudo-deadlocks to zero. This ensures that only genuine deadlock features with causal determinism can proceed to subsequent stages. Specifically, if the distribution offset between the two is below a preset deviation threshold, it indicates that the transaction's blocking state does not depend on changes in network latency but is determined by internal logic (such as resource contention). This dependency exhibits causal stability, and the system retains it as a genuine deadlock candidate feature, setting the mask bit to 1 (retain). Conversely, if the offset is large, it is identified as a pseudo-deadlock signal and discarded, setting the mask bit to 0 (discard). Thus, the causal denoising module completes deep feature purification, outputting a denoised deadlock candidate feature vector that retains only genuine causal relationships.

[0035] Please see Figure 5 As shown, Sp4: Global Manifold Reconstruction under Latent Space Contrastive Learning: After completing the causal denoising and feature extraction of local nodes, the biggest challenge in deadlock detection is that in a distributed environment, each shard node only holds a local view, and the inconsistency of physical clocks makes it difficult to restore the global dependency chain. To address this, the system enters the Sp4 stage. The core of this stage is the global manifold reconstruction module, which is deployed in the global coordination center of the distributed system. Its main function is to break down the spatial barriers in the distributed environment and achieve deep fusion and logical alignment of features across physical shards. The global manifold reconstruction module has the ability to handle large-scale cross-node associations and can coordinate hash filtering and contrastive learning operators. Its core function is to eliminate the manifold phase deviation caused by the inconsistency of physical clocks and finally reconstruct a long chain of transaction dependencies with global temporal consistency, providing a macro view for the final deadlock decision.

[0036] Due to the large number of active transactions in distributed databases, performing a full feature comparison directly at the global centroid would generate enormous computational and communication loads. Therefore, it is necessary to proceed to the Sp4.1 stage, where feature dimensionality reduction and filtering are first performed. Each local node sends the denoised embedding vector processed by Sp3 to the global manifold reconstruction module, which uses position-sensitive hashing (PSH). The algorithm processes these vectors. During this process, the system uses random projection to construct a hash function, ensuring that vectors that are close in distance in high-dimensional space still maintain a high probability of collision after hashing. The formula is as follows: ; in, The local feature embedding vector is the input. The projection vector is generated randomly. This is the offset. Given a bucket width, similar high-dimensional embedding vectors are used. By mapping similar high-dimensional embedding vectors to the same hash bucket, a cross-node candidate association set is established. The system uses a family of hash functions to map similar high-dimensional embedding vectors to the same hash bucket, thereby achieving rapid classification of features. The so-called cross-node candidate association set refers to those transaction feature pairs that are mapped to the same or adjacent hash buckets and are very likely to have cross-node resource dependencies. In this way, the system narrows the matching range to members within the bucket, greatly improving the efficiency of subsequent associations.

[0037] Since position-sensitive hashing only achieves coarse-grained candidate selection and cannot eliminate the phase deviation of feature representation caused by environmental differences such as clock asynchrony between different physical nodes, the system needs to enter the Sp4.2 stage to perform deeper contrastive learning alignment. The global manifold reconstruction module starts contrastive learning training in the latent space, defining the feature representations of the same global transaction generated on different nodes as positive sample pairs, and treating the representations of different transactions as negative sample pairs. Through continuous iterative optimization, the cosine similarity between positive sample pairs is maximized. In order to eliminate the phase deviation of manifold features caused by the inconsistency of physical node clocks, that is, the misalignment of the evolution trajectory of the same transaction on the time axis on different nodes, the system adopts an improved loss function as the learning objective to guide the convergence of the feature manifold. Its formula is: ; in, and Positive sample pairs representing the same transaction. For similarity measurement function, Using temperature as a parameter, this algorithm focuses on the geometric shape of feature evolution rather than absolute timestamps, forcing the feature manifolds of different nodes to overlap in the latent space. This cancels out the interference from the physical environment at the logical level, allowing transaction features from different shards to be measured under the same standardized logical scale.

[0038] After achieving precise unification of node features on the logical scale, in order to deduce the complete path from point-to-point associations to the topological level, the system enters the Sp4.3 stage to reconstruct the global dependency chain. The global manifold reconstruction module, based on the aligned feature vectors, uses the manifold association algorithm to connect the transaction evolution trajectories of different nodes in a unified latent space coordinate system. By calculating the Euclidean distance and directional gradient between aligned vectors, it identifies the transactions. Waiting for transactions , affairs Waiting for transactions The logical path is defined by Euclidean distance, which measures the "spatial closeness" of two feature vectors in the latent space. The closer the distance, the more likely the two features represent the same transaction dependency. The directional gradient measures the "trend" or "flow" of a feature's evolution over time. Because transactions have a sequential order, the directional gradient ensures that when connecting long chains, we are not connecting randomly, but rather reconstructing them along the logical time direction. Even if these transactions are distributed across different physical partitions, to ensure that the generated dependency chains conform to true causal logic, the system introduces a global temporal consistency calibration mechanism. Global temporal consistency means that the reconstructed dependency chains must conform to the temporal order of causal logic. The system performs temporal calibration through the dynamic evolution trend of the manifold, ensuring that each link in the dependency chain is logically closed and consistent. Its core association logic follows the formula: ; in, The aligned embedding vector, As a distance threshold, To evolve the phase difference and ensure the causal direction of the time sequence, this operation process uses nearest neighbor propagation and topology connection strategies to ultimately output a long chain graph of cross-shard transaction dependencies with global temporal consistency, providing the ultimate view support for identifying complex distributed deadlock loops.

[0039] Please see Figure 6 As shown, Sp5: Deadlock Resolution under Discretization Decoding and Cost Awareness: After completing the global manifold reconstruction across nodes and restoring the complete long chain of transaction dependencies, the deadlock detection system needs to identify the substantial deadlock loop from the high-dimensional manifold data and make the optimal self-healing decision. To this end, it enters Sp5. This step mainly carries out the final stage of work through the intelligent decision and self-healing module. As the command center of the deadlock detection system, this module undertakes the key task of transforming feature perception into control instructions. The core functions of the intelligent decision and self-healing module include: using quantization algorithms to transform abstract latent space features into interpretable state codes, predicting the future development trend of deadlocks through probabilistic evolution models, and executing precise transaction sacrifice strategies based on multi-dimensional cost evaluation mechanisms. Through this module, the system can realize a closed loop from "deadlock discovery" to "intelligent resolution", ensuring that the distributed database can quickly restore throughput capacity with minimal system overhead when facing complex resource competition.

[0040] Since the global evolutionary manifold output by Sp4 is a continuous high-dimensional vector, direct logical discrimination would face problems of computational explosion and state space ambiguity. Therefore, the system first enters the Sp5.1 stage to perform manifold state discretization discrimination based on vector quantization technology. The intelligent decision-making and self-healing module adopts vector quantization (… This technique maps continuous evolving manifold embeddings to discrete deadlock state codes of finite dimensions. In practice, the system pre-maintains a set of... A codebook of prototype vectors is used to perform nearest neighbor search through a vector quantization layer. This is achieved by calculating the Euclidean distance between the global manifold embedding vector and each prototype vector in the codebook, and then applying the core formula: ; in, The eigenvectors of the aligned continuous manifold For the first in the codebook One prototype vector, To encode the quantized discrete state, the continuous vector Map it to the index of its nearest prototype vector. The mapped discrete encoding not only represents the standardized behavior pattern of transactions under specific resource competition environments, but also compresses complex trajectory information into logical states with clear semantics, realizing the projection of data from continuous latent space to discrete symbol set, and providing structured input support for subsequent stochastic process modeling.

[0041] After obtaining the discrete state sequence, given that the instantaneous state only reflects the current competitive situation, while deadlock formation often exhibits dynamic evolutionary characteristics, the system enters the Sp5.2 stage to provide early warning and avoid potential risks. The system needs to determine whether the current blocking state will evolve into an irreversible deadlock loop based on historical evolution patterns, and conduct deadlock probability prediction based on a Markov evolutionary model. The intelligent decision-making and self-healing module inputs the discrete state encoding into a pre-trained Markov evolutionary model. By learning the path sequences of historical deadlock occurrences, it predicts the probability of the current transaction dependencies entering a "loop" state within a future prediction period (e.g., several milliseconds). The model utilizes the state transition probability matrix... Combined with the core formula: ; in, The model uses a state transition probability matrix to calculate chain transition probabilities, thereby assessing the inevitability of the current dependency path evolving into an irreversible deadlock loop. Once the predicted probability exceeds a preset risk threshold, the model will immediately identify and output the specific closed-loop path from the reconstructed global dependency chain, accurately locking the affected transaction set and its resource usage information, providing a clear basis for subsequent intervention decisions.

[0042] After confirming the existence and scope of the deadlock through probabilistic prediction, in order to minimize the overhead of resolving the deadlock while restoring system operation, the system enters the SP5.3 stage. This stage involves multi-dimensional cost assessment and sacrifice transaction optimization decisions. After determining the deadlock path, the intelligent decision-making and self-healing module initiates a cost assessment program, comprehensively weighing the amount of transaction rollback logs, consumed system resources (such as CPU cycles and memory usage), and business priority indicators. The basic principle followed by the cost assessment logic is: the larger the amount of rollback logs, the more expensive the rollback requires. Higher overhead indicates more resources consumed, suggesting the transaction is nearing completion. Terminating the transaction would result in greater computational waste. Business priority, on the other hand, represents the transaction's importance to the end user. The system uses a weighted cost function for decision-making, with the core formula defined as: ; in, For the first in the path One matter, The weighting coefficients for each indicator are used to optimize the selection process in high-probability deadlock loops. One or more transactions are minimized and sacrificed. Ultimately, the module generates targeted forced rollback or termination instructions and issues them to the transaction managers of the relevant shard nodes, breaking the global deadlock by sacrificing local transactions.

[0043] Furthermore, in order to achieve efficient coordination and accurate discrimination of the above five steps, the system has constructed a distributed collaborative control system driven by a global orchestration and scheduling engine. This engine, as the logical hub of the entire system, is responsible for managing the entire lifecycle control flow from local feature perception to global decision execution. Module Coordination and Control Mechanism: Edge-Center Collaborative Architecture: The system's coordination and control is based on a collaborative architecture of "edge preprocessing - center deep decision-making". In this architecture, local monitoring agents deployed on each shard node are responsible for performing data capture and preliminary feature extraction (Sp1, Sp2), and autonomously call the causal denoising processing module (Sp3) to complete signal purification under the local view. After the local agent completes denoising, the orchestration and scheduling engine pushes the processed feature embedding vector to the global manifold reconstruction module (Sp4) deployed at the global center of gravity through an asynchronous communication mechanism. This hierarchical control mechanism ensures a reasonable distribution of computational pressure. That is, the edge nodes are responsible for high-frequency, fine-grained causal intervention analysis, while the global center focuses on the logical alignment of cross-node manifolds, thereby reducing communication bandwidth consumption while realizing near real-time reconstruction of the global dependent view. System Control Flow Evolution: A Closed Loop from Perception to Self-Healing: The system's control flow follows a strict temporal progression and logical triggering relationship, ensuring that each stage of deadlock detection has a high degree of causal coherence. The control flow begins with the real-time transaction status perception of each shard node. When a local node identifies a potential blocking risk, it immediately triggers the causal intervention analysis of Sp3 to remove the pseudo-deadlock features caused by network latency. The denoised feature vector is then injected into the global reconstruction pipeline and guided by the orchestration and scheduling engine into the Sp4 stage. Through contrastive learning, manifold alignment is completed in the latent space. Once the global manifold reconstruction module outputs a long dependency chain with temporal consistency, the control flow seamlessly flows to the intelligent decision-making and self-healing module (Sp5). This module performs discretization decoding and evolution prediction. Finally, the control flow returns to the affected physical node in the form of a release instruction, completing the closed-loop control from local perception, causal denoising, spatial alignment to intelligent discrimination and final self-healing. Overall Control Deployment: A Unified Approach of Logical Centralization and Physical Distribution: In terms of overall control deployment, this system adopts a hybrid deployment strategy of logical centralization and physical distribution. The global orchestration and scheduling engine is deployed on the cloud coordinator or the database control plane, responsible for maintaining the global state machine and the configuration parameters of each functional module. At the physical execution level, each module is embedded into the kernel engine of the distributed database in the form of microservices or plug-ins. This deployment method allows the system to dynamically adjust the resource allocation of each module according to different load characteristics. For example, it can increase the intervention frequency of Sp3 when the network environment is poor, or increase the hash pre-clustering depth of Sp4 when cross-node transactions are intensive. Through this flexibility, the overall control deployment can ensure that the deadlock detection system maintains globally consistent judgments while possessing robustness to cope with large-scale distributed environment fluctuations, ultimately achieving real-time, accurate, and low-loss management of distributed deadlocks.

[0044] Furthermore, to more intuitively demonstrate the system's performance in a real-world distributed database environment, we will provide a complete implementation case study using a typical compute-storage separation architecture (HotDB Server, a distributed transactional database) in a cross-data center (IDC) disaster recovery environment as an example: Physical environment background: The system is deployed in two physical data centers (central computer room and disaster recovery computer room), containing multiple compute node servers and several storage node servers (DNs), and each shard of data (as shown in Table A) and Distributed across different physical storage nodes according to the sharding rules. and Due to cross-data center deployment, the network round-trip time (RTT) between compute nodes and storage nodes fluctuates between 2ms and 50ms.

[0045] Business conflict scenarios: Transaction T1 (Client A): Initiated on the compute node, first locking... The resource (ID=11) was then attempted to be updated. Resources on the site (ID=14); Transaction T2 (Client B): Initiated on the compute node, first locking... The resource (ID=14) was then attempted to be updated. The resource on the site (ID=11).

[0046] Execution process: Sp1: Heterogeneous Transaction Hypergraph Construction: Compute nodes capture transactions T1 and T2 in real time on different shard nodes through non-intrusive awareness. , The system identifies that transactions T1 and T2 are simultaneously competing for atomic resource domains located in different physical partitions by using lock request signaling on the data center. It then uses hyperedges to enclose these cross-node transaction vertices and constructs a heterogeneous transaction hypergraph across data centers. Sp2: Spatiotemporal feature diffusion modeling: The system continuously samples the execution progress of T1 and T2, records their state evolution trajectory during the resource waiting process, and the spatiotemporal feature calculation module captures the stagnation depth of transaction T1 when waiting for dn_2 response, and generates a state embedding vector by combining its resource occupancy level (such as the number of exclusive locks held). Sp3: Pseudo-deadlock intervention and removal based on structural causal model: Due to the offset of the data center tone clock or network jitter, the system observes the response delay of transaction T1. The causal noise reduction module performs counterfactual intervention simulation through the structural causal model (assuming that the network latency is zero) and determines that the current blockage is caused by logical resource mutual exclusion (ID=11 / 14 cross request) rather than instantaneous noise caused by cross-data center link fluctuations, thus retaining the real deadlock signal; Sp4: Global manifold reconstruction under latent space contrastive learning: Due to the inconsistency of physical clocks, the features reported by each shard node have phase deviations. The global manifold reconstruction module uses contrastive learning algorithms to no longer rely on physical timestamps, but logically aligns the trajectory of T1 on the two shards through the geometric similarity of behavioral features, thereby accurately restoring the global dependency chain spanning two physical shards. SP5: Deadlock Resolution Decision Under Cost Awareness: The system locks the deadlock loop formed by T1 and T2. The intelligent decision module evaluates various indicators: if T1 has generated a large amount of UndoLog (high rollback cost), and T2 is a newly initiated low-priority transaction, the system determines T2 as the "victim" based on the weighted cost function and issues a targeted termination command, thereby breaking the global deadlock with minimal system overhead and ensuring the high availability of the cross-data center disaster recovery system. ).

[0047] The above implementation cases based on compute / storage separation architecture and cross-data center environments demonstrate that the integration of deep learning models and causal inference technology has successfully achieved precise deadlock control in distributed scenarios with highly uncertain physical environments. The system utilizes a causal intervention mechanism to remove the "pseudo-deadlock" illusion caused by fluctuations in inter-IDC links from the underlying signaling, fundamentally solving the problem of misjudgment caused by environmental noise. At the same time, relying on latent space contrastive learning, the phase offset of physical clocks across nodes is offset at the logical level, ensuring lossless restoration of long-chain dependencies across data centers and shards. Finally, through a multi-dimensional cost perception mechanism, intelligent and low-loss self-healing of complex deadlock loops is achieved while ensuring high availability performance. This closed-loop process not only verifies the practicality of the technical solution in industrial environments but also significantly improves the operational resilience and throughput efficiency of distributed databases when facing extreme resource competition.

[0048] For further details, please refer to Figure 8 , Figure 9 and Figure 10 As shown, a diagram displaying the system's main interface and core monitoring views is provided to intuitively present the overall operation of distributed deadlock detection. Figure 8 The system main interface shown reflects the macroscopic operating status of the system by real-time monitoring of core indicators such as throughput, latency and lock contention, and lists in detail the microscopic execution details such as transaction ID, status, held and waiting resources, thus realizing a global awareness of the database kernel load. Figure 9 The system deadlock detection result interface shown is mainly used to output the closed-loop path identified in the SP5 stage, providing accurate triggering basis for operation and maintenance decisions; while Figure 10 The system transaction dependency graph interface shown is based on the global manifold reconstructed by Sp4, presenting the transaction dependency topology across nodes. It displays complex logical blocking relationships in a visual long chain graph, ensuring the transparency and traceability of the deadlock identification process.

[0049] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a reference structure" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0050] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for global deadlock detection in distributed databases based on deep learning, characterized by: The method includes the following steps: Sp1: Collect transaction metadata and lock contention topology of each node in the distributed database, construct a heterogeneous transaction hypergraph, and integrate the non-linear competition relationship between multiple transactions and a set of logical resources through hyperedges; Sp2: Perform spatiotemporal feature diffusion on the hypergraph, use convolution operators to fuse dynamic execution metrics of transactions, and generate a state embedding vector representing the blocking depth of transactions; Sp3: Implement causal intervention analysis, perform intervention simulation on the state embedding vector through structural causal model, and identify and eliminate pseudo deadlock feature signals caused by distributed network latency; Sp4: Perform latent space alignment of local features, aggregate feature embeddings of each node, and reconstruct the cross-node transaction evolution manifold at the global center using a contrastive learning mechanism; Sp5: Perform deadlock state decoding and prediction, discretize the state of the transaction evolution manifold, and output the deadlock closed-loop path and the corresponding transaction sacrifice decision.

2. The method for global deadlock detection in a distributed database based on deep learning according to claim 1, characterized in that: The method for constructing a heterogeneous transaction hypergraph in Sp1 includes the following steps: SP1.1: Real-time monitoring of the lock request queue of the database transaction manager, extracting a multimodal lock mode matrix including exclusive locks, shared locks, and intention locks; Sp1.2: Identify the primary key range and physical sharding location of the data objects accessed by a transaction, and associate transaction vertices involving the same atomic resource contention domain with the same hyperedge; Sp1.3: Calculate and assign the corresponding weights to the hyperedges based on the frequency of transaction concurrency conflicts, the real-time I / O load of resource sharding, and the data version chain depth under multi-version concurrency control.

3. The method for global deadlock detection in a distributed database based on deep learning according to claim 1, characterized in that: The method for performing spatiotemporal feature diffusion in Sp2 includes the following steps: Sp2.1: Define a Laplacian operator on the hypergraph topology to capture the state evolution trajectory of transaction nodes within a preset observation time window; Sp2.2: Utilizes a multi-head attention mechanism to allocate feature aggregation weights, and dynamically adjusts the contribution of different transaction nodes to the hyperedge features based on the historical activity level and current resource consumption level of the transaction. Sp2.3: Performs spatiotemporal convolution operations to map the aggregated hypergraph features into state embedding vectors with temporal continuity in a low-dimensional latent space.

4. The method for global deadlock detection in a distributed database based on deep learning according to claim 1, characterized in that: The method for implementing causal intervention analysis in Sp3 includes the following steps: SP3.1: Construct a structural causal model based on transaction waiting behavior to determine the causal logical path between network transmission delay, transaction waiting time and resource release signal; Sp3.2: The network transmission delay variable is assigned a value by the intervention quantifier, and the probability distribution of transaction blocking state transition under manual intervention is calculated. Sp3.3: Compare the original observed distribution with the probability distribution after intervention. When the distribution offset between the two is lower than the preset deviation threshold, the dependency relationship is determined to have causal stability and is retained as a true deadlock candidate feature.

5. The method for global deadlock detection in a distributed database based on deep learning according to claim 1, characterized in that: The method for performing local feature latent space alignment in Sp4 includes the following steps: Sp4.1: The position-sensitive hashing algorithm is used to pre-cluster the local feature embedding vectors of each node in order to establish a cross-node candidate association set; Sp4.2: Performs contrastive learning training at the global detection centroid, eliminating manifold feature phase deviation caused by physical node clock asynchrony by maximizing the similarity loss function of positive sample pairs; SP4.3: Associates transaction evolution manifolds of different nodes, and reconstructs long chains of cross-shard transaction dependencies with global temporal consistency.

6. The method for global deadlock detection in a distributed database based on deep learning according to claim 1, characterized in that: The method for performing deadlock state decoding and prediction in Sp5 includes the following steps: SP5.1: Utilizes vector quantization techniques to map continuous evolving manifold embeddings into discrete deadlock state codes of finite dimensions; Sp5.2: Input the state code into a pre-trained Markov evolutionary model to predict the closed-loop evolution probability of the current transaction dependency in a future preset period; SP5.3: Evaluate the cost of transaction rollback, taking into account the amount of transaction rollback logs, consumed system resources, and business priority indicators, and select the sacrificed transaction from the high-probability deadlock loop and generate a release instruction.

7. The system corresponding to the method for global deadlock detection in a distributed database based on deep learning according to any one of claims 1-6, characterized in that: The system includes: The multimodal feature perception module is used to capture transaction lock contention data of the distributed database kernel in real time, perform heterogeneous transaction hypergraph construction and feature diffusion operation, and generate embedding vectors that reflect the local resource contention state. The spatiotemporal feature calculation module is used to perform feature diffusion operations on the hypergraph topology. By fusing time series information with the graph topology, it captures the state evolution trajectory of transactions and generates a state embedding vector that represents the blocking depth of transactions. The causal denoising module is connected to the multimodal feature perception module and is used to perform intervention analysis on local features through a structural causal model to filter out pseudo-dependency features generated by network jitter. The global manifold reconstruction module is used to asynchronously aggregate the feature embeddings of each shard node and use a contrastive learning algorithm to align the transaction state manifolds of different nodes in the latent space to restore the global transaction dependency chain. The intelligent decision-making and self-healing module is connected to the global manifold reconstruction module. It is used to perform discretization decoding and evolution prediction of deadlock state, and issue deadlock resolution instructions based on the transaction rollback cost evaluation results.

8. The system corresponding to the method for global deadlock detection in a distributed database based on deep learning according to claim 7, characterized in that: The global manifold reconstruction module supports streaming incremental alignment and utilizes the geometric continuity of the manifold for state compensation when communication is blocked at some nodes, ensuring the availability of the detection task.

9. The system corresponding to the method for global deadlock detection in a distributed database based on deep learning according to claim 7, characterized in that: The intelligent decision-making and self-healing module has a built-in reinforcement learning optimizer that dynamically fine-tunes the causal intervention model parameters in the causal denoising module online based on the feedback signal of the system throughput after deadlock resolution.

10. The system corresponding to the method for global deadlock detection in a distributed database based on deep learning according to claim 7, characterized in that: The multimodal feature perception module directly reads the database transaction slot status through memory mapping technology, which reduces the intrusion on the main business path of the database while ensuring real-time detection.