Bidirectional incremental intelligent merging method in distributed storage fault recovery

By mapping the operation sequence to a multidimensional space-time coordinate system in a distributed storage system, constructing a causal interference map and searching for the space-time folding path, the problems of insufficient semantic understanding of operation conflicts and rigid serialization in the existing technology are solved, and the accuracy and automation level of data merging are improved.

CN120688017AActive Publication Date: 2025-09-23CHINA TOWER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511180006.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-22
Publication Date
2025-09-23
Estimated Expiration
2045-08-22

AI Technical Summary

Technical Problem

During the fault recovery process, existing distributed storage systems suffer from insufficient semantic understanding of operational conflicts and rigid serialization of resolution strategies. This results in low levels of automation and intelligence in the data merging process, requiring expensive manual intervention or the risk of data value loss.

Method used

By mapping the operation sequence to a multidimensional space-time coordinate system, generating a multidimensional space-time operation point set, constructing a geometric causal cone and analyzing interference, constructing a causal interference map, searching for space-time folding paths to avoid or minimize causal conflicts, and finally projecting the high-dimensional path into a one-dimensional execution sequence to achieve data state consistency.

Benefits of technology

It achieves deep semantic understanding and flexible avoidance of operational conflicts, improves the accuracy and automation level of data merging, and reduces the need for human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688017A_ABST
    Figure CN120688017A_ABST
Patent Text Reader

Abstract

The invention discloses a bidirectional incremental intelligent merging method in distributed storage fault recovery, and relates to the field of distributed data management. The method comprises the following steps: receiving operation sequences of local and remote increments, mapping the operation sequences to a multi-dimensional space-time coordinate system, and generating a multi-dimensional space-time operation point set; based on the multi-dimensional space-time operation point set, constructing a geometric causal cone for each operation point, and constructing a causal interference spectrum by analyzing interference among the geometric causal cones; according to the causal interference atlas and the multi-dimensional space-time operation point set, searching a space-time folding path to avoid or minimize causal conflicts, and obtaining an optimal space-time folding scheme; and projecting a high-dimensional path in the optimal space-time folding scheme into a one-dimensional execution sequence, and executing to achieve a consistent data state. According to the method, conflict analysis and solution are improved to a high-dimensional geometric space, deep semantic understanding and flexible avoidance of operation conflicts are realized, and the accuracy and automation level of data merging are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed data management, and in particular to a bidirectional incremental intelligent merging method in distributed storage fault recovery. Background Art

[0002] Distributed storage technology achieves excellent scalability, high availability, and fault tolerance by distributing data across multiple independent physical nodes, providing a stable and reliable data foundation for upper-layer applications. However, the physical dispersion of distributed systems also inherently exposes them to failure risks such as network partitioning, node downtime, and communication delay jitter. When a failure occurs and is recovered, a core task is to handle the incremental data updates generated on different nodes or partitions during this period, and to intelligently, efficiently, and correctly merge these diverging operation sequences so that the entire system ultimately converges to a globally consistent data state. Therefore, researching and designing advanced incremental data merging methods has important theoretical value and practical significance for ensuring the robustness of distributed systems, maintaining the integrity of data assets, and ensuring business continuity.

[0003] Currently, the industry has developed a series of mainstream technical solutions to address data merging in distributed systems. In simple scenarios, the Last-Writer-Wins (LWW) strategy, based on physical timestamps, is widely adopted. While this strategy is known for its simplicity, it cannot address network latency and clock skew, making it prone to accidental data loss. To address this issue, researchers have introduced logical clocks, with vector clocks being a representative technology. By maintaining a version vector for each node, vector clocks accurately capture the partial order causal relationships between operations, effectively identifying write-write conflicts caused by concurrent operations. In the field of data synchronization, research on conflict-free replicated data types (CRDTs) has also made significant progress. These are categorized into state-based CRDTs and operation-based CRDTs. The former guarantees eventual state convergence by defining merge functions that are commutative, associative, and idempotent. The latter requires that the operations themselves satisfy commutative properties, achieving consensus by ensuring that all replicas execute the same set of operations. In addition, the three-way merge algorithm derived from version control systems (such as Git) also provides a mature idea for handling data differences by comparing two conflicting versions with a common ancestor version.

[0004] However, these existing solutions still face a series of profound technical limitations when handling complex conflict scenarios, particularly bottlenecks in understanding the deep semantics of conflicts and the flexibility of conflict resolution strategies. Specifically, they suffer from a common semantic blindness to interference between operations and a rigid serialization of conflict resolution paths. Summary of the Invention

[0005] The purpose of the application is to provide a bidirectional incremental intelligent merging method in distributed storage fault recovery to solve the above-mentioned problems existing in the prior art.

[0006] This application provides a bidirectional incremental intelligent merging method for distributed storage fault recovery, including: Receive local and remote incremental operation sequences, map the operation sequences to a multi-dimensional space-time coordinate system, and generate a multi-dimensional space-time operation point set; Based on the multi-dimensional space-time operation point set, a geometric causal cone is constructed for each operation point, and a causal interference map is constructed by analyzing the interference between the geometric causal cones. Based on the causal interference graph and the multi-dimensional space-time operation point set, the space-time folding path is searched to avoid or minimize the causal conflict and obtain the optimal space-time folding solution; Project the high-dimensional path in the optimal spatiotemporal folding scheme into a one-dimensional execution sequence and execute it to reach a consistent data state.

[0007] The beneficial effects of this application are: this application realizes deep semantic understanding and flexible avoidance of operation conflicts, and improves the accuracy and automation level of data merging.

[0008] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A flowchart of a bidirectional incremental intelligent merging method for distributed storage fault recovery provided in an embodiment of the present application; Figure 2 A schematic diagram of a process for generating a multi-dimensional spatiotemporal operation point set according to an embodiment of the present application; Figure 3 A schematic diagram of the process of constructing a causal interference graph provided in an embodiment of the present application; Figure 4A schematic diagram of a process for obtaining an optimal space-time folding solution provided in an embodiment of the present application; Figure 5 A flowchart of projecting a high-dimensional path in an optimal spatiotemporal folding solution into a one-dimensional execution sequence is provided in an embodiment of the present application. DETAILED DESCRIPTION

[0010] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0011] It should be noted that the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or are inherent to these processes, methods, products or apparatus.

[0012] The study found that when dealing with complex conflicts, existing merging methods mainly expose two core flaws: insufficient understanding of the connotation of conflicts and the simplification of solution methods. On the one hand, they can identify conflicts in operations at the syntactic level, such as two concurrent write operations acting on the same data, but cannot distinguish from the business semantics whether the conflict is benign, compatible, or highly destructive, let alone quantitatively assess its interference intensity. On the other hand, in terms of solution strategies, these methods are limited to one-dimensional linear thinking and tend to incorporate all operations into a single execution sequence by forced reordering. They lack intelligent mechanisms that can flexibly bypass or avoid conflicts by transforming operations in higher dimensions. This kind of semantic blindness that can be seen but not understood and the rigid solution path that only queues up have jointly led to low levels of automation and intelligence in the data merging process, which often requires expensive manual intervention or the risk of damaging data value.

[0013] Specifically, the problem of semantic blindness manifests itself in the fact that existing technologies mostly focus on detecting conflicts at the syntactic level. For example, a vector clock can accurately identify two concurrent operations writing to the same data key, but it lacks insight into the business implications of the conflict. It cannot distinguish between a benign change, such as changing a product price from 100 yuan to 101 yuan, and a malicious change, such as changing it to 200 yuan. It also cannot distinguish between two distinct scenarios, such as two users concurrently adding different items to the same shopping cart (which should be merged) and two administrators concurrently modifying the permissions of the same user (which requires arbitration). Existing methods lack an effective mechanism to quantitatively analyze the intensity of interference between two operations, nor can they qualitatively determine whether the interference is destructive (such as the aforementioned price modification) or constructive (such as adding to a shopping cart). This lack of semantic understanding forces the system to adopt a one-size-fits-all, coarse-grained conflict resolution approach, either flagging all conflicts for manual intervention or applying simple strategies like LWW and risking data corruption or loss, falling far short of intelligent resolution.

[0014] The problem of rigid serialization manifests itself in conflict resolution methods. Once a conflict is detected, existing approaches often rely on reordering operations, attempting to find a unique, linear execution order for all conflicting and non-conflicting operations on a one-dimensional execution timeline that satisfies causal relationships. This solution paradigm is inherently one-dimensional and rigid. It fails to recognize that many conflicts may not be irreconcilable from a higher-dimensional perspective of space and time. A more flexible approach is lacking: proactively circumventing and bypassing the core conflict area by temporarily transforming certain operations in space and time—for example, temporarily relocating their execution to an isolated data space (spatial folding) or arranging them on a logically parallel timeline (temporal folding)—rather than rigidly determining which operations should run first. This single-minded approach limits the system's ability to find optimal merging solutions and fails to fully exploit potential parallel opportunities in multidimensional space, hindering further improvements in merging efficiency and quality.

[0015] like Figure 1 As shown, this application proposes a bidirectional incremental intelligent merging method in distributed storage fault recovery, including the following steps: Step 101: Receive the operation sequence of the local increment and the remote increment, map the operation sequence to a multi-dimensional space-time coordinate system, and generate a multi-dimensional space-time operation point set.

[0016] In this embodiment, linear operation histories generated on different nodes are converted into mathematical objects that can be geometrically analyzed in a high-dimensional space. Specifically, the incremental operation sequences generated by the local node during fault recovery, as well as the incremental operation sequences synchronized from other remote nodes, are read. The local sequence typically contains the operation type, target object, operation parameters, and a local physical timestamp, while the remote sequence may contain a logical clock (such as a vector clock) to record causal relationships. For each independent operation, multidimensional features are extracted, which together constitute the operation feature vector. These multidimensional features include at least: temporal features: for example, the physical time when the operation occurred and a logical timestamp used to track causal order; spatial features: for example, the logical address of the data object affected by the operation, the physical partition information of the data, and the node identifier performing the operation; and semantic features: for example, the type of operation (such as insert, delete, update) and the range of data that the operation may affect. The constructed multidimensional spatiotemporal coordinate system is not a simple Cartesian coordinate system, but rather a space with a specific metric. The time dimension can include both a physical timeline and a logical timeline; the spatial dimension can include a data topology dimension describing the logical adjacency of data and a node distribution dimension describing the physical distribution. Furthermore, a causal dimension can be constructed to represent the strength of dependencies between operations. To quantify the distance between any two points in this space, a corresponding distance metric function must be defined for each dimension. These functions together form a multidimensional spatiotemporal metric tensor. One or more nonlinear mapping functions are applied to transform the feature vector of each operation into its specific coordinates in a multidimensional spatiotemporal coordinate system. The core goal of this mapping is distance preservation, meaning that two operations with similar semantics or strong correlations in the original business logic are geometrically close to each other in the mapped high-dimensional space. For example, the calculation can be performed using the form coordinate = f(temporal feature) ⊕ g(spatial feature) ⊕ h(semantic feature), where f, g, and h are mapping functions, and ⊕ is a dimension fusion operator that effectively combines coordinate components from different dimensions. Ultimately, each operation obtains unique high-dimensional coordinates, forming a table of operation spatiotemporal coordinates. All operation points in the operation spatiotemporal coordinate table are embedded into the constructed multidimensional spacetime, forming a spatiotemporal point cloud. Analysis of this point cloud reveals the distribution patterns of operations. For example, by calculating the local density distribution of the point cloud, it is possible to identify areas with dense operations, which are often potential conflict hotspots; whereas areas with sparse operations may be safe merging zones. Furthermore, statistical methods such as kernel density estimation can be used to generate a continuous spatiotemporal density field, visually demonstrating the distribution of conflict risk throughout spacetime. Ultimately, a multidimensional spatiotemporal operation point set and a spatiotemporal density distribution map are obtained.

[0017] Step 102: construct a geometric causal cone for each operation point based on the multi-dimensional space-time operation point set, and construct a causal interference graph by analyzing the interference between the geometric causal cones.

[0018] In this embodiment, the impact of each operation is geometricized, and the conflict is quantified by the intersection of geometric bodies. Specifically, for each operation point in the multi-dimensional space-time operation point set, the system will construct a geometric body in space-time according to the type of the operation and its scope of influence, which is called a causal cone. The top of the causal cone is located at the space-time coordinate position of the operation point. The cone extends along the positive dimension of time, symbolizing the potential impact of the operation on the future. The fatness of the cone, that is, its angle in high-dimensional space, is determined by the impact intensity of the operation. For example, the causal cone of an operation that modifies a single row of data may be very slender; while the causal cone of an operation that modifies the entire table structure will be very wide. The causal cones of all operations together constitute a set of independent causal cones. A high-dimensional geometric calculation method is used to detect whether any two causal cones overlap or intersect in space-time. If two cones intersect, it means that there is overlap in the potential scope of influence of the two operations, that is, there may be causal interference. The degree of intersection can be calculated by calculating the volume V of the intersection area. intersect To quantify this, a larger intersection volume generally indicates a higher intensity of interference between the two operations. By calculating all possible pairs of operations, a causal cone intersection matrix can be generated, which records the intensity of interference between any two operations. Interference intensity alone is not enough; the nature of the interference must also be distinguished. Interference patterns can be categorized into at least three types: constructive interference, where the effects of two operations are mutually reinforcing or compatible; destructive interference, where two operations conflict, such as modifying different parts of the same data. This is the most concerning type of conflict; and neutral interference, where two operations have overlapping impacts but are independent of each other and do not create a semantic conflict. The system analyzes the spatiotemporal density gradient of the intersection region and the semantics of the operations themselves to determine the specific type of interference and label each pair of interferences, creating a classification table for interference patterns. All of these analysis results are integrated to construct a complete causal interference map. In this map, each node represents an operation, and edges between nodes indicate the causal interference relationship between the two operations. Edge weights can be set to the intensity of interference (i.e., the intersection volume), while edge colors or labels can be used to indicate the type of interference (e.g., red for destructive interference, green for constructive interference). Through graph algorithms, such as identifying strongly connected components in the graph, we can quickly find conflict clusters consisting of multiple operations, which are the focus of subsequent processing.

[0019] Step 103: Search for a spacetime folding path based on the causal interference graph and the multi-dimensional spacetime operation point set to avoid or minimize causal conflicts and obtain an optimal spacetime folding solution.

[0020] In this embodiment, the goal of this step is not simply to determine a fixed order for executing operations, but rather to find a path in high-dimensional space that circumvents conflicts by folding certain operations, actively changing their causal relationships. Specifically, based on the causal interference graph, operations suitable for spatiotemporal folding are identified. These operations typically possess certain characteristics, such as being located at the edge of the destructive interference region, having a small causal cone angle (limited impact range and low adjustment cost), or being symmetric in certain dimensions, making them easy to transform. The system calculates a folding potential score for each candidate operation to select the most promising folding candidates and form a set of candidate folding operations. One or more folding transformation function libraries are pre-set. These transformations are mathematical transformations applied to the spatiotemporal coordinates of the operations, aiming to change their spatiotemporal location or causal properties. For example: time folding: by introducing a virtual time dimension, the operation can be detoured in the logical time, thus avoiding the time conflict point; space folding: by remapping the logical address of the data object, the operation can be jumped in the data space, accessing a temporarily isolated space to avoid direct conflict; causal folding: by introducing a temporary intermediate buffer state in a causal dependency chain, the causal relationship can be soft-connected, temporarily removing the strong dependency. Using improved search algorithms (such as The algorithm searches for the optimal merging path in multidimensional spacetime. The algorithm's search goal is to reach a final state where all operations are successfully merged, from an initial state containing all pending operations. Each step in the path may be a regular operation or the application of a folding transformation. To guide the search, a path cost function is defined, which comprehensively considers the path length (execution efficiency), the cumulative interference intensity of the areas traversed by the path (conflict cost), and the complexity of applying the folding transformation (transformation cost). The algorithm uses dynamic programming to gradually construct a path with the lowest total cost, while allowing operations to fold in spacetime, to form a set of candidate folding paths. The system then rigorously verifies the candidate paths it finds. This includes checking whether the sequence of operations after a series of folding transformations still meets basic data consistency constraints (for example, data cannot be created or deleted out of thin air) and verifying whether the folding process itself introduces new and unexpected causal paradoxes. Monte Carlo simulations and other methods can be used to assess the stability of each path under various perturbations. Ultimately, the path with the highest overall score is selected as the optimal spacetime folding solution.

[0021] Step 104 : Project the high-dimensional path in the optimal spatiotemporal folding solution into a one-dimensional execution sequence, and execute the one-dimensional execution sequence to achieve a consistent data state.

[0022] In this embodiment, the abstract solution in the high-dimensional space is converted back into a linear instruction sequence that a computer can understand and execute. Specifically, the optimal space-time folding solution is retrieved, which is a trajectory in the high-dimensional space. By applying algorithms such as topological sorting, the relative execution order of all operations in the path (including folded operations) can be determined. For operations that can be executed in parallel in the original high-dimensional space (i.e., they overlap in the time dimension but are separated in other dimensions), they need to be serialized according to system resource constraints (such as CPU and I / O) when projected onto the one-dimensional timeline. The projection process must ensure the monotonicity of causal relationships. That is, if operation A depends on operation B, then in the final one-dimensional sequence, B must precede A. This process results in a one-dimensional projected operation sequence. The projected one-dimensional sequence is compared with the original causal interference graph to verify that all necessary causal constraints are maintained. A particular check is made for causal inversion (i.e., a later operation is incorrectly ordered before the dependent operation). Furthermore, key system invariants (e.g., the total account balance) must be verified before and after projection to ensure they remain unchanged. If any violations are found, the system attempts to correct them by locally adjusting the order of operations until a final, verified execution sequence is obtained. To improve efficiency, the resulting execution sequence is not completely serial. The system analyzes the sequence and identifies segments that can be executed in parallel. Typically, multiple independent operations within the same spatiotemporal fold region can be processed in parallel by multi-threaded executors. However, synchronization points are required between different fold regions or at key causal dependencies. At these synchronization points, all parallel threads must wait and perform state consistency checks to ensure that the merged results to that point are correct before proceeding to the next execution phase. Multiple snapshots of the execution state are generated during the execution process. After all segments have completed execution, the system performs final state convergence operations. This involves merging the execution results of the parallel branches and resolving any minor inconsistencies (for example, using a last-writer-first policy). After convergence is complete, a global consistency verification is performed. This verification not only checks data integrity (such as foreign key references) but also includes business rule constraints (such as the correctness of order status flow). This ensures that the entire spatiotemporal folding and merging process does not compromise the business semantics of the data. After all verifications are completed, the system outputs the data state that has achieved final consistency.

[0023] like Figure 2 As shown, according to one aspect of the present application, generating a multi-dimensional spatiotemporal operation point set includes: Step 201: extracting temporal features, spatial features, and semantic features for each operation from the local and remote incremental operation sequences to form an operation feature vector; In step 202 , a dimension fusion operator composed of a preconfigured neural network is applied to nonlinearly transform the operation feature vector into space-time coordinates, and a multi-dimensional space-time operation point set is generated based on the space-time coordinates.

[0024] The neural network training process aims to minimize the difference between the geometric distance in the spatiotemporal coordinate system and the preset semantic distance between operations, so that semantically similar operations are also close to each other in the multidimensional spatiotemporal coordinate system.

[0025] Specifically, after extracting the temporal, spatial, and causal feature vectors of each operation, a dimensional fusion operator composed of a feedforward neural network is used to generate the final coordinates. The network inputs are the concatenated original feature vectors and manually constructed interaction feature terms (such as the product of temporal and spatial features) to capture coupling relationships. The network structure can be a multi-layer perceptron with multiple hidden layers. For example, the input layer has the dimension of the total concatenated feature vectors; the hidden layer can contain 1 to 3 hidden layers, each followed by a ReLU activation function and a batch normalization layer to accelerate convergence and prevent gradient vanishing. To prevent overfitting, a dropout layer can also be added; the output layer has the dimension of the target spatiotemporal coordinate system (for example, 8 dimensions). Before output, the Tanh activation function is used to normalize the coordinate values ​​to the range [-1, 1]. The training objective of this neural network (i.e., the loss function) is the core of this embodiment. It is not simple supervised learning, but rather metric learning aimed at preserving distance. Its loss function typically consists of multiple parts: loss = α × L dist +β×L cluster +γ×L reg ; where L dist is the distance preserving loss, such as Σ|d semantic (op i ,op j )-d spacetime (coord i , coord j )| 2 , which aims to penalize mappings that destroy the consistency between semantic distance and spatiotemporal distance; d semantic is a predefined function that measures the semantic similarity of two operations, and d spacetime is the geometric distance of the mapped coordinates, op i is the i-th operation instance, coord i is the output coordinate point corresponding to the i-th operation; L cluster It is a clustering loss, such as contrast loss, which encourages similar operations (such as all updates to the same data table) to cluster in time and space, and different types of operations to stay away from each other, such as Lcluster = -Σlog(exp(sim(i, j)) / Σexp(sim(i, k))), where sim(i, j) represents the similarity between sample i and positive sample j (for example, the same type of operation), and the denominator is the sum of the similarities between sample i and all other samples, including negative samples. This loss term pulls positive sample pairs closer and pushes negative sample pairs farther in the embedding space, so that similar operations naturally cluster together. L reg is a regularization term, for example, -log(det(Cov(coordinates))), where det is the determinant operator, Cov is the covariance matrix, and coordinates is the set of coordinate points after all mapping operations. This prevents all coordinate points from collapsing into a low-dimensional subspace, thus ensuring the effective dimensionality of the coordinates. α, β, and γ are the weights of each term. The principle of using neural networks for nonlinear mapping is that the interactions between operations are extremely complex, far beyond the scope of linear models. The powerful nonlinear fitting capabilities of neural networks enable them to automatically learn these complex, high-order mapping relationships from data, thereby generating spatiotemporal point sets with richer semantic information and more rational structure.

[0026] This embodiment minimizes |d by training semantic (op i ,op j )-d spacetime (coord i , coord j )| 2 A neural network fusion operator with the goal of achieving semantically preserving mapping from discrete operation sequences to continuous high-dimensional space. Temporal features f(t), spatial features g(s), and causal features h(c) are nonlinearly transformed through a deep network including interaction terms. The resulting 8-dimensional spatiotemporal coordinates preserve over 95% of the semantic relationships between the original operations. In a real-world distributed storage system, related operations on the same data table are automatically clustered within a spatiotemporal neighborhood. Compared to random mapping methods, this reduces the computational complexity of subsequent causal analysis while improving the recall rate of conflict detection.

[0027] Furthermore, the distance metric in the multidimensional space-time coordinate system is determined based on a composite metric function customized for the coordinate system, which includes at least: a time dimension, which is obtained by weighting the absolute difference between the physical timestamps between the fusion operations and the edit distance of the logical clock vector; and a space dimension, which is obtained by fusion of the shortest path length of the data on the partition topology graph and the hash distance of the data key.

[0028] In this embodiment, the distance between any two points in the coordinate system is not a single Euclidean distance, but is a composite of customized metric functions in various dimensions.t The calculation method of (op1, op2) is: t =w p ×|t1 p -t2 p |+w l ×edit dist (t1 l , t2 l );where t1 p , t2 p are the physical timestamps of the two operations respectively; |t1 p -t2 p | is their absolute difference; t1 l , t2 l is a logical clock vector of two operations (such as a vector clock); dist It is to calculate the edit distance between two vectors, which can accurately reflect the causal partial order relationship recorded by the vector clock; p , w l is the weight coefficient, which can be dynamically adjusted according to the accuracy of system clock synchronization. s The calculation method of (op1, op2) is: s =shortest path (s1, s2) + λ × hash dist (s1, s2); where s1 and s2 represent the data objects affected by the two operations; shortest path (s1, s2) is the shortest path length between the partitions where two data objects are located in the topological graph composed of the adjacency relationship of the data partitions, reflecting the logical distance of the data in the architecture; hash dist (s1, s2) is a distance between the hash values ​​of two data keys, such as Hamming distance, which reflects the similarity of the data content; λ is a weight coefficient. Optionally, a causal dimension d can also be defined. c (op1, op2): d c =|depth(c1)-depth(c2)|+κ×(1-J(deps(c1), deps(c2))); where depth(c) is the depth of the operation in the causal dependency chain; J(deps(c1), deps(c2)) is the Jaccard similarity coefficient of the dependency sets of the two operations; and κ is the weighting coefficient. The composite metric function unifies multiple distance concepts from the physical world, business logic, and system architecture into a mathematical framework, making subsequent geometric analysis (such as nearest neighbor search and region query) meaningful for business and system applications.

[0029] like Figure 3As shown, according to one aspect of the present application, constructing a causal interference graph includes: Step 301: For each operation point in the multidimensional spatiotemporal operation point set, the influence range of each operation point in time, space, and causal dimensions is calculated based on the semantic attributes of the operation point, and a geometric causal cone with a specific multidimensional angle is generated to obtain a geometric causal cone set. Step 302, quantifying the causal interference strength between any two geometric causal cones in the set of geometric causal cones by estimating the intersection volume in the high-dimensional space; Step 303: construct a causal interference graph based on the causal interference strength, wherein nodes represent operations and edge weights correspond to the interference strength.

[0030] In specific implementation, the generation of geometric causal cone is based on its multi-dimensional angle. Taking three-dimensional space-time as an example, the angle vector Θ=(θ t ,θ s ,θ c ) is calculated as follows: time dimension angle θ t =arctan(I t / v t ), where I t is the impact intensity of the operation in the time dimension (such as the duration of the operation), v t This is the causal propagation speed constant of the aforementioned dynamic calculation; the spatial dimension angle θ s =2×arctan(I s / d avg ), where I s is the impact intensity of the operation on the spatial dimension (such as data coverage), d avg is the average data spacing in the system; the causal dimension angle θ c =π×I c / C max , where I c is the impact strength of the operation on the causal dimension (such as the depth of the trigger chain), C max is the maximum causal chain depth defined by the system. These causal cones with specific opening angles form the basis for subsequent analysis. By estimating the maximum causal chain depth between any two causal cones (cone i , cone j ) of the intersection volume V intersectTo quantify the interference intensity. Since the analytical calculation of high-dimensional volume is very complicated, this embodiment preferably uses the Monte Carlo method for estimation. That is, a large number of random sampling points are generated in the minimum bounding box of the two causal cones, and the intersection volume is approximately calculated by counting the proportion of points that fall into the two cones at the same time. Replacing the analytical probability with statistical frequency reduces the computational complexity while meeting the accuracy requirements. The weight of the edge of the causal interference map finally constructed is the quantified interference intensity, which provides a richer and more refined decision-making basis for path search than the traditional binary conflict model.

[0031] Optionally, in order to make the graph contain richer semantics, before constructing the causal interference graph, it also includes: defining an internal causal density field for each geometric causal cone, where the gradient of the causal density field represents the propagation direction of the causal influence; in the intersection area of ​​any two geometric causal cones, calculating and comparing the gradient directions of their respective causal density fields; based on the comparison results of the gradient directions, labeling the causal interference represented by the intersection as destructive interference or constructive interference; the construction of the causal interference graph further includes using the label as an attribute of the edge.

[0032] Specifically, the influence within each causal cone is not uniformly distributed, but gradually decays from the top of the cone (the operating point) outward. For this purpose, this embodiment defines the causal density field function ρ(P): ρ(P) = ρ0 × exp(-||P-P0|| 2 / σ 2 )×H(P); where P is the coordinate of any point in the cone; P0 is the top of the cone, that is, the space-time coordinate of the operating point; ρ0 is the central density of the top of the cone; σ is the coefficient that controls the rate of density decay; H(P) is an indicator function, which is 1 when the point P is inside the cone and 0 otherwise. The gradient of the density field ▽ρ(P) physically represents the propagation direction of the strongest causal influence of the point. When two causal cones intersect, the system calculates the angle Φ(P)=arccos(<▽ρ1,▽ρ2>) between the two density field gradients in their intersection area, where <> is the inner product. The value of cos(Φ(P)) reveals the nature of the interference: if cos(Φ(P)) is close to 1, it means that the two influence directions are consistent, which is constructive interference; if it is close to -1, it means that the influence directions are opposite, which is destructive interference; if it is close to 0, it is neutral interference. By numerically integrating ρ1(P)×ρ2(P)×cos(Φ(P)) in the intersection region, the weighted interference intensity value I, which contains both the interference intensity and properties, can be obtained. weighted This allows system decision-making to go beyond simple conflict avoidance. For destructive interference, the system will choose to fold and bypass; for constructive interference, the system can selectively schedule related operations together to potentially gain performance gains, providing a new dimension for optimized execution.

[0033] This embodiment achieves a breakthrough from traditional binary conflict judgment to continuous quantitative evaluation by modeling the causal impact of operations as geometric causal cones in high-dimensional space and calculating the intersection volume of the cones to quantify the interference intensity. Specifically, by defining multi-dimensional angles and causal density fields, the system can accurately calculate the degree of interference between any two operations. In distributed storage fault recovery scenarios, it can identify weak conflicts missed by traditional methods (such as partial data range overlap), improving the accuracy of conflict detection. At the same time, it distinguishes between constructive and destructive interference through gradient direction analysis, avoiding unnecessary serialization and increasing the proportion of operations that can be executed in parallel.

[0034] like Figure 4 As shown, according to one aspect of the present application, obtaining an optimal spatiotemporal folding solution includes: Step 401: Based on a multi-dimensional spatiotemporal operation point set and a preset folding transformation type, a spatiotemporal state space including executed operations, pending operations, and a current folding configuration is defined; Step 402: construct a cost function including path length, interference strength and folding complexity based on the causal interference graph; Step 403: Apply the cost function to perform optimization search in the spatiotemporal state space to obtain the optimal spatiotemporal folding solution.

[0035] Specifically, it is necessary to define a state space for the search. The spatiotemporal state space is a mathematical abstraction that describes the progress of the merging problem at any time. In this embodiment, the state S can be defined as a triple: S = (ops executed , ops pending , fold config ). Among them, ops executed Is a collection of operations that have been scheduled or executed; ops pending is another collection containing all pending operations; fold config Records the currently effective spatiotemporal folding configuration, such as which operations apply which type of folding transformation. The transition from one state to another (i.e., state transition) can be achieved through two actions: one is to execute ops pending Operations in and move them into ops executed ; Second, for ops pending The operations in apply the fold transformation and update the fold config All possible states and the transition relationships between them together constitute a huge spatiotemporal state transition graph. On this basis, in order to guide the search algorithm to find the optimal path, it is necessary to construct a refined multi-objective cost function. This function is used to evaluate the cost of going from the initial state to the current state. Optionally, the cost function Cost can be parameterized as: Cost = α × L path+β×I conflict +γ×C fold +δ×T delay ; Among them: L path Indicates the path length, usually the number of state transitions, represents the total number of execution steps, and is directly related to the execution efficiency; I conflict It represents the cumulative conflict interference intensity of the area where the path passes. This value is obtained from the causal interference map and is a direct measure of the path conflict risk. fold represents the sum of the computational complexity of all applied folding transformations in the path, representing the additional computational overhead paid to avoid conflicts; T delay represents the expected sum of execution delays introduced by applying folding transformations (especially time folding); α, β, γ, δ are weight coefficients of each term, which can be set by prior knowledge or dynamically adjusted by methods such as Pareto optimization to achieve a balance between different goals (such as high efficiency, low conflict, and low overhead). With the state space and cost function, the system can apply the following in the spatiotemporal state transition diagram: , Dijkstra and other optimization search algorithms to find a path from the initial state (all operations are in ops pending in) to the target state (all operations are in ops executed The path that minimizes the value of the above Cost function is the optimal space-time folding solution.

[0036] Furthermore, the optimization search is achieved by applying at least one folding transformation selected from the following group, which aims to change the causal relationship between operations: temporal folding; spatial folding; causal folding.

[0037] In this embodiment, time folding: for the destructive interference identified in the causal interference graph, a virtual time dimension that depends on the strength of the interference is introduced for the relevant operations, thereby logically creating a parallel execution timeline, so that the conflicting operations can be bypassed. In specific implementation, time folding does not actually change the physical time, but adopts a mechanism similar to multi-version concurrency control (MVCC). When two operations (OpA, OpB) have a time conflict, the system can create one or more parallel timelines or time layers. For example, OpA continues to execute on the primary timeline, while OpB is scheduled to a new alternative timeline, on which OpB can be executed immediately without waiting for OpA. This bypass is achieved by attaching a time-folded representation to the operation, which may include: TimeFold(primary time , execute time , fold layer , time slot ). Among them, primary timeIs the time when its original logic occurs, execute time is the planned execution time after taking into account the offset introduced to avoid conflicts, fold layer Identifies the timeline level to which it belongs, and time slot Time division multiplexing can be used to further subdivide the same layer to avoid new conflicts. TimeFold() is time folding. Conflicting operations that would have been executed serially can now be logically executed in parallel and merged when their impact areas no longer overlap.

[0038] Space folding: The data objects associated with the conflicting operations are dynamically projected to an isolated shadow data space, and the operations are executed in the shadow data space to avoid direct access conflicts to the main data space. Its principle is similar to copy-on-write. When a data object to be modified by an operation is being accessed by another conflicting operation, the system will not block the operation, but will dynamically create a shadow partition or shadow space. The conflicting operations are redirected to this shadow space for execution. For example, for the data key data key The modification will be mapped to the shadow partition shadow id In order to optimize the cost, data replication can adopt the delayed replication (LAZY) strategy, that is, the data is copied only when it is actually modified. At the same time, the system will establish a mapping relationship fold mapping , records the original location, shadow location, replication strategy, and conditions for future merges condition This condition is usually when all conflicts related to the data have been resolved, at which time the system merges the changes in the shadow space back into the main data space.

[0039] Causal folding: In a broken causal dependency chain, buffer nodes with estimated results and compensation logic are implanted between interdependent operations to achieve temporary decoupling and flexible connection between operations. When operation OpB strongly depends on the result of OpA, but OpA is delayed for some reason, causing the causal chain to break, the causal folding mechanism will intervene. It will not block OpB indefinitely, but will insert one or more compensation nodes or placeholder operations (Placeholder) between OpA and OpB. This placeholder will contain an expected value of the result of OpA (the expected value of the result of OpA). result), as well as a timeout mechanism and an alternative fallback value (fallback). OpB will temporarily establish a weak dependency (Weak Dependency) with this placeholder and continue execution. This weak dependency contains an availability condition, namely is_dependency_available (dep), which represents an availability detection function, which is used to check whether the actual result of OpA is ready in the future. When the actual result of OpA finally arrives, the system will execute the result fusion and compensation function (merge_function), which is responsible for merging the actual result with the estimated result (for example, weighting it according to the estimated confidence level) and compensating or correcting the execution result of OpB. This realizes the soft connection of the causal chain and improves the fault tolerance and concurrency of the system.

[0040] This embodiment introduces three transformations: time folding, space folding, and causal folding, to achieve the ability to actively change the causal relationship between operations without changing the eventual consistency. Time folding creates parallel timelines, allowing conflicting operations that originally had to wait serially to be executed in parallel at different time layers, reducing the average operation waiting time. Space folding achieves isolated access to conflicting data by dynamically creating shadow partitions, avoiding write-write conflict blocking. Causal folding converts strong dependencies into fault-tolerant weak dependencies by inserting compensation nodes with estimated results, allowing the system to maintain operational throughput in extreme failure scenarios such as network partitions.

[0041] According to one aspect of the present application, before performing the optimization search, it also includes: constructing folding transformation functions for time folding, space folding and causal folding respectively; applying a preset Lyapunov function to perform convergence analysis on the dynamic characteristics of each folding transformation function to verify and correct the stability of the folding transformation function in the state space; based on the results of the analysis and correction, generating a stable folding transformation function library, and the optimization search is achieved by calling this stable folding transformation function library.

[0042] Specifically, in order to ensure that the folding transformation itself does not bring chaos to the system or cause state divergence, its stability needs to be mathematically verified. In this embodiment, the verification process is implemented by Lyapunov's second method. The state of the system (for example, a vector x consisting of the number of conflicts, the number of pending operations, the current folding depth, etc.) is modeled. Define the scalar Lyapunov function V(x), which must be positive definite, and when the system is in an ideal stable state (such as no conflict), V(0)=0. The commonly used form is the quadratic function V(x)=x T Px, where P is a positive definite matrix whose elements reflect the weights of different state components; T is the transpose. Calculate the derivative V of V(x) along the system state trajectory dotIf for any state x, its derivative V dot are all negative definite (or at least semi-negative definite), then it is proved that the system is asymptotically stable after applying the folding transformation, that is, the system state will eventually converge to the equilibrium point. dot If the value of the transformation exceeds a small negative threshold (-STABILITY_MARGIN) in certain states, it indicates that the transformation may be unstable. In this case, the transformation function needs to be modified, for example by adding a damping term -ε▽V, which is in the opposite direction of the gradient of V(x), to suppress its divergence. ▽ represents the gradient and ε is the damping coefficient. After this verification and modification, all stable folding transformation functions were collected to form a stable folding transformation function library, which can be safely used by the search algorithm.

[0043] This embodiment defines the Lyapunov function and verifies the negative definiteness of its derivative, mathematically ensuring that the space-time folding transformation will not cause the system state to diverge. Stability analysis is performed on each folding transformation function. When V is detected dot > -STABILITY_MARGIN, a damping term is automatically added for correction. In large-scale distributed storage failure recovery scenarios involving thousands of concurrent operations, this stability-guaranteeing mechanism ensures that the folding path ultimately converges to a consistent state, avoiding the potential chaotic behavior introduced by the folding transformation. Compared to heuristic methods that lack theoretical guarantees, this reduces the failure rate of failure recovery and excels in complex cascading conflict scenarios.

[0044] According to one aspect of the present application, the optimized search is performed using an improved The algorithm is used to perform the following tasks: continuously monitoring the validity of the path during the search process to identify whether the search has fallen into a preset deadlock state; when a deadlock state is identified, calling the time folding transformation to trace the current search state back to the previous spatiotemporal state point; and starting from the previous spatiotemporal state point, continuing to explore new path branches to seek the global optimal solution.

[0045] In this embodiment, the standard The algorithm's heuristic function h(s) is designed to estimate the minimum future cost required to move from the current state s to the goal state. A valid heuristic estimate for h(s) can be a function such as min_fold(remaining_conflicts), which estimates the minimum folding cost required to resolve all remaining conflicts. The algorithm's core improvement lies in its spatiotemporal backtracking mechanism. During the search, the algorithm maintains a folding history and continuously monitors whether the search has reached a deadlock. For example, if all pending operations are prevented from executing due to destructive interference and all available folding transformations fail to break the deadlock. Upon identifying a deadlock, the algorithm does not declare failure immediately but instead triggers a spatiotemporal backtracking: a time folding transformation is invoked to rewind the current search state to a previous spatiotemporal point in the historical path, logically equivalent to going back in time and choosing an alternative path. From this backtracking point, the path branch that previously led to the deadlock is added to a taboo list, and exploration of other paths continues. This enhances the algorithm's ability to find the global optimal solution and avoids search failures caused by local optima or traps.

[0046] This embodiment introduces a folding history maintenance and deadlock detection mechanism into traditional A-search. When it is determined that all pending operations cannot be executed due to destructive interference, it can invoke a time-folding transformation to backtrack to the previous state point and add the path that caused the deadlock to a taboo list. This allows the algorithm to escape local optimality traps and improves the search success rate in scenarios with complex circular dependencies. In actual distributed database fault recovery, especially when faced with complex dependency networks formed by cascading triggers and foreign key constraints, the number of search backtracking times is reduced, reducing the problem that originally required exponential time to polynomial time complexity.

[0047] Furthermore, when an operation requires the application of multiple folding transformations, it also includes: identifying the conflict type involved in the operation from the causal interference graph; and dynamically arranging the application order of time folding, space folding and causal folding transformations based on the identified conflict type to generate an optimal composite folding strategy; optimized search is performed by applying the composite folding strategy.

[0048] Specifically, in complex conflict scenarios, operations may involve multiple types of conflicts at the same time (for example, there are both time competition and conflicts on data objects). At this time, simply applying folding transformations in sequence may not be optimal, and may even cause new problems. Therefore, a dynamic orchestration mechanism for compound folding is introduced. When compound folding needs to be applied to an operation, the system will first query the causal interference graph to analyze the main types of conflicts involved in the operation. For example, if it is mainly destructive write-write conflicts, spatial folding may be applied first to isolate data; if it is mainly causal dependency breaks, causal folding should be applied first. The system will dynamically determine the order of application of these folding transformations based on preset rules or small decision models to form a compound transformation Φ=T fold ○S fold ○C fold , where ○ is a compound operator, T fold Folding for time, S fold For space folding, C fold This order is dynamically adjusted to achieve the best conflict resolution effect and the lowest transformation cost. At the same time, the system also makes the composite transformation reversible, that is, Φ -1 exists to ensure that the final result can be correctly merged. When the optimized search algorithm encounters such complex situations, it will directly apply this dynamically generated, optimal composite folding strategy instead of trying individual transformations one by one, thereby improving the efficiency and quality of the search.

[0049] In order to make the shape of the causal cone adaptive to the current operating status of the system, preferably, a geometric causal cone with a specific multi-dimensional angle is generated, and a dynamic causal propagation speed constant is used to assist in the calculation, including: continuously monitoring the runtime metrics of the distributed system to obtain system status data including average operation delay and dependency density; based on the system status data, periodically recalculating and adjusting the value of the causal propagation speed constant so that the shape of the geometric causal cone can adapt to the current status of the system.

[0050] Specifically, the causal propagation rate constant, represented here by v t Its physical meaning is to measure the diffusion rate of the influence of an operation in the time dimension. t The calculation can be based on the function calculate_causal_velocity(system_metrics), which receives a series of system runtime metrics as input. For example: basic speed calculation: v base =1.0 / avg op_latency ; where avg op_latencyis the average operation delay of the system. The principle of this step is that the lower the system delay, the more causal effects can be propagated per unit time, and the faster the basic speed should be; dependent density adjustment: v adjusted =v base ×(1-0.5×dependency density ); where dependency density It is the dependency density between operations in the system, and its value is between [0, 1]. The denser the interdependence of operations in the system, the more it will hinder the free propagation of causality, so the propagation speed needs to be slowed down. System load impact: v t =v adjusted ×(2-system load );where system load is the current load of the system, and its value is between [0, 1]. The higher the load, the tighter the system resources, and the slower the actual propagation speed of the impact. The final calculated v t It will be limited to a reasonable range, such as [0.1, 10.0], to avoid excessive divergence or convergence of the causal cone. This makes the construction of the causal cone no longer static and unchanging, but can accurately reflect the behavior of the system under different conditions such as high load, high latency or high dependency, thereby improving the accuracy of subsequent conflict analysis. t The calculation can also introduce the operation type as a variable, for example, the v of the read operation t Can be set faster than the write operation v t Higher, because the effects of read operations typically spread faster.

[0051] This embodiment continuously monitors the system runtime metrics and dynamically adjusts the causal propagation speed constant so that the causal cone shape can reflect the system status in real time. Parameters such as average operation delay, dependency density, and system load are integrated into the cone construction process. In high-load scenarios (load>0.8), v t It automatically decreases to 0.3-0.5, generating a steeper causal cone, which accurately reflects the actual situation that the operation effect propagation slows down; in the low-latency memory database scenario, v t The causal cone can reach 8-10, generating a flat causal cone. This approach maintains conflict prediction accuracy across different system states, reducing the false positive rate compared to fixed-parameter methods. This is particularly effective during fault recovery periods when system load fluctuates dramatically.

[0052] like Figure 5 As shown, according to one aspect of the present application, the high-dimensional path in the optimal spatiotemporal folding scheme is projected into a one-dimensional execution sequence, including: Step 501, perform initial projection on the high-dimensional path to generate a preliminary one-dimensional operation sequence; Step 502 , comparing the preliminary one-dimensional operation sequence with the causal dependencies contained in the optimal spatiotemporal folding solution to identify any causal inversion conflicts; Step 503 , for the identified causal inversion conflict, the preliminary one-dimensional operation sequence is reordered by constructing and solving a constraint satisfaction problem with the causal order being a hard constraint; the reordered causally consistent sequence is used as the one-dimensional execution sequence.

[0053] Specifically, the initial projection can be achieved in a variety of ways. For example, a preferred approach is to use principal component analysis (PCA) to analyze all points on the high-dimensional path, identify the principal component direction with the largest variance, and use this as a preliminary one-dimensional timeline. All high-dimensional coordinate points are then linearly projected onto this principal component axis to obtain a preliminary sequence, which may contain causal errors. This preliminary sequence is then verified and repaired. The core of this process is to construct and solve a constraint satisfaction problem (CSP). The CSP is defined as follows: Variables: For each operation to be sorted in the set, its variable is its position (an integer) in the final one-dimensional sequence; Domain: The value range of each variable is from 1 to the total number of operations to be sorted N; Hard Constraints: For any pair of causal dependencies in the original causal graph (for example, operation OpA must be executed before OpB), a hard constraint Position(OpA)<Position(OpB) is added to the CSP. This is a condition that must be met to ensure the causal correctness of the final sequence; Soft Constraints: In order to make the final sequence maintain the structure of the initial projection as much as possible, a soft constraint can be added to each operation. Its goal is to minimize the deviation between its final position and the initial projection position, for example, minimize |Position(Op)-InitialPosition(Op)|, where Position(Op) is the integer position of operation OP in the final repair sequence and InitialPosition(Op) is the position of operation OP in the initial linear projection sequence. By solving this CSP (for example, using a search algorithm with backtracking or a specialized CSP solver), we can obtain an optimal solution that satisfies all hard constraints and, as far as possible, soft constraints. This solution is the final one-dimensional execution sequence that is causally consistent. Translating the complex sequencing problem into a mathematical model with a solid theoretical foundation ensures the completeness and optimality of the repair process.

[0054] Furthermore, after generating a causally consistent one-dimensional execution sequence, the method also includes: comparing the structural complexity of the high-dimensional path and the one-dimensional execution sequence to quantitatively calculate the information loss metric caused by projection; identifying operations that can be parallelized in the high-dimensional path but are serialized in the one-dimensional execution sequence; and attaching the information loss metric and the identified operations as compensation metadata to the corresponding operations in the one-dimensional execution sequence to guide resource allocation and scheduling in the final execution stage.

[0055] In this embodiment, the projection from a high-dimensional space to a one-dimensional space inevitably loses information, particularly information about parallelism. To compensate for this loss, the information loss is quantitatively calculated and encoded as metadata. Information loss metrics may include: entropy loss, calculated by calculating the difference between the information entropy of the high-dimensional path point distribution and the information entropy of the one-dimensional sequence; structural loss, calculated by analyzing the degree to which the topological structure (e.g., branches and folds) of the high-dimensional path is preserved after projection; and parallel opportunity loss, calculated by counting the number of pairs of operations that are not causally dependent and conflicting (i.e., parallelizable) in the high-dimensional space but are forced to be serialized after projection due to one-dimensional linearization. The calculated information loss value, along with the original set of parallelizable operations identified, are packaged as compensation metadata and attached to the corresponding operation record in the one-dimensional sequence. For example, the metadata for operation OpA might include {info_loss: 0.35, parallel_candidates: [OpC, OpD]}, where info_loss is a measure of the information lost during the projection process for the current operation and parallel_candidates is the set of other operations that could have been executed in parallel with the current operation in the high-dimensional space. This makes the subsequent executor not just a blind instruction executor, but an intelligent scheduler that can understand the historical context. If resources permit, it can try to execute OpA in parallel with OpC and OpD, thereby partially recovering the lost parallelism and improving execution efficiency.

[0056] Furthermore, virtual time metadata is attached to the operations in the one-dimensional execution sequence, and the final execution process is completed by a virtual time-aware scheduler, wherein: the virtual time metadata is intended to encode the scheduling information lost in the projection process from the high-dimensional path to the one-dimensional execution sequence, and the information at least includes: the original logical timing of the operation before space-time folding, or the execution delay calculated to deal with conflicts; the virtual time-aware scheduler is configured to parse the metadata in real time and adjust the final execution of the operation based on the original logical timing or execution delay encoded therein.

[0057] Specifically, virtual time metadata is a special form of compensation information. For example, an operation is calculated as an execute in time folding. time, this timestamp may not completely correspond to its sort position in the one-dimensional sequence. time It can be attached as virtual time metadata. The final executor is a virtual time-aware scheduler. When it is ready to execute the next operation in the sequence, it will first check its virtual time metadata. If the metadata indicates that the operation needs to be delayed, the scheduler will suspend execution until the delay condition is met. The timing arrangement carefully calculated in the high-dimensional space to resolve conflicts is passed to the final execution stage in the form of lightweight metadata, so that the final physical execution can reproduce the essence of the high-dimensional optimal path to the greatest extent possible, rather than just following a simple, incomplete linear order. Optionally, virtual time metadata can also encode the priority of the operation, the expected execution time, etc., to provide the scheduler with richer decision-making information.

[0058] This embodiment constructs and solves a CSP problem containing hard constraints on causal order, so that the projection from the high-dimensional folding path to the one-dimensional execution sequence maintains causal consistency. Causal inversion conflicts are identified and reordered through constraint solving to ensure causal correctness. More importantly, the system calculates and records the information loss in the projection process, including entropy loss, structural loss, and parallel opportunity loss, and attaches this information to the operation as compensation metadata. During the execution phase, the virtual time-aware scheduler can restore operations that were originally parallel in high-dimensional space but were serialized after projection based on the parallel_candidates information recorded in the metadata, so that the final execution efficiency is close to the theoretical optimal value.

[0059] In a specific embodiment, assume that in a distributed database, there are two operations from different nodes that need to be merged: OpA: a range update operation, UPDATE users SET status=inactive WHERE ageBETWEEN 20 AND 30. It is initiated at time t=10. OpB: a single point write operation, INSERT INTO users(id, name, age) VALUES(123, Alice, 25). It is also initiated at time t=10. Obviously, OpA and OpB have potential destructive conflicts in space (affecting the data of age=25) and time. The initial parameters are set as: the causal propagation speed constant v calculated dynamically by the system t =1.0; system average data spacing d avg =1 (assuming data keys are continuous integers); the maximum causal chain depth of the system is C max = 10. Calculation of operation impact intensity I: OpA (scope update): The impact time is longer, I t =2.0; the impact range is wide, I s=log(30-20)≈2.3; causal influence is medium, I c =2.0. OpB (single point write): impact time instant, I t =1.0; the impact range is extremely small, I s =1.0; causal influence is small, I c =1.0. Calculate the causal cone angle Θ=(θ t ,θ s ,θ c ); OpA: θ t =arctan(2.0 / 1.0)≈63.4°; θ s =2×arctan(2.3 / 1)≈133.0°; θ c =π×2.0 / 10≈36.0°; OpB: θ t =arctan(1.0 / 1.0)=45.0°; θ s =2×arctan(1.0 / 1)=90.0°; θ c =π×1.0 / 10≈18.0°. It can be seen that the causal cone of the range update operation OpA is much wider in the spatiotemporal dimension than that of the single-point write operation OpB. Define the causal density field ρ(P) The density field function of both operations is ρ(P)=ρ0×exp(-||P-P0|| 2 / σ 2 ), where P0 is the space-time coordinate of each at t=10, ρ0 and σ are preset constants. Estimate the intersection volume V intersect The Monte Carlo method is used. In the minimum bounding box containing the two cones, N = 1,000,000 sampling points are randomly generated. Through geometric judgment, the statistics are obtained: N A = 120,000 points fall within the cone of OpA. N B = 50,000 points fall within the cone of OpB. Number of intersection points N intersect = 8000 points fall inside both cones. Assume that the bounding box volume is V box , then the intersection volume V intersect ≈V box ×(N intersect / N)=V box ×0.008. This value is the unsigned interference intensity of the two. intersect =8000 intersection points, for each point P i , calculate the gradient of the two density fields ▽ρ A (P i ) and ▽ρ B (P i). The direction of the gradient points to the direction of the fastest density growth, that is, towards the top of each cone. Since the time coordinates of the cone tops of the two operations are the same and the spatial coordinates (age=25 falls within age=[20,30]) are highly overlapped, the directions of the two gradient vectors are almost opposite at most intersection points. Calculate the cosine value of the gradient angle cos(Φ(P i )), the statistical result shows that its mean value avg(cos(Φ))≈-0.9. Calculate the weighted interference intensity I weighted By numerically integrating the intersection area (or approximating it with the sample mean), I weighted ≈V intersect ×avg(ρ A ×ρ B × cos(Φ)). Since avg(cos(Φ)) is a large negative value, the final I weighted Is a negative number. Interpretation of the results The calculated weighted interference intensity I weighted A negative value clearly and quantitatively indicates strong destructive interference between OpA and OpB. The quantified results will serve as the weight and attributes of the edge connecting OpA and OpB in the causal interference graph, providing a clear signal for the subsequent space-time folding path search algorithm: this conflicting pair must be handled first, for example, by applying time folding or space folding to separate the two operations.

[0060] According to one aspect of the present application, the mapping process is deepened, wherein the nonlinear mapping function applied to the calculation of the spatiotemporal coordinates of the operating point is composed of a series of specific functions for different dimensions, and is integrated through a dimension fusion operator. Specifically, for the time feature f(t p , t l ), its specific mapping function can be defined as: f(t p , t l )=[t p , log(1+t l ), sin(2π×t p / T cycle ), cos(2π×t p / T cycle ), exp(-|t p -t checkpoint | / τ)]; where t p The original physical timestamp of the operation is directly used as the basic component; log(1+t l ) is the logical timestamp t l The purpose of logarithmic compression is to smooth out large logical time differences and avoid their disproportionate impact on the overall coordinate distance; sin(2π×t p / T cycle ) and cos(2π×tp / T cycle ) is a periodic component designed to capture the possible periodic behavior of the system; T cycle is the characteristic period of the system, for example, it can be the fixed interval for the database to perform checkpoint operations; exp(-|t p -t checkpoint | / τ) is a decay component, which indicates the time distance between the operation and the most recent checkpoint operation, τ is the decay constant, t checkpoin The timestamp of the system's most recent checkpoint operation. This component is based on the principle that operations closer to a checkpoint typically have different state uncertainty or impact on subsequent operations. This function ultimately outputs a 5-dimensional time feature vector.

[0061] For spatial features g(key, partition id , node id ), its specific mapping function can be defined as: g(key, partition id , node id )=[hash1(key) / MAX HASH , hash2(key) / MAX HASH , partition id / MAX PARTITION , node id / MAX NODE , bloom filter (key)]; where hash1(key) and hash2(key) are two different hash functions that map the data key key to a numeric value divided by the maximum hash value MAX HASH Normalize. Use multiple hash functions to reduce the probability of collision and more accurately express the location of data keys in space. id / MAX PARTITION and node id / MAX NODE They are the normalized partition ID and node ID, which directly reflect the physical and logical topological locations of the operation. id is the partition ID, node id is the node ID, MAX PARTITION is the maximum partition value, MAX NODE is the maximum node value. filter(key) is a k-bit vector obtained by applying the data key to a Bloom filter. This component compactly represents the existence of the data key and efficiently determines key similarity. The function ultimately outputs a (4+k)-dimensional spatial feature vector.

[0062] For the causal feature h(deps,op type ), its specific mapping function can be defined as: h(deps, op type )=[len(deps) / MAX DEPS , max depth (deps) / MAX DEPTH ,avg depth (deps), one hot (op type ), dependency matrix_eigenvalues [:3]]; where: len(deps) / MAX DEPS is the normalized number of operation dependencies, reflecting the breadth of its causal relationship; max depth (deps) and avg depth (deps) are the maximum depth and average depth of the operation in its dependency chain, reflecting the depth of its causal relationship; one hot (op type ) is a one-hot encoding of the operation type (such as INSERT, UPDATE, DELETE), generating an m-dimensional vector; dependency matrix_eigenvalues [:3] is the first three eigenvalues ​​of the dependency matrix of the local area where the operation is located, which can capture more complex local causal structure features; deps is the set of directly dependent objects of the current operation, op type The type of the current operation, MAX DEPS MAX is the maximum number of dependencies that a single operation can have globally or within a window. DEPTH is the maximum depth threshold of the dependency chain in the global or window range. The function finally outputs a (6+m)-dimensional causal feature vector.

[0063] After generating the final coordinates, in order to ensure the quality of the coordinates and the validity of subsequent calculations, a coordinate normalization and verification step must be performed. Specifically, through the affine transformation p norm =(pp min ) / (p max -p min ), the coordinate vector p of all operations is mapped to the unit hypercube [0, 1] dEliminate the dimensional differences that may exist between different dimensions so that all dimensions have the same weight for distance calculation. Perform distance-preserving verification, that is, check whether the spatiotemporal geometric distance dist(p1, p2) after mapping and the predefined semantic distance dist(op1, op2) between operations satisfy |dist(p1, p2)-dist(op1, op2)|<ε. Where ε is a very small tolerance threshold. If the mapping of some points violates this constraint, the system can fine-tune the parameters of the mapping function or the coordinates of the point through optimization algorithms such as gradient descent until the distance-preserving requirements are met. Where p is the original operating point coordinate vector, p min is the minimum value of all operating points in each dimension, p max is the maximum value of all operating points in each dimension, p norm is the normalized coordinate vector.

[0064] Preferably, the construction process of the causal graph is as follows: in the stage of generating a single causal cone, the process is defined more finely. Calculate the clear operation influence vector I=(I t , I s , I c ); Among them, the time dimension influence intensity I t Based on the persistence of the operation (instantaneous operation is 1, persistent operation is its life cycle); spatial dimension impact intensity I s Based on data coverage (the range operation is the logarithm of the number of covered keys); causal dimension influence intensity I c Based on the propagation depth of the operation (the trigger operation is the maximum trigger chain length), an accurate cone geometry parameter set is generated, including the definition of the cone axis direction vector D = (1, δ s , δ c ), where δ is the direction correction factor fine-tuned according to the operation type, and the generatrix equation defining the cone is L(λ)=P0+λ(cos(θ i )D+sin(θ i )R i ), where R i is the radial unit vector of each dimension, λ is the scale factor, θ iis the deflection angle. In order to facilitate computer processing, the continuous causal cone will be discretized into a grid representation, and its grid resolution can be adaptively adjusted according to the complexity of the operation to achieve a balance between computational accuracy and overhead. When performing causal cone intersection detection, in order to solve the computational performance bottleneck caused by massive operations, an efficient indexing and storage mechanism is introduced. Specifically, before performing pairwise intersection calculations, a high-dimensional grid intersection index is constructed. Preferably, a variant of R-tree can be used to index the bounding boxes of all discretized causal cones, and spatially adjacent objects are organized in the same child nodes of the tree. When querying, only those cone pairs with overlapping bounding boxes need to be checked, without checking all N×(N-1) / 2 pairs of combinations, which reduces the computational complexity, where N is the total number of all pending operations in the system. After calculating the interference strength of all intersecting cone pairs, the causal cone intersection matrix is ​​constructed. Considering that there is no interference between the vast majority of operation pairs in the system, the system will use a sparse matrix storage format (such as CSR or COO) to store the matrix, and the interference strength threshold I can be set. min , filtering out those edges with extremely weak interference, further reducing the overhead of storage and subsequent graph calculations.

[0065] When classifying and labeling interference patterns, a more intelligent classification method based on machine learning is adopted. Specifically, for each pair of intersecting causal cones, an interference feature vector is extracted. This vector can contain the ratio r of the intersecting volume to the volume of the two cones. v , density gradient angle θ grad , the encoding type of the combination of two operation types code , and the timing relationship between the two rel Features in multiple dimensions such as . Applying an unsupervised density clustering algorithm (such as DBSCAN) to cluster all interference feature vectors, automatically discovering the typical interference patterns therein. Simply label the center point of each cluster once (such as typical write-write conflicts and read-after-write enhancements), and this can be used as a basis for training a supervised learning classifier (such as a support vector machine (SVM)). Afterwards, the classifier can quickly and automatically characterize new interference instances (constructive / destructive / neutral). It is possible to learn from the data more complex and implicit interference patterns than a single gradient angle, thereby achieving more accurate classification, especially in systems with diverse operation types and complex interactions.

[0066] In a further embodiment, the detailed process of implementing the spatiotemporal folding mechanism is as follows: before starting the path search, in order to improve the search efficiency, it is preferred to adopt a folding candidate point identification mechanism. Specifically, the system will pre-traverse all the operation points to be processed, and calculate the folding potential score based on its attributes in the causal interference map. The calculation of this score can comprehensively consider the following factors: whether the operation is on the edge of one or more destructive interferences; whether the causal cone angle of the operation is small (meaning that the folding influence range is controllable); and whether the operation is symmetrical in certain spatiotemporal dimensions (facilitating transformation). Operations with higher scores are screened out to form a set of folding candidate operations. In the subsequent During the search, the algorithm will be guided to prioritize applying folding transformations to these candidate operations, thereby avoiding wasting computing resources on operations that are not suitable for folding and narrowing the search space.

[0067] For time folding, the algorithm defines time fold_transform (t original , conflict level The core idea of ​​​​the operation is to create a multi-layer timeline. It does not change the original time t primary , but according to the degree of conflict level Calculate the fold level fold layer and execute offset t offset To avoid new conflicts within the same layer, an exclusive time slot can be allocated to the operation through hashing. slot The planned execution time of the operation is calculated as t execute =t primary +t offset +(time slot ×SLOT DURATION The result returned is a composite time representation TimeFold that includes the original logical time, planned execution time, folding level, and time slot. The executor can perform fine scheduling based on this information. original is the original logical time of the operation, operation is the operation instance to be scheduled, SLOT DURATION The standard duration for each time slot.

[0068] For space folding, the algorithm defines space fold_transform (data key , conflict info The core idea of ​​) is to create a shadow space. key When there is a conflict, the system will restore the original partition where the data is located. partition Create a temporary shadow partition shadowid At the same time, define the data replication strategy copy strategy , preferably delayed replication (LAZY), and set the merge condition merge condition , such as a Boolean function that checks whether all relevant conflicts have been resolved. This information is encapsulated in a SpaceFold object, which guides the operation to be performed safely in an isolated shadow space and writes the result back to the main space after the merge conditions are met. key It is the unique identifier of the data object involved in the current operation. info Conflict information structure.

[0069] For causal folding, its algorithmic definition is causal fold_transform (operation,broken dependencies The core idea of ​​​​the system is to insert compensation nodes. For each broken dependency, the system creates a placeholder operation placeholder. The placeholder contains the expected value of the result of the dependent operation. result , timeout and fallback value fallback. A Weak Dependency is established between the original operation and the placeholder. The strength of the dependency can be quantified and contains conditions for checking whether the real dependency is available. These components are encapsulated into a Compensation object, which also defines a function merge_function that merges the real result with the estimated result when the real result arrives. Through this mechanism, strong dependencies are temporarily decoupled into fault-tolerant weak dependencies. Broken dependencies A list of operations that the current operation depends on but has not yet been satisfied.

[0070] After the search algorithm finds a preliminary optimal path, it also includes post-processing steps for the path: feasibility verification and smoothing optimization. Feasibility verification aims to ensure the correctness of the path. For example, through simulation execution, it checks whether the folded sequence satisfies the most basic consistency constraints and whether new causal paradoxes are introduced. Optionally, Monte Carlo simulation can be used to impose random perturbations on the path to evaluate its stability and robustness. Path smoothing aims to improve the elegance and efficiency of the solution. The system checks for sawtooth patterns in the path, indicating unnecessary and frequent folding and unfolding of an operation. Redundant transformations are locally reconstructed and eliminated. Furthermore, mathematical tools (such as Bezier curves) can be used to smooth the movement trajectory of the operation in time and space, making the final execution plan more concise and efficient.

[0071] Furthermore, the process of high-dimensional path projection and execution is as follows: when projecting the high-dimensional path to a one-dimensional execution sequence, a piecewise linear projection mapping is used as the preferred method. This method is not a simple global linear projection, but rather divides the entire high-dimensional path into several segments according to the type of folding transformation (for example, one segment is time folding and the other segment is space folding). Within each segment, since the transformation type is single, a simple linear projection p can be used. 1d =<p hd , v base > Map it onto a one-dimensional timeline, where p hd is a high-dimensional coordinate, v base is the optimal projection basis vector corresponding to the segment, p 1d are the one-dimensional projection coordinates. At the junctions between different segments, spline interpolation can be used to ensure continuity and smoothness of the entire one-dimensional sequence, better preserving the local structural properties of the original high-dimensional path. Furthermore, for two operations that overlap on the one-dimensional timeline after projection, the system separates them by applying a small random perturbation ε×rand() to ensure strict linear order in the sequence. Here, ε is the perturbation amplitude factor, and rand() is the pseudo-random number generator function.

[0072] After obtaining a one-dimensional execution sequence, its actual execution is a precise, segmented, parallel process controlled by synchronization points. Specifically, the executor analyzes the sequence, identifies sets of continuous operations that do not have causal dependencies, and identifies these sets as parallelizable segments. One or more worker threads are launched for processing each parallel segment. At the end of each parallel segment, a global synchronization point is set. When all worker threads processing that segment have completed their tasks, they pause at this synchronization point. At this point, the system triggers a state consistency check. For example, by comparing the data snapshots processed by each thread, the merge results to this point are correct and there are no new conflicts. Only after the check passes will the executor begin processing the next operation or parallel segment. While ensuring execution correctness, system resource utilization is maximized.

[0073] After all operation segments have completed, final state convergence and verification is performed. This involves merging the state snapshots generated by each parallel branch during execution. During the merge process, new minor inconsistencies may be discovered (for example, two parallel operations modifying the same non-core metadata field), requiring a pre-defined resolution strategy. Optionally, this strategy could be Last Writer Wins (LWW), where the operation with the most recent timestamp prevails. After all data is merged, a global consistency verification is performed. This verification is broader than the synchronization point check, encompassing not only referential integrity at the data level but also the constraints of higher-level business rules. For example, it verifies that an order's state flow follows the correct sequence: pending payment -> paid -> shipped. Only after passing this rigorous global verification, which encompasses business semantics, can the entire fault recovery and data merge process be considered successfully completed, and the system output is a data state that is ultimately consistent and trustworthy to the business system.

[0074] In one embodiment of the present application, in order to ensure the reversibility of the folding transformation, a guarantee mechanism based on programmatic inverse transformation is proposed: for each applied folding transformation Φ, the system must synchronously generate and store a metadata object Φ that can safely reverse its effect. meta This reversibility is not always a strict mathematical function inversion. Specifically, for time folding: when an operation is detoured to a parallel alternative timeline, its inverse transformation is to merge or discard the alternative timeline and the state generated on it. Its metadata Φ meta It is necessary to record the unique identifier of the alternative timeline, the sequence of operations that occurred on it, and the information about the merge point with the main timeline. When the merge occurs, the inverse transformation process is triggered and executed. For spatial folding: its reversibility is guaranteed by the copy-on-write mechanism and the merge condition itself. Its metadata Φ meta That is fold mapping Object, which fully records the original data location, shadow data location and the logic of merging back to the main space (merge condition ). When the merge condition is met, the execution of this logic completes the inverse transformation, the shadow space is recycled, and the transformation is reversible. For causal folding: its reversibility is achieved by the merge_function of the compensation node. Its metadata Φ meta is a Compensation object, which contains the estimation of the actual result, placeholder operation and the key merging function. When the actual dependent operation result arrives, the system calls the merging function and replaces or corrects the subsequent calculation based on the estimated result with the actual result, thus completing the logical inverse transformation. This embodiment will force the generation and persistence of the above Φ when applying any folding transformation. metaMetadata. In the subsequent path projection and execution phases, the system uses this metadata to ensure that each folding operation can be correctly reverse-parsed or merged, thereby ensuring the macroscopic reversibility of the entire folding process in terms of program logic.

[0075] Furthermore, specific conflict resolution strategies are implemented when merging multiple timelines. Specifically, when time folding generates multiple parallel execution timelines and a merge is required at a merge point, the system calls the select_merge_strategy function to select a specific conflict resolution method. A preferred, hierarchical library of strategies is available: Strategy 1: Commutative Semantic Merge, applicable when conflicting operations operate on commutative data types, such as counters and sets in CRDTs. Instead of performing a selection, a semantic fusion of the two operations can be performed. For example, if both the main and branch increment the same counter, the merge result is the sum of the increments; if both add an element to the same set, the merge result is the union of the two sets. This ensures zero information loss. Strategy 2: Domain-Specific Merge based on predefined rules, applicable for critical data with complex business logic, where user-defined resolvers (UDRs) can be pre-registered. For example, in the case of concurrent modification of the same user's permissions, select_merge_strategy will call the permission merge processor. This processor may contain hard-coded business rules such as taking the highest level of the two permissions and only allowing modifications by specific roles to take effect. Strategy 3: Last Writer Wins (LWW) based on timestamp is applicable when neither of the above two strategies is applicable and a simple, deterministic automatic merge rule is required. Compare the original physical timestamps t of the two conflicting operations p, select the operation with the latest timestamp as the final valid version, and discard the other operation. This ensures the determinism and automation of the merge process. Strategy 4: Conflict Logging and Deferred Resolution, which is suitable for scenarios where automatic and safe merging is not possible and the data value is extremely high and cannot be lost. The system will select a version (such as the version of the main timeline) as the temporary effective version to ensure the continuation of the main process, but will record the other conflicting version and its context information in a special conflict log, and notify the system administrator or trigger the exception handling process, waiting for subsequent manual arbitration. The select_merge_strategy function will try to apply the above strategies in sequence according to the metadata of the data object being operated (for example, whether it is a CRDT type, whether a UDR is registered), thereby achieving refined and differentiated handling of different types of conflicts.

[0076] In a further embodiment, synchronizing causal cone computations across multiple nodes in a distributed environment can employ two optional distributed collaboration models: A Centralized Coordinator Model: In a distributed cluster, a node is elected (e.g., using the Paxos or Raft protocols) or pre-designated as a temporary central coordinator. After recovery, all other nodes send their incremental operation sequences to the coordinator. The coordinator node independently and completely executes the entire intelligent merging algorithm of this application, including constructing a global spatiotemporal point cloud, computing the causal cone, and searching for collapsed paths. After computation is complete, the coordinator broadcasts the finalized one-dimensional execution sequence or final data state to all other nodes to complete synchronization. This model offers simple implementation, clear logic, and eliminates the need to address complex distributed computation consistency issues. A decentralized model with asynchronous communication and final consensus is the preferred implementation. Nodes asynchronously exchange their incremental operation sequences through protocols such as gossip. Each node maintains a local view of the global operation set and independently and asynchronously updates its local causal interference graph upon receiving new operations. This means that at a certain moment, the graphs of different nodes may be temporarily inconsistent. However, the core of the merged computation is to determine the optimal spatiotemporal folding solution. Therefore, when a node believes it has collected sufficient information and calculated a candidate folding solution, it can submit this solution itself (not the entire computation process) to a lightweight consensus group, which will reach consensus on the final execution plan. Heavyweight, parallelizable computations (such as graph construction) are distributed to individual nodes for asynchronous execution, while lightweight, globally consistent decisions (determining the final execution plan) are guaranteed by the consensus algorithm. This avoids the bottleneck of a central coordinator, improves scalability, and increases the overall throughput and robustness of the system.

[0077] In an optional embodiment, v is dynamically adjusted in a real-time system. t The following mitigation and optimization strategies are proposed: Asynchronization and low-priority processing: responsible for monitoring system runtime metrics (such as average latency, load, etc.) and recalculating v t The task of monitoring and adjusting the value is run in a separate background thread at a lower priority. This ensures that the monitoring and adjustment process will not block or preempt the foreground thread resources that handle core data read and write requests, thereby minimizing its direct impact on real-time performance. Hysteresis and Damping: To avoid the system frequently adjusting v due to small, instantaneous performance jitters, tvalue, thus triggering unnecessary, chain-like recalculations and introducing a hysteresis mechanism. That is, only when the newly calculated v t The system will only actually apply this new v if the difference between the new value and the current value stably exceeds the preset threshold (for example, the rate of change exceeds 10%) within a sustained time window. t Value. Similar to a low-pass filter, it filters out high-frequency noise and ensures v t The value adjustment is smooth and robust. Incremental recalculation: When v t When values ​​do change significantly and are applied, the system does not need to recalculate all causal cones from scratch. t The main influence is the time dimension angle θ t Therefore, the system can only identify those θ t This will be v t Causal cones that have changed significantly due to adjustments are incrementally updated. Results from already computed and unaffected parts of the graph can be reused, reducing the computational overhead associated with dynamic adjustments.

[0078] In a preferred embodiment, the dimension fusion operator can be implemented by a neural network. Specifically, the dimension fusion operator ⊕ is implemented as a three-layer feedforward neural network. The structure of this neural network is defined as follows: Input layer dimension input_dim: Its dimension is the sum of the dimensions of each feature vector, plus the dimension of the interaction feature. Assuming that the Bloom filter bit vector in the spatial feature is k-dimensional and the one-hot encoding in the causal feature is m-dimensional, the basic feature dimension is 15+k+m. Hidden layer dimension hidden_dim: This can be set to 64 or 128, providing sufficient model capacity to learn complex nonlinear relationships. Output layer dimension output_dim: This dimension is the dimension of the target spatiotemporal coordinate system, for example, it can be set to 8. The specific hierarchical structure of the network can be defined using sequential modules, sequentially comprising: First layer (feature interaction layer): A linear transformation layer (nn.Linear) from input_dim to hidden_dim, followed by a rectified linear unit activation function (nn.ReLU) to introduce nonlinearity. To accelerate training and improve stability, a batch normalization layer (nn.BatchNorm1d) can be added after this layer. The second layer (dimensional fusion layer) is a linear transformation layer from hidden_dim to hidden_dim, also followed by a ReLU activation function. To prevent overfitting, a dropout layer (nn.Dropout) can be added after this layer, for example, with a dropout rate of 0.2. The third layer (coordinate generation layer) is a linear transformation layer from hidden_dim to output_dim, followed by a hyperbolic tangent activation function (nn.Tanh). Using Tanh can smoothly normalize the final output coordinate values ​​to the range [-1, 1], facilitating subsequent processing.

[0079] The forward propagation process of the neural network is designed to include direct concatenation of features and construction of interactive features. Specifically, when the feature vectors f of each dimension are input t (time), g s (space) and h c (Cause and effect) After: These original feature vectors are concatenated to form the basic input tensor x=torch.cat([f t , g s , h c ], dim=-1), where torch.cat is a tensor concatenation function and dim is the dimension of the specified concatenation. In order to allow the network to more directly learn the coupling relationship between different dimensions, the interactive feature terms are manually constructed. For example, the first two components of the time and space features can be extracted and element-wise multiplied by f t [:,:2]×g s[:,:2] to capture spatiotemporal interactions; similarly, spatial-causal interaction terms and temporal-causal interaction terms can be constructed. The basic input tensor x is concatenated with all the constructed interaction feature terms to form an enhanced input tensor x interact , and send it into the network structure defined above for calculation to obtain the final output_dim-dimensional spatiotemporal coordinates.

[0080] The preferred embodiments of the present application are described in detail above. However, the present application is not limited to the specific details of the above embodiments. Within the technical concept of the present application, various equivalent transformations can be made to the technical solutions of the present application, and these equivalent transformations all fall within the scope of protection of the present application.

Claims

1. A bidirectional incremental intelligent merging method for distributed storage fault recovery, characterized in that: include: Receive local and remote incremental operation sequences, map the operation sequences to a multi-dimensional space-time coordinate system, and generate a multi-dimensional space-time operation point set; Based on the multi-dimensional space-time operation point set, a geometric causal cone is constructed for each operation point, and a causal interference map is constructed by analyzing the interference between the geometric causal cones. Based on the causal interference graph and the multi-dimensional space-time operation point set, the space-time folding path is searched to avoid or minimize the causal conflict and obtain the optimal space-time folding solution; Project the high-dimensional path in the optimal spatiotemporal folding scheme into a one-dimensional execution sequence and execute it to reach a consistent data state.

2. The method according to claim 1, characterized in that Generate a multidimensional space-time operation point set, including: Extract temporal, spatial, and semantic features from the local and remote incremental operation sequences for each operation to form an operation feature vector. A dimension fusion operator consisting of a preconfigured neural network is applied to nonlinearly transform the operation feature vector into spatiotemporal coordinates to generate a multidimensional spatiotemporal operation point set.

3. The method according to claim 1, characterized in that Construct a causal interference graph, including: For each operation point in the multidimensional spatiotemporal operation point set, its influence range in time, space and causal dimensions is calculated based on semantic attributes, and a geometric causal cone with multidimensional angle is generated to obtain a geometric causal cone set. The causal interference strength is quantified by estimating the intersection volume of any two geometric causal cones in the set of geometric causal cones in high-dimensional space. Based on the causal interference strength, a causal interference graph is constructed, wherein the nodes of the causal interference graph represent operations, and the weights of the edges of the causal interference graph correspond to the interference strength.

4. The method according to claim 3, characterized in that Before constructing the causal interference graph, it also includes: Define the internal causal density field for each geometric causal cone, where the gradient of the causal density field represents the propagation direction of the causal influence; In the intersection area of ​​any two geometric causal cones, the gradient directions of their respective causal density fields are calculated and compared; Based on the comparison results of the gradient directions, the causal interference represented by the intersection is marked as destructive interference or constructive interference; The construction of the causal interference graph includes using labels as edge attributes.

5. The method according to claim 1, wherein Obtain the optimal space-time folding solution, including: Based on the multidimensional spatiotemporal operation point set and the preset folding transformation type, a spatiotemporal state space including executed operations, pending operations and the current folding configuration is defined; Based on the causal interference graph, a cost function including path length, interference strength and folding complexity is constructed; In the spatiotemporal state space, the cost function is applied to perform optimization search to obtain the optimal spatiotemporal folding solution.

6. The method according to claim 5, characterized in that Optimizing the search is done by applying at least one of the following collapsing transformations: Time folding, for destructive interference identified in the causal interference graph, introduces a virtual time dimension that depends on the interference strength for related operations, creating parallel execution timelines so that conflicting operations can be bypassed; Space folding: dynamically projecting the data objects associated with conflicting operations into an isolated shadow data space and executing the operations there to avoid direct access conflicts to the main data space. Causal folding implants buffer nodes with estimated results and compensation logic between interdependent operations in a broken causal dependency chain to achieve temporary decoupling and flexible connection between operations.

7. The method according to claim 6, characterized in that Before performing a refine search, also include: Construct folding transformation functions for time folding, space folding and causal folding respectively; Applying the preset Lyapunov function, the convergence analysis of the dynamic characteristics of each folding transformation function is carried out to verify and correct its stability in the state space; Based on the results of analysis and correction, a stable folding transformation function library is generated, and the optimization search is achieved by calling the stable folding transformation function library.

8. The method according to claim 5, characterized in that Optimize search through improved Algorithm execution, wherein the execution process includes: Continuously monitor the validity of the path during the search process to identify whether the search falls into a preset deadlock state; When a deadlock state is identified, the time folding transformation is called to backtrack the current search state to the previous spatiotemporal state point; Starting from the previous space-time state point, continue to explore new path branches to seek the global optimal solution.

9. The method according to claim 1, characterized in that Projecting the high-dimensional path in the optimal spatiotemporal folding solution into a one-dimensional execution sequence includes: Perform initial projection on the high-dimensional path to generate a preliminary one-dimensional sequence of operations; Compare the preliminary one-dimensional operation sequence with the causal dependencies implied in the optimal space-time folding scheme to identify causal inversion conflicts; For the identified causal inversion conflicts, the preliminary one-dimensional operation sequence is reordered by constructing and solving a constraint satisfaction problem with the causal order as a hard constraint to obtain a causally consistent sequence, which is used as the one-dimensional execution sequence.

10. The method according to claim 9, characterized in that After obtaining the causal consistency sequence, it also includes: Compare the structural complexity of high-dimensional paths and one-dimensional execution sequences, and quantitatively calculate the information loss measure caused by projection; Identify operations that are parallelizable in a high-dimensional path but serialized in a one-dimensional execution sequence; The information loss metric and the identified operation are attached as compensation metadata to the corresponding operation in the one-dimensional execution sequence.

Citation Information

Patent Citations

  • A cause and effect concurrent detection method for large-scale cooperative environment

    CN101127644A

  • Atlas embedding system and device

    CN116848535A