A conflict resolution method and system based on semantic model and sequence CRDT
Patent Information
- Application Number
- CN202611382693.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-10-20
AI Technical Summary
[0006]本发明针对传统协同编辑冲突解决方法难以识别语义级冲突并保留意图、以及序列CRDT的操作节点存在冗余等问题,提供一种基于语义模型和序列CRDT的冲突消融方法,通过定义操作语义三元组并生成意图指纹,通过并发检测与意图指纹汉明距离判断冲突;若存在冲突,构建因子图模型求解得到最优冲突消融方案,将最优冲突消融方案存为副本,结合意图残留度评估消融质量,质量过低时触发人工介入,选择回溯至操作的原始状态;同时定期执行冗余操作节点处理,实现空间占用优化
[0037]1、本发明通过语义三元组建模与序列CRDT技术、考虑协同编辑场景下的用户意图感知特性和操作语义的冲突关联特性,解决了语义感知、质量可控的协同编辑冲突。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information technology, specifically relating to a conflict resolution method and system based on semantic models and sequence CRDT. Background Technology
[0002] In today's era of increasingly frequent digital collaboration, collaborative editing technology has been widely used in many fields such as online document editing and real-time code collaboration. However, existing collaborative editing technologies still have unresolved issues.
[0003] Traditional collaborative editing methods, such as Operation Transformation (OT) and Conflict-free Replicated Data Type (CRDT), mostly focus on the operation itself when handling concurrent operations, ignoring the semantic information behind the operation. The lack of modeling and constraints on the semantic level of operations may lead to the following problems: semantic conflicts cannot be effectively identified, such as making semantically opposite modifications to the same attribute; although the merged results of concurrent operations have the same structure, the semantics are unreasonable.
[0004] In conflict resolution, the lack of sufficient semantic understanding makes it difficult to make decisions that better align with user intent. Using natural language processing for comprehensive comparison is computationally expensive. While CRDT (Continuous Replication Dependency Test) can handle incremental operations, it suffers from high space overhead. CRDT relies on causal consistency; if node A is physically erased from memory immediately after being processed, a delayed concurrent operation (e.g., inserting node B after node A) will lead to inconsistent replica states or even crashes because it cannot find its parent or neighbor nodes. Therefore, to ensure the causal order of delayed operations, inactive nodes must also reside in memory to maintain topological relationships, thus putting pressure on the system's storage resources.
[0005] In summary, existing collaborative editing technologies still have room for improvement in areas such as semantic conflict resolution and storage overhead control in high-concurrency conflict handling. An innovative solution is needed to enhance the performance and user experience of collaborative editing. Summary of the Invention
[0006] This invention addresses the shortcomings of traditional collaborative editing conflict resolution methods, such as difficulty in identifying semantic-level conflicts and preserving intent, and redundancy in operation nodes of sequence-based CRDT (Continuous Reaction Graph). It provides a conflict ablation method based on semantic models and sequence-based CRDT. This method defines semantic triples for operations and generates intent fingerprints. Conflicts are determined by concurrent detection and the Hamming distance between the intent fingerprint and the solution. If a conflict exists, a factor graph model is constructed to obtain the optimal conflict ablation scheme. This optimal scheme is stored as a copy, and the ablation quality is evaluated based on intent residuals. If the quality is too low, manual intervention is triggered, and the operation is reverted to its original state. Simultaneously, redundant operation nodes are periodically processed to optimize space usage. This invention solves the problems of semantically aware, quality-controllable collaborative editing conflicts, as well as semantic-level operation conflicts in multi-user concurrent editing scenarios, by defining semantic triples, obtaining operation intent information, performing rapid conflict detection, optimal conflict ablation using factor graphs, intent residual evaluation, and space optimization.
[0007] According to one aspect of this specification, a conflict ablation method based on semantic models and sequence CRDT is provided, comprising:
[0008] For each operation, a semantic triple is constructed. The operation intent in the semantic triple is input into the encoder to generate a high-dimensional vector. The high-dimensional vector is then converted into binary code as an intent fingerprint.
[0009] When multiple operations are concurrent, semantic triples are used to determine hard logic conflicts:
[0010] When there is no hard logical conflict, the pre-dependency set of semantic triples is used to determine whether multiple operations have common pre-dependencies:
[0011] When there is a common pre-dependency, it is determined whether there is an intent conflict among multiple operations: if the similarity between the intent fingerprints of the operations is higher than or equal to the preset maximum similarity threshold, then multiple operations are determined to have an intent conflict, and the type is redundant conflict; if the similarity between the intent fingerprints of the operations is higher than the preset minimum similarity threshold but lower than the preset maximum similarity threshold, then the large language model is used to judge the remaining intent conflicts to be identified except for redundant conflicts, and after the judgment, they all enter the conflict ablation process.
[0012] The conflict ablation process is modeled as a factor graph model. The credibility potential function of a single operation and the compatibility potential function between operations are defined. The optimization problem based on the credibility potential function and the compatibility potential function is solved to obtain the optimal conflict ablation scheme.
[0013] The intention residual is calculated based on the weighting factor of the operation. When the intention residual is greater than or equal to the intention residual threshold, the optimal conflict ablation scheme is automatically applied.
[0014] As a further technical solution, the method also includes: when there is a hard logic conflict, entering a conflict resolution process.
[0015] As a further technical solution, the method further includes: when there is no common prerequisite dependency, multiple operations are determined to be able to coexist.
[0016] As a further technical solution, the method further includes: when the similarity between the intention fingerprints of the operations is lower than or equal to a preset minimum similarity threshold, multiple operations can coexist.
[0017] As a further technical solution, the method further includes: if the similarity between the intention fingerprints of the operations is lower than or equal to a preset minimum similarity threshold, then multiple operations are determined to have no intention conflict.
[0018] As a further technical solution, a large language model is used to judge the remaining intent conflicts to be identified, excluding redundant conflicts. After judgment, all conflicts enter the conflict ablation process.
[0019] For operations with conflicting intentions, the compatibility is determined to be 0, and the conflict resolution process begins.
[0020] For operations with partially conflicting intentions, a large language model is used to generate alternative operations that take into account the intentions of both parties, and the alternative operations are input into the conflict resolution process.
[0021] As a further technical solution, the method also includes a redundant operation processing sub-process, comprising:
[0022] Determine whether the current operation has been synchronized to all operation nodes;
[0023] If not, then wait for synchronization;
[0024] If so, and the current operation is not referenced by any other operation as a prerequisite, then delete the operation content of the current operation and retain only the metadata.
[0025] As a further technical solution, based on the optimization problem of the credibility potential function and the compatibility potential function, the expression is:
[0026]
[0027] in, This represents the optimal conflict ablation scheme. The confidence potential function represents a single operation. Let i represent the compatibility potential function between operations, and i and j represent operations.
[0028] As a further technical solution, the method also includes:
[0029] When the intention residual is lower than the intention residual threshold, choose to backtrack to the original state of the operation.
[0030] According to one aspect of this specification, a conflict ablation system based on semantic models and sequence CRDT is provided, comprising:
[0031] The first processing module is used to construct a semantic triple for each operation, input the operation intent in the semantic triple into the encoder to generate a high-dimensional vector, and convert the high-dimensional vector into binary code as an intent fingerprint;
[0032] The second processing module is used to determine hard logic conflicts when multiple operations have concurrent relationships using semantic triples. When no hard logic conflict exists, it uses the pre-dependency set of semantic triples to determine whether multiple operations have common pre-dependencies. When common pre-dependencies exist, it determines whether multiple operations have intent conflicts. If the similarity between the intent fingerprints of operations is higher than or equal to a preset maximum similarity threshold, multiple operations are determined to have intent conflicts, and the type is redundant conflict. If the similarity between the intent fingerprints of operations is higher than a preset minimum similarity threshold but lower than a preset maximum similarity threshold, it uses a large language model to determine the remaining intent conflicts to be identified, except for redundant conflicts. After the determination, all of them enter the conflict ablation process.
[0033] The third processing module is used to model the conflict ablation process as a factor graph model, define the confidence potential function of a single operation and the compatibility potential function between operations, and solve the optimization problem based on the confidence potential function and the compatibility potential function to obtain the optimal conflict ablation scheme.
[0034] The fourth processing module is used to calculate the intention residual based on the weighting factor of the operation, and automatically apply the optimal conflict ablation scheme when the intention residual is greater than or equal to the intention residual threshold.
[0035] According to one aspect of the present invention, an electronic device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the conflict ablation method based on semantic model and sequence CRDT.
[0036] Compared with the prior art, the beneficial effects of the present invention are:
[0037] 1. This invention solves the problem of semantically perceptive and quality-controllable collaborative editing conflicts by using semantic triple modeling and sequence CRDT technology, taking into account the user intent perception characteristics and the conflict association characteristics of operation semantics in collaborative editing scenarios.
[0038] 2. This invention constructs a factor graph model and calculates intention residuals, which solves the semantic-level operation conflict problem in multi-user concurrent editing scenarios.
[0039] 3. This invention utilizes semantic information to process redundant operation nodes generated by sequence CRDT, which can better preserve user intent at the semantic level, make conflict ablation quality more controllable, and alleviate the problem of CRDT operation node backlog. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart of a conflict ablation method based on semantic model and sequence CRDT provided for embodiments of the present invention.
[0042] Figure 2 A flowchart of semantic modeling and intent fingerprint generation provided for embodiments of the present invention.
[0043] Figure 3 A flowchart for semantic conflict detection provided in an embodiment of the present invention.
[0044] Figure 4 A flowchart for calculating the residual intent provided in an embodiment of the present invention.
[0045] Figure 5 A flowchart for cleaning up redundant operation nodes provided in an embodiment of the present invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] Example 1
[0048] like Figure 1As shown, this embodiment of the invention proposes a conflict ablation method based on semantic models and sequence CRDT, including: Step 1, constructing a semantic triple for each operation, inputting the operation intent in the semantic triple into an encoder to generate a high-dimensional vector, and converting the high-dimensional vector into binary code as an intent fingerprint; Step 2, when there is a common pre-dependency, determining whether multiple operations have intent conflicts: if the similarity between the intent fingerprints of the operations is higher than or equal to a preset maximum similarity threshold, then multiple operations are determined to have intent conflicts, and the type is redundant conflict; if the similarity between the intent fingerprints of the operations is higher than a preset minimum similarity threshold but lower than a preset maximum similarity threshold, then multiple operations are determined to have intent conflicts, and the type is redundant conflict; If the similarity threshold is reached, the large language model is used to judge the remaining intent conflicts to be identified, except for redundant conflicts. After judgment, all conflicts enter the conflict ablation process. Step 3: The conflict ablation process is modeled as a factor graph model. The credibility potential function of a single operation and the compatibility potential function between operations are defined, and the optimization problem based on the two potential functions is solved to obtain the optimal conflict ablation scheme. Step 4: The intent residual is calculated according to the weight factor of the operation. When the intent residual is lower than the intent residual threshold, manual intervention is triggered to choose backtracking or to choose to execute the optimal conflict ablation scheme. When the intent residual is greater than or equal to the intent residual threshold, the optimal conflict ablation scheme is automatically applied.
[0049] Specifically, see Figure 2 Step 1 includes the following:
[0050] Each user's operation is represented using a CRDT structure, which includes the operation type, content, timestamp, user identifier, sequence structure information, etc. A corresponding semantic triple is constructed for each operation, namely the operation intent, the set of preceding dependencies, and the set of affected nodes. Where I represents the operation intent, such as "modify paragraph topic"; D represents the set of prerequisite dependencies, indicating that this operation depends on certain operation nodes; and P represents the set of affected nodes, indicating that this operation disables the effects of certain nodes.
[0051] Specifically, semantic triples are defined based on business logic and CRDT structure information, including: upon receiving an operation, extracting the type and content of the operation from the CRDT structure itself, as the operation intent of the semantic triple; and defining the set of prerequisite dependencies and the set of affected nodes for the operation based on business logic. Here, business logic refers to the logical relationships between operations that a user can perform in a specific usage scenario. For example, if a user wants to perform the operation "Modify Requirement 1," logically, "Requirement 1" must exist. Based on this business logic, the prerequisite dependency node for the operation "Modify Requirement 1" can be defined as "Create Requirement 1."
[0052] The operation intent in the semantic triple is input into a lightweight encoder (such as DitilBERT), thereby mapping the operation intent into a fixed-length high-dimensional vector. Then through a projection matrix , high-dimensional vector Transform into A binary code, serving as an intent fingerprint, is embedded in the operation as metadata for subsequent conflict detection. The intent fingerprint H characterizes the operation intent, and its calculation expression is as follows:
[0053] (1)
[0054] in, For the projection matrix, It is a high-dimensional vector.
[0055] Specifically, step 2 includes the following:
[0056] Determining the concurrency of multiple operations: If no concurrency exists (meaning no other operations are collaborating or other operations have already completed in a collaborative scenario), the operation is applied directly. In a collaborative scenario, if multiple received operations are generated independently and none of them contain the processing results of other operations locally, then concurrency is determined. Specifically, if version information is stored, multiple operations generated based on the same version are considered to have a concurrency relationship; if neighboring operation node information is stored, multiple operations with the same adjacent operation node in the CRDT structure are considered to have a concurrency relationship. Finally, using the sequence structure information of the CRDT, the multiple operations determined to be concurrent are constructed into a deterministic and consistent sequence structure.
[0057] See Figure 3 For multiple concurrent operations, semantic conflicts (including hard logic conflicts and intent conflicts) are detected. The specific process is as follows:
[0058] 1. Utilizing semantic triples Perform hard logic conflict judgment:
[0059] Inspection Operation Scope of influence Does it include operations? Pre-dependencies ,operate Scope of influence Does it include operations? Pre-dependencies , and record as ,Right now:
[0060] (2)
[0061] in, Indicates operation and operation Does it have a hard logical conflict? Indicates or; This represents the empty set.
[0062] like If the result is 1, it is determined that there is a hard logic conflict, and the conflict resolution process begins.
[0063] like If the result is not 1, it is determined that there is no hard logic conflict. Then, the pre-dependency set of the semantic triple is used to determine whether multiple operations have common pre-dependencies: if there are no common pre-dependencies, multiple operations are judged to be reasonable differences even if there are conflicts (i.e. multiple operations can coexist); if there are common pre-dependencies, it is further determined whether multiple operations have intention conflicts.
[0064] 2. Calculate the Hamming distance between the intent fingerprints of the two operations. And calculate similarity The formula is as follows:
[0065] (3)
[0066] Where k represents k bits of binary code, that is, the number of bits in H; A preset minimum similarity threshold indicates a low relevance between the operational intentions. The preset maximum similarity threshold indicates that the similarity is too high and the operational intentions are almost identical.
[0067] like It determines that multiple operations do not have conflicting intentions and can coexist;
[0068] like If multiple operations are found to have conflicting intents and are classified as redundant conflicts, a decision is made directly based on the vector clock and user role weights, retaining the operation with the highest overall weight.
[0069] like The large language model is used to judge the remaining intention conflicts to be identified, except for redundant conflicts: for operations with completely opposite intentions, the compatibility is judged to be 0, and the conflict resolution process is entered; for operations with partially conflicting intentions (not completely opposite), the large language model is used to generate alternative operations that take into account the intentions of both parties, and the alternative operations are input into the conflict resolution process.
[0070] Specifically, step 3 includes the following:
[0071] The conflict resolution process is modeled as a factor graph model, introducing random variables. This represents the execution state of n conflicting operations, where the state of the i-th conflicting operation is determined by a local random variable. express, Possible values , where 1 indicates that the operation is adopted, and 0 indicates that it is discarded or modified.
[0072] Define the confidence potential function for a single operation. ,in This represents the set of environmental observation variables in which the operation takes place, including: the timestamp of the operation. User role weighting coefficient of the sender It can be obtained from the CRDT structure being operated on:
[0073] (4)
[0074] in, and These are the corresponding adjustment parameters.
[0075] Define the compatibility potential function between operations. ,in The set of prerequisite dependencies and influences of two operations can be obtained from semantic triples:
[0076] (5)
[0077] in, The conflict sensitivity coefficient, a constant, is used to control the strength of the influence of intent similarity on the potential function. Indicates the similarity between two operations. To constrain the correction factor, if the semantic triple is violated... or Constraints, or the asynchronous decision logic of a large language model, are contradictory. The value is 0.
[0078] An approximate reasoning method is used to solve the optimization problem based on two potential functions, and the optimal conflict ablation scheme is obtained. :
[0079] (6)
[0080] In formula (6), the confidence potential function Main solution required Therefore, it is omitted as Compatibility potential function Main solution required Therefore, it is omitted as .
[0081] Specifically, see Figure 4 Step 4 includes the following:
[0082] According to the operation Corresponding weighting factors Calculate the intended residual:
[0083] (7)
[0084] in, Indicates the optimal conflict ablation scheme Each conflicting operation The corresponding execution status; express The corresponding weighting factors, which consist of semantic weights Information entropy weight User role weight It was calculated from three dimensions.
[0085] A preset intent persistence threshold τ is defined, representing the minimum acceptable intent persistence:
[0086] like If the ablation quality is deemed too low (<τ), a manual intervention request is triggered. The user chooses to revert to the original state of the operation (using operation logs or version snapshots to restore the concurrent operation to its state before processing). Simultaneously, the system will provide the optimal conflict ablation solution. For user reference;
[0087] like ≥τ, automatically apply the optimal conflict ablation scheme .
[0088] Specifically, see Figure 5 The embodiments of the present invention also include a sub-process for periodically triggering redundant operation processing, specifically:
[0089] Check causal stability, that is, determine whether the current operation has been synchronized to all operation nodes. If it has not been synchronized to all operations, continue to wait (to synchronize). If it has been synchronized to all operations, proceed to the next step.
[0090] Determine if the current operation is referenced as a prerequisite by other operations: if yes, do nothing; if no, delete the specific operation content, retaining only metadata such as ID, timestamp, and intent fingerprint. If a series of consecutive incremental operations generate an intent fingerprint sequence... If the cumulative offset is extremely small and the following conditions are met, then this set of operations will be compressed into a single compound operation, retaining only the final state.
[0091] (8)
[0092] in, This represents the preset semantic offset threshold for the intent fingerprint, which is a very small value.
[0093] When the offset is less than a small value It is determined that in the series of consecutive incremental operation nodes, the subsequent operation has only a slight change from the previous operation, and they can point to a complete, undivided user operation intention.
[0094] Example 2
[0095] This embodiment of the invention uses a scenario of three people collaboratively editing a "meeting schedule" table in an online document to fully demonstrate the conflict ablation method proposed in Embodiment 1. The participants are user A, user B, and user C. The document is maintained based on a sequence CRDT, and each operation is modeled as a semantic triple with an attached intent fingerprint.
[0096] Step 1: Semantic modeling and intent fingerprint generation.
[0097] Initial document state: A meeting agenda-level document already exists, with the title "Agenda: Budget Approval" and corresponding operation nodes. Its subordinate items already include budget approval-related content, corresponding to Subsequent operations on child nodes.
[0098] User B's actions Insert a new line below the "Budget Approval" line, with the content "Budget reduced by 5%";
[0099] Semantic triples : =“Insert a 5% budget cut” , ;
[0100] Intent fingerprint generation: The input is a lightweight encoder, which projects it into a k-bit binary code using a projection matrix. as metadata embedding .
[0101] User C's operation Insert a new line below the "Budget Approval" line, with the content "Budget increase of 10%";
[0102] Semantic triples : ="Insert budget increase of 10%" , = ;
[0103] Intent fingerprint generation: similarly obtained .
[0104] User A's actions Delete the "Budget Approval" row and all its subordinate entries (referring to entries at the bottom level of the budget approval line). Operation nodes are operations that have prerequisite dependencies); semantic triples : ="Delete budget approval", , ={ and all its subsequent child nodes}.
[0105] Step 2: Concurrency detection and semantic conflict judgment.
[0106] and The two operations arrive at the server almost simultaneously, and the server determines that they are concurrent operation streams. It arrived slightly later, but since the other two operations had not been processed when it was generated, it was still considered concurrent.
[0107] Hard constraint check:
[0108] examine and : , There is no hard logical conflict;
[0109] examine and : Include and all its subsequent child nodes, and Include ⇒ ⇒ This triggers a hard logic conflict; similarly... and There are also logical conflicts.
[0110] Common Dependency and Similarity Calculation: and There are no hard constraint conflicts, but they share a common prerequisite dependency. Next, calculate intent similarity for further inspection. and The similarity sim(B,C) is obtained by calculating the Hamming distance. The similarity sim(B,C) is between... and In between, the large language model was invoked to make a judgment, and the conclusion was that "reduction" and "addition" have opposite semantics. and Set compatibility to 0 and directly input the factor graph model.
[0111] Step 3: Constructing the factor graph model and solving for the optimal conflict ablation scheme.
[0112] For the set of conflicting operations Construct a factor graph model.
[0113] Definition of random variable: , where local random variables , , These represent conflicting operations. , , state, Possible values of (i=A, B, C) , where 1 indicates that the operation is adopted, and 0 indicates that it is discarded or modified.
[0114] variable potential function (Single operation reliability):
[0115] for The timestamp indicates that it occurred and Afterwards (i.e., the deletion operation is later than the insertion operation), the user role weight is user A (higher weight).
[0116] for The timestamp is relatively early, and the user weight is moderate.
[0117] for The timestamp is relatively early, and the user weight is moderate.
[0118] definition , For timestamps, For user weight, It indicates a direct proportional relationship.
[0119] Compatibility potential function (Inter-operation compatibility):
[0120] : and When adopting both, because Constraint correction factor Therefore ; Similarly, it is 0; Because sim(B,C) is extremely low, the semantics are contradictory. =0, therefore (1,1)=0; the potential function values of other combinations (such as one adopted and one discarded) are positive.
[0121] Optimization solution:
[0122] System Solution .
[0123] Candidate solutions and their total energy (qualitative comparison):
[0124] Option 1 is X={1,0,0} (only adopted). Energy mainly comes from It is precisely the right time.
[0125] Option 2 is X={0,1,0} (only adopted). Energy comes from It is positive but less than Scheme 1.
[0126] Option 3 is X={0,0,1} (only adopted). Energy comes from It is positive but less than Scheme 1.
[0127] Option 4 is X={0,1,1} (adopting B and C, discarding A): because The total energy is negative infinity, which is not feasible.
[0128] Option 5 is X={1,1,0} or {1,0,1}: because or If the value is 0, the total energy is negative infinity, which is not feasible.
[0129] The optimal conflict resolution solution X*={1,0,0} is derived, which adopts user A's deletion operation and discards user B and user C's insertion operations. The factor graph model automatically identifies that the deletion operation logically covers the subsequent concurrent insertion, and user A has the highest role weight, hence this decision is made.
[0130] Step 4: Calculation of intentional residual value and judgment by human intervention.
[0131] Calculate the intended residual of the optimal conflict ablation scheme X*. :
[0132] (9)
[0133] in, Based on semantic weight Information entropy weight User role weight The results were obtained through comprehensive calculations.
[0134] (Delete operation): High Gain, high user role weight, and relatively new operation. , (Insertion operation): Gain, etc.
[0135] because , The molecule contains only The contribution of the operation is calculated, while the denominator contains the sum of the contributions of all operations. R is less than 1. If R is less than the preset threshold τ, it is automatically determined that the conflict ablation quality has not reached the ideal threshold, triggering a manual intervention request.
[0136] Manual intervention interface display:
[0137] Conflict Summary: User A deleted the "Budget Approval" row, and users B and C simultaneously inserted semantically contradictory entries below that row;
[0138] System recommended solution: Apply the delete operation and ignore the two insert operations;
[0139] Optional actions: Apply the system's suggestion; or choose to roll back, for example, keep "Add 10% to the budget" instead of deleting it; or the user manually edits a fusion plan, such as "The budget will not be adjusted for now, to be held at the next meeting".
[0140] The user selects Option 3 and manually enters "Budget adjustment postponed," based on which the system generates a new merge operation. The intention fingerprint is calculated by user input and replaces the position of the original conflict operation set in the factor graph.
[0141] Embodiments of the present invention also include a redundant operation node cleanup sub-process.
[0142] After multiple rounds of collaborative editing, the system accumulated a large number of operation nodes that had been overwritten or deleted. The system background periodically triggers a cleanup process.
[0143] Scenario: A series of consecutive text insertion operations , , This includes the operation ID, timestamp, user information, etc., all appended with semantically similar content (e.g., supplementary meeting minutes). A subsequent user performed a delete operation. Remove the entire paragraph.
[0144] Causality stability check: System check , , The vector clock confirms that all copies have been received. Once the conditions are met, these nodes are marked as causally stable.
[0145] Dependency reference checking: The system iterates through the set D of all active operation nodes to confirm that no node will... , , As a prerequisite dependency, the check passed.
[0146] Intent fingerprint compression judgment: extraction , , Given the intent fingerprints H1, H2, and H3, calculate the Hamming distance between consecutive fingerprints: dist(H1,H2) < ε and dist(H2,H3) < ε. Since the three fingerprints are semantically continuous and are all supplementary minutes of the same meeting, the offset is minimal, satisfying the compression condition.
[0147] create , , Composite nodes Physically delete from memory , , The specific content, i.e., the original text and other information.
[0148] Will Insert a historical graph to replace the original node sequence.
[0149] The causal consistency of CRDT has not been violated: if there are future events based on The concurrent operations arrived because The necessary ID and timing information are retained, and the system can... The metadata is used to infer the existence of node sequences and their semantic features, thereby completing the correct merging or providing error messages.
[0150] Example 3
[0151] This invention proposes a conflict ablation system based on semantic models and sequence CRDT, comprising: a first processing module for constructing semantic triples for each operation, inputting the operation intent from the semantic triples into an encoder to generate a high-dimensional vector, and converting the high-dimensional vector into binary code as an intent fingerprint; and a second processing module for determining hard logic conflicts using semantic triples when multiple operations have concurrent relationships; determining whether multiple operations have common pre-dependencies using the pre-dependency set of the semantic triples when no hard logic conflict exists; and further determining whether multiple operations have common pre-dependencies when common pre-dependencies exist. Is there an intent conflict? When the similarity between the intent fingerprints of operations is higher than the preset minimum similarity threshold but lower than the preset maximum similarity threshold, an intent conflict exists, and the conflict ablation process begins. The third processing module is used to model the conflict ablation process as a factor graph model, define the credibility potential function of a single operation and the compatibility potential function between operations, and solve the optimization problem based on the credibility potential function and the compatibility potential function to obtain the optimal conflict ablation scheme. The fourth processing module is used to calculate the intent residual based on the weight factor of the operation. When the intent residual is lower than the intent residual threshold, the original state of the operation is selected to be backtracked.
[0152] The conflict ablation system based on semantic models and sequence CRDT provided in this invention addresses the problems of traditional collaborative editing conflict resolution methods, such as difficulty in identifying semantic-level conflicts and preserving intent, and redundancy in operation nodes of sequence CRDT. It provides a conflict ablation method based on semantic models and sequence CRDT, which solves the problems of semantic awareness, quality controllable collaborative editing conflicts, and semantic-level operation conflicts in multi-user concurrent editing scenarios by defining semantic triples, obtaining operation intent information, performing fast conflict detection, optimal conflict ablation of factor graphs, intent residual evaluation, and space occupancy optimization.
[0153] Based on the same inventive concept as the foregoing embodiments, this embodiment of the invention also provides an electronic device, including a memory and a processor. The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement a conflict ablation method based on semantic model and sequence CRDT as proposed in the above embodiments.
[0154] Finally, it should be noted that the above specific embodiments are merely representative examples of the present invention. Obviously, the present invention is not limited to the above specific embodiments and many variations are possible. Any simple modifications, equivalent changes, and alterations made to the above specific embodiments based on the technical essence of the present invention should be considered within the protection scope of the present invention.
Claims
1. A conflict ablation method based on semantic models and sequence CRDT, characterized in that, include: For each operation, a semantic triple is constructed. The operation intent in the semantic triple is input into the encoder to generate a high-dimensional vector. The high-dimensional vector is then converted into binary code as an intent fingerprint. When multiple operations are concurrent, semantic triples are used to determine hard logic conflicts: When there is no hard logical conflict, the pre-dependency set of semantic triples is used to determine whether multiple operations have common pre-dependencies: When there is a common pre-dependency, it is determined whether there is an intent conflict among multiple operations: if the similarity between the intent fingerprints of the operations is higher than or equal to the preset maximum similarity threshold, then multiple operations are determined to have an intent conflict, and the type is redundant conflict; if the similarity between the intent fingerprints of the operations is higher than the preset minimum similarity threshold but lower than the preset maximum similarity threshold, then the large language model is used to judge the remaining intent conflicts to be identified except for redundant conflicts, and after the judgment, they all enter the conflict ablation process. The conflict ablation process is modeled as a factor graph model. The credibility potential function of a single operation and the compatibility potential function between operations are defined. The optimization problem based on the credibility potential function and the compatibility potential function is solved to obtain the optimal conflict ablation scheme. The intention residual is calculated based on the weighting factor of the operation. When the intention residual is greater than or equal to the intention residual threshold, the optimal conflict ablation scheme is automatically applied.
2. The conflict ablation method based on semantic model and sequence CRDT according to claim 1, characterized in that, The method further includes: when a hard logic conflict exists, entering a conflict resolution process.
3. The conflict ablation method based on semantic model and sequence CRDT according to claim 1, characterized in that, The method further includes: when there is no common prerequisite dependency, multiple operations are determined to be able to coexist.
4. The conflict ablation method based on semantic model and sequence CRDT according to claim 1, characterized in that, The method further includes: if the similarity between the intent fingerprints of the operations is lower than or equal to a preset minimum similarity threshold, then multiple operations are determined to have no intent conflict.
5. The conflict ablation method based on semantic model and sequence CRDT according to claim 1, characterized in that, The large language model is used to identify all intent conflicts except for redundant conflicts, and all conflicts proceed to the conflict ablation process after identification. For operations with conflicting intentions, the compatibility is determined to be 0, and the conflict resolution process begins. For operations with partially conflicting intentions, a large language model is used to generate alternative operations that take into account the intentions of both parties, and the alternative operations are input into the conflict resolution process.
6. The conflict ablation method based on semantic model and sequence CRDT according to claim 1, characterized in that, The method further includes a redundant operation processing sub-process, including: Determine whether the current operation has been synchronized to all operation nodes; If not, then wait for synchronization; If so, and the current operation is not referenced by any other operation as a prerequisite, then delete the operation content of the current operation and retain only the metadata.
7. The conflict ablation method based on semantic model and sequence CRDT according to claim 1, characterized in that, The optimization problem based on the credibility potential function and the compatibility potential function is expressed as follows: , in, This represents the optimal conflict ablation scheme. The confidence potential function represents a single operation. Let i represent the compatibility potential function between operations, and i and j represent operations.
8. The conflict ablation method based on semantic model and sequence CRDT according to claim 1, characterized in that, The method further includes: When the intention residual is lower than the intention residual threshold, choose to backtrack to the original state of the operation.
9. A conflict ablation system based on semantic models and sequence CRDT, characterized in that, include: The first processing module is used to construct a semantic triple for each operation, input the operation intent in the semantic triple into the encoder to generate a high-dimensional vector, and convert the high-dimensional vector into binary code as an intent fingerprint; The second processing module is used to determine hard logic conflicts when multiple operations have concurrent relationships using semantic triples. When no hard logic conflict exists, it uses the pre-dependency set of semantic triples to determine whether multiple operations have common pre-dependencies. When common pre-dependencies exist, it determines whether multiple operations have intent conflicts. If the similarity between the intent fingerprints of operations is higher than or equal to a preset maximum similarity threshold, multiple operations are determined to have intent conflicts, and the type is redundant conflict. If the similarity between the intent fingerprints of operations is higher than a preset minimum similarity threshold but lower than a preset maximum similarity threshold, it uses a large language model to determine the remaining intent conflicts to be identified, except for redundant conflicts. After the determination, all of them enter the conflict ablation process. The third processing module is used to model the conflict ablation process as a factor graph model, define the confidence potential function of a single operation and the compatibility potential function between operations, and solve the optimization problem based on the confidence potential function and the compatibility potential function to obtain the optimal conflict ablation scheme. The fourth processing module is used to calculate the intention residual based on the weighting factor of the operation, and automatically apply the optimal conflict ablation scheme when the intention residual is greater than or equal to the intention residual threshold.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the conflict ablation method based on semantic model and sequence CRDT as described in any one of claims 1 to 8.