Method for detecting and resolving conflicts in GIS collaborative editing considering topological semantic features
Patent Information
- Application Number
- CN202611517297.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]但是,消息同步或版本比较主要处理同一对象或同一版本之间的修改差异,通常不能直接判断一个编辑事件对相邻、包含、依附或控制关系要素造成的影响;对象锁会降低并发编辑效率,也难以覆盖不同要素之间的间接影响;提交后的拓扑检查则不能在未决编辑事件相互叠加之前给出处理结果
1、本发明从实时编辑事件流出发直接完成冲突检测,替代传统提交入库后的静态事后校验,在编辑操作生成的第一时间就完成冲突识别,避免多轮操作叠加后形成复杂冲突问题,从根源上减少了后续回溯修正的工作量。
Smart Images

Figure CN123011365A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of WebGIS real-time collaborative editing technology, specifically relating to a method for detecting and resolving conflicts in GIS collaborative editing that takes into account topological semantic features. Background Technology
[0002] With the development of WebGIS platforms and multi-terminal collaborative operations, multiple users can perform operations such as adding, deleting, moving, splitting, merging, geometrically modifying, or modifying attributes on the same spatial dataset within the same collaborative session. Existing collaborative editing solutions can control the editing order through message synchronization, version comparison, or object locking, and can also detect problems such as overlap, gaps, self-intersections, or hanging objects through GIS topology checks during the submission or data entry stage.
[0003] However, message synchronization or version comparison mainly deals with modification differences between the same object or the same version, and usually cannot directly determine the impact of an edit event on adjacent, contained, dependent or controlling elements; object locking reduces the efficiency of concurrent editing and is also difficult to cover the indirect effects between different elements; and post-commit topology checks cannot provide processing results before pending edit events overlap.
[0004] Therefore, a conflict detection and resolution method suitable for GIS collaborative editing is needed to convert events generated by multiple editing ends into a unified event object, determine the spatial, attribute and dependency impact range of each event, identify direct conflicts of the same element and indirect conflicts caused by topological relationships and business semantics, and re-verify and control version consistency before submitting the processing results. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features. This method breaks the current technical status quo where real-time collaboration, topology inspection, and conflict resolution are mutually exclusive. It constructs a fully integrated process from real-time editing event access to result closed-loop synchronization, achieving joint real-time identification of topological conflicts and business semantic conflicts. Through a hierarchical resolution mechanism, it achieves the optimal balance between multi-user concurrency efficiency and spatial data compliance.
[0006] For ease of understanding, the technical terms involved in this invention include the following: Collaborative editing client: refers to a collection of clients that perform editing operations such as adding, deleting, moving, splitting, merging, and modifying attributes in GIS. Real-time editing event stream: refers to the sequence of raw editing operation events continuously sent by multiple collaborative editing clients; Collaborative editing event object: refers to the unified event object obtained by the standardized parsing of the original editing event, which is used for subsequent impact domain extraction, conflict detection and result write-back; Geometric influence domain: refers to the spatial range that the current editing event may affect, which can be represented as a bounding rectangle, buffer, polygonal region, or topological neighborhood; Attribute Affected Set: Refers to the attribute fields involved in the current edit event and their scope of change; Operational dependencies: These refer to the dependencies between the current edit event and its predecessor, the base version, or the event to be confirmed. Related feature set: refers to the set of potentially affected geographic features retrieved from the spatial index based on the geometric influence domain; Topology rule base: refers to the set of rules used to describe spatial constraints such as intersection, overlap, adjacency, closure, gap, hanging, and attachment between geographic features; Semantic constraint library: refers to a set of rules used to describe element types, business priorities, prohibition and restriction relationships, controlling element relationships, and dependency relationships; Conflict logs refer to structured results that record the source of conflict, target elements, hit rules, scope of impact, conflict level, and recommended handling strategies. Conflict resolution result events: These refer to result events that record the resolution method, versions before and after the resolution, responsible user, rollback flag, and final state. Conflict assessment parameters: These refer to four types of core normalized indicators used to quantify the severity of conflicts, including topological severity, semantic weight, scope of impact, and concurrency proximity. Comprehensive conflict score: refers to the normalized score calculated by the four types of conflict evaluation parameters and their topological semantic coupling according to preset weights, and is the basis for conflict classification. Event Dependency Directed Acyclic Graph: A structured graph that records the preorder and successor dependencies between all edit events with the commit sequence number increasing as the connection direction. It is used to quickly locate the closure of the influencing event in rollback scenarios. User-side idempotent update: refers to a mechanism in which the collaborative editing end uses a unique result identifier to deduplicate results and only applies results with a submitted sequence number greater than the locally processed sequence number, ensuring that the state of multiple ends is synchronized and consistent.
[0007] To achieve the above technical objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for detecting and resolving conflicts in GIS collaborative editing that takes into account topological semantic features, comprising: S1. Receive real-time editing events generated by multiple collaborative editing terminals, and determine the current editing event and its related candidate editing events from the real-time editing events based on the session identifier, base version, and event status; S2. Standardize and parse the current editing event and candidate editing events to generate a collaborative editing event object. The collaborative editing event object includes at least an event identifier, user identifier, feature identifier, operation type, timestamp, base version, geometric change content, attribute change content, and dependency identifier. S3. Construct the corresponding candidate post-edited state based on the collaborative editing event object, and determine the geometric influence domain, attribute influence set, and operation dependency set; S4. Based on the geometric influence domain, retrieve spatially related elements; based on the element association relationship, retrieve related elements with dependency or control relationships; and combine the candidate editing events to form a conflict detection set. S5. Based on feature identifiers, base versions, attribute influence sets, and geometric change content, perform direct conflict detection on the current editing event and candidate editing events; calculate the topological relationship between the candidate edited state and the spatially related or associated features, and match the topological relationship with semantic constraints to perform indirect conflict detection; S6. Generate conflict records based on the results of direct conflict detection and indirect conflict detection, and determine the conflict level and candidate processing strategy based on the hit mandatory constraints or conflict evaluation parameters. S7. Generate candidate processing results according to the candidate processing strategy, re-execute the direct conflict detection and indirect conflict detection on the candidate processing results in the isolated candidate state, and verify the base version; S8. If the re-detection passes and the base version remains unchanged, write the candidate processing result into the version library or business library, update the event dependency, generate a processing result event with the processed version and processing status, and broadcast the processing result event to the relevant collaborative editing end; if the re-detection fails or the base version changes, redetermine the conflict detection set and perform conflict detection.
[0008] Furthermore, in step S1, the real-time editing event is transmitted through at least one or more real-time communication mechanisms, such as WebSocket, long-connection push, and message queue.
[0009] Furthermore, in step S2, the standardized parsing process specifically includes: Extract the event unique identifier, user identifier, session identifier, feature identifier, feature type, operation type, timestamp, base version, geometric change content, attribute change content, and predecessor dependency tag from the original edit event to generate a collaborative edit event object with a unified structure; Based on a unified structure, collaborative editing event objects retain core change information in a differentiated manner for different editing operations, including: geometric modification, move, split and merge operations, retaining geometric information or key geometric differences before and after the change; attribute modification operations, retaining the modified fields and changes in field values; and deletion operations, retaining the original geometry, attributes and dependencies of the deleted features.
[0010] Further, in step S3, the geometric influence domain is matched and generated according to different operation types to generate corresponding forms: for adding a face or modifying a face boundary operation, the added area, deleted area, boundary movement area and its buffer are used as the geometric influence domain; for moving a point or moving a line operation, the position before and after the movement and the movement path buffer are used as the geometric influence domain; for splitting a line or splitting a face operation, the splitting line and the topological neighborhood of the split feature are used as the geometric influence domain; for merging faces operation, all face features involved in the merging and their outer boundary neighborhood are used as the geometric influence domain. For edit events that only involve attribute changes and not geometric changes, the original geometric envelope of the edited element and the range of associated elements that have a dependency or control relationship with the edited element are used as the retrieval scope of the edit event.
[0011] Furthermore, in step S4, the conflict detection set includes spatial candidate elements, relation candidate elements, and event candidate objects; The spatial candidate elements are retrieved within the geometric influence domain through spatial indexing, the relational candidate elements are retrieved through dependency, control or business association relationships, and the event candidate objects are unresolved editing events that have the same session identifier as the current editing event and meet preset version relationship or event status conditions.
[0012] Further, in step S5: The direct conflict detection includes obtaining the common basic state of the current editing event and the candidate editing event when they have the same element identifier or act on the same basic element, and generating the first candidate edited state and the second candidate edited state respectively. For attribute changes, if the attribute impact sets of two entities have the same field and the corresponding candidate field values are different, the attributes are determined to be in direct conflict. For geometric changes, first determine whether the geometric change regions of the two events intersect; if they intersect, generate two combined states according to the order of executing the current editing event first and then the candidate editing event, and the order of executing the candidate editing event first and then the current editing event, respectively. When the two combined states are not equivalent under the preset geometric tolerance, a direct geometric conflict is determined. When one event is a deletion operation and another event is a modification, splitting, or merging operation, or when both events act on the same basic element but the results cannot be simultaneously achieved, it is determined that the operations are in direct conflict.
[0013] Furthermore, the indirect conflict detection is performed based on topological rules and semantic constraints. The topological rules include at least source element type, target element type, topological predicate, allowable tolerance, rule severity, mandatory constraint marker, and candidate processing strategy. The semantic constraints include at least source element type, target element type, business relationship, business priority, prohibited or restricted attributes, semantic weight, and mandatory constraint marker.
[0014] Furthermore, the indirect collision detection includes: Calculate at least one topological predicate among intersection, containment, adjacency, distance, closure, dangling, or attachment between the candidate edited state and related features; Query the corresponding semantic constraints based on the source feature type and the target feature type; An indirect conflict record is generated when the topological predicate satisfies the prohibition conditions specified by the semantic constraints or exceeds the tolerance specified by the semantic constraints.
[0015] Furthermore, at least one of the following semantic constraints included in the indirect conflict detection step—prohibition of crossing, prohibition of control boundaries from being destroyed, or prohibition of breaking specified dependency relationships—is set as a mandatory constraint. When the mandatory constraint is hit, the corresponding conflict is identified as a preset high-level conflict, and the conflict level is not reduced by other low-weight evaluation parameters; Conflicts that do not meet mandatory constraints are classified into conflict levels according to conflict evaluation parameters.
[0016] Furthermore, the conflict evaluation parameters include topology severity. Semantic weight Scope of impact and concurrency proximity , , , and The range of values is all ; according to and Calculate topological semantic coupling ,according to Calculate the overall conflict score Among them, each weight , , , , All are non-negative numbers and the sum of their weights is 1; The lower limit of the direct conflict level is determined based on the results of the direct conflict detection. When no direct conflict is detected, When a direct attribute conflict or a direct geometric conflict is detected, When a direct conflict in operations is detected, ; The scoring level is determined based on the comprehensive conflict score S. When S is less than the first threshold, When S is greater than or equal to the first threshold and less than the second threshold, When S is greater than or equal to the second threshold, When a mandatory constraint is hit, the final conflict level will be adjusted. It has been determined to be a Level 3 conflict; When a mandatory constraint is not hit, according to Determine the final conflict level L.
[0017] Furthermore, the level values 1, 2, and 3 correspond to Level 1 conflict, Level 2 conflict, and Level 3 conflict, respectively.
[0018] Further, in step S8, the step of redetermining the conflict detection set and performing conflict detection when the re-detection fails or the base version changes includes: In isolated candidate states, a candidate processing strategy is applied to regenerate the geometric influence domain, attribute influence set, and operation dependency set, and to perform direct conflict detection and indirect conflict detection. After the re-detection passes, the database transaction is started. The elements to be written are locked in the order of the element identifiers. The current version number of each element to be written is compared with the base version number in the collaborative editing event object. The current rule version is also compared with the rule version used during conflict detection. When all versions are consistent, write the element results, increment the version number, write the event dependencies and processing result events in the same transaction; when any version is inconsistent or the transaction serialization fails, roll back the transaction and re-execute the conflict detection based on the latest version.
[0019] The update event dependencies specifically include: The event dependencies form a directed acyclic graph connected in the direction of increasing submission sequence number; When a committed event is rolled back, the successor event closure of the event is determined from the directed acyclic graph, the state is restored from the version before the event in the isolation repair branch, the event is excluded, and the impact information determination, conflict detection, classification and processing are re-executed for the successor events in topological order. After the repair branch passes the re-inspection, it is atomically released as the new current version, retaining the original event logs and generating processing result events to identify compensation, replacement relationships, and new commit sequence numbers.
[0020] In a second aspect, based on the same inventive concept as the above method, the present invention also provides a GIS collaborative editing conflict detection and resolution system that takes into account topological semantic features. The system, executing the above method, includes an event access module, an impact information determination module, a candidate object retrieval module, a conflict detection module, a conflict processing module, and a result submission module, wherein: The event access module is used to receive real-time editing events generated by multiple collaborative editing terminals, determine the current editing event and related candidate editing events from the real-time editing events according to the session identifier, base version and event status, perform standardized parsing on the current editing event and candidate editing events, and generate a collaborative editing event object. The collaborative editing event object includes at least the event identifier, user identifier, feature identifier, operation type, timestamp, base version, geometric change content, attribute change content and dependency identifier. The impact information determination module is used to construct a corresponding candidate post-edited state based on the collaborative editing event object, and to determine the geometric impact domain, attribute impact set, and operation dependency set. The candidate object retrieval module is used to retrieve spatially related elements based on the geometric influence domain, retrieve related elements with dependency or control relationships based on element association relationships, and form a conflict detection set by combining the candidate editing events. The conflict detection module is used to perform direct conflict detection on the current editing event and the candidate editing event based on feature identifier, base version, attribute influence set and geometric change content, calculate the topological relationship between the candidate edited state and the spatially related or associated features, match the topological relationship with semantic constraints to perform indirect conflict detection, generate conflict records based on the results of the direct and indirect conflict detection, and determine the conflict level and candidate processing strategy based on the hit mandatory constraints or conflict evaluation parameters. The conflict handling module is used to generate candidate processing results according to the candidate processing strategy, and to re-execute the direct conflict detection and indirect conflict detection on the candidate processing results in an isolated candidate state; The result submission module is used to verify the base version. When the re-detection passes and the base version has not changed, the candidate processing result is written to the version library or business library, the event dependency is updated, a processing result event with the processed version and processing status is generated and broadcast to the relevant collaborative editing end. When the re-detection fails or the base version changes, the process of re-determining the conflict detection set and executing conflict detection is triggered.
[0021] A third aspect of the present invention provides an electronic device comprising a processor and a memory, the memory storing a computer program, which, when executed by the processor, causes the electronic device to perform all steps of a GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features, as proposed in this invention.
[0022] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements all steps of the GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features proposed in this invention.
[0023] In a fifth aspect, the present invention provides a computer program product comprising a computer program that, when executed by a processor, implements all steps of the proposed GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features.
[0024] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention directly completes conflict detection from the real-time editing event stream, replacing the traditional static post-verification after submission to the database. Conflict identification is completed at the first moment the editing operation is generated, avoiding complex conflict problems formed after multiple rounds of operation, and reducing the workload of subsequent backtracking and correction from the root.
[0025] 2. The entire process adopts a unified terminology system and a consistent data processing link, which completely breaks the traditional technical status quo where real-time synchronization, topology checking, and conflict resolution are independent and data is not synchronized, thus avoiding the problem of process fragmentation caused by inconsistent data standards in different links.
[0026] 3. Supports the simultaneous identification of direct conflicts and indirect conflicts determined by topology rules and business semantic constraints; by jointly utilizing topology relationship information and business semantic information, it reduces the false alarms or missed alarms that may occur when making conflict determination based on only a single type of information.
[0027] 4. Through a three-level hierarchical resolution mechanism, the optimal balance is achieved between the efficiency of multi-user collaborative editing and the accuracy of geographic data: low-risk conflicts can be resolved automatically without human intervention, while complex high-risk conflicts trigger a manual confirmation process, which greatly improves the overall efficiency of conflict handling.
[0028] 5. Through rollback marking and result synchronization mechanisms, the resolution results can support the dependency resolution of subsequent events, forming a self-running complete collaborative editing closed loop, which can be applied to industry scenarios with high requirements for spatial data compliance, such as urban renewal and land survey.
[0029] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0030] 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a structural diagram of a GIS collaborative editing conflict detection and resolution system that takes into account topological semantic features, according to an embodiment of the present invention.
[0032] Figure 2 This is a flowchart of the GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features according to an embodiment of the present invention.
[0033] Figure 3 This is a flowchart of the editing event standardization and influence domain extraction process in an embodiment of the present invention.
[0034] Figure 4 This is a flowchart of the joint detection and classification of direct conflict and indirect topological semantic conflict in an embodiment of the present invention.
[0035] Figure 5 This is a flowchart of the conflict resolution version submission and compensation rollback replay process according to an embodiment of the present invention. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0037] In one embodiment, this embodiment proposes a GIS collaborative editing conflict detection and resolution system that takes into account topological semantic features, including an event access module, an impact information determination module, a candidate object retrieval module, a conflict detection module, a conflict processing module, and a result submission module, wherein: The event access module is used to receive real-time editing events generated by multiple collaborative editing terminals, determine the current editing event and related candidate editing events from the real-time editing events according to the session identifier, base version and event status, perform standardized parsing on the current editing event and candidate editing events, and generate a collaborative editing event object. The collaborative editing event object includes at least the event identifier, user identifier, feature identifier, operation type, timestamp, base version, geometric change content, attribute change content and dependency identifier. The impact information determination module is used to construct a corresponding candidate post-edited state based on the collaborative editing event object, and to determine the geometric impact domain, attribute impact set, and operation dependency set. The candidate object retrieval module is used to retrieve spatially related elements based on the geometric influence domain, retrieve related elements with dependency or control relationships based on element association relationships, and form a conflict detection set by combining the candidate editing events. The conflict detection module is used to perform direct conflict detection on the current editing event and the candidate editing event based on feature identifier, base version, attribute influence set and geometric change content, calculate the topological relationship between the candidate edited state and the spatially related or associated features, match the topological relationship with semantic constraints to perform indirect conflict detection, generate conflict records based on the results of the direct and indirect conflict detection, and determine the conflict level and candidate processing strategy based on the hit mandatory constraints or conflict evaluation parameters. The conflict handling module is used to generate candidate processing results according to the candidate processing strategy, and to re-execute the direct conflict detection and indirect conflict detection on the candidate processing results in an isolated candidate state; The result submission module is used to verify the base version. When the re-detection passes and the base version has not changed, the candidate processing result is written to the version library or business library, the event dependency is updated, a processing result event with the processed version and processing status is generated and broadcast to the relevant collaborative editing end. When the re-detection fails or the base version changes, the process of re-determining the conflict detection set and executing conflict detection is triggered.
[0038] Specifically, such as Figure 1 As shown, the GIS collaborative editing conflict detection and resolution system adopts an overall logic of collaborative work consisting of "collaborative editing terminal, real-time editing event channel, GIS collaborative editing conflict detection and resolution server, and spatial index and rule base"; among which: The collaborative editing client generates a real-time editing event stream; The real-time editing event channel determines the current editing event and its related candidate editing events from the real-time editing events based on the session identifier, base version, and event status; The GIS collaborative editing conflict detection and resolution server includes an event access layer, a conflict detection layer, a conflict resolution layer, and a transaction tracing layer, among which: The event access layer is used to uniformly receive collaborative editing operations from multiple terminals, complete event timing sorting and standardization processing, extract the geometry, attributes and dependency information involved in the editing, and provide standardized input for subsequent stages; The conflict detection layer is used to quickly locate the range of data with potential conflicts, complete the full identification of direct operational conflicts and indirect topological semantic conflicts, and finally generate conflict records and classify them according to severity. The conflict resolution layer is used to handle conflicts automatically, by recommendation, or manually based on the conflict classification results. After status review and version rule verification, the data compliance after resolution is ensured. The transaction traceability layer is used to atomically commit compliant editing operations to the database, retain full operation logs and dependencies, support exception rollback and recovery, and finally broadcast the latest data status to all collaborating ends to achieve multi-end synchronization.
[0039] The spatial index and rule base layer includes a spatial data and version library, spatial indexes and relation tables, a topology rule and semantic constraint library, and an event log and outbox, wherein: The spatial index and relational tables adopt a layered hybrid deployment architecture, adapting grid indexes for point features, R-tree indexes for line features, and quadtree indexes for polygon features. It supports dynamic adjustment of the retrieval radius, buffer distance, and topological neighborhood layer by layer and business scenario, thereby narrowing the candidate retrieval range and reducing spatial query time. The topology rule and semantic constraint library employs a configurable rule engine storage structure, pre-configured commonly used GIS topology constraints, and retains subsequent rule fields and a custom configuration mechanism. It supports adding, modifying, and disabling topology rules through a visual interface. All rules are stored in a structured format of "trigger condition - judgment logic - severity level". The semantic constraint library adopts an associated storage mode that binds business tags to feature types, incorporates industry-standard business constraints, and supports importing custom semantic rules by project dimension. All rules are associated with corresponding semantic weight fields and can directly participate in multi-dimensional factor calculations for conflict leveling.
[0040] Specifically, in this embodiment, the system forms a complete closed-loop link from front-end interaction to underlying support, and completes data interaction through a standardized event bus. It is suitable for multi-user concurrent GIS collaborative editing scenarios, and avoids the problem of the separation between real-time synchronization, topology verification, and conflict resolution in traditional solutions from the architectural level. The collaborative editing client is the user's direct interactive entry point, supporting simultaneous access from multiple terminals including web, desktop, and mobile. All editing operations are not directly written to the server database, but are first encapsulated into standardized raw editing events and pushed to the server through a real-time communication channel. At the same time, it receives conflict resolution result events returned by the server and updates the feature status and highlights conflict areas in real time on the client, providing users with intuitive feedback on collaborative editing operations.
[0041] The GIS collaborative editing conflict detection and resolution server serves as the unified event entry point for the entire system. It is compatible with various real-time communication protocols such as WebSocket, long-connection push, and message queues, and can simultaneously access event streams from dozens of collaborative sessions. It uniformly parses raw editing events from different terminals and in different formats into collaborative editing event objects with a completely consistent structure. Different types of editing operations retain matching core information before and after the changes, providing a unified data foundation for subsequent end-to-end processing. The GIS collaborative editing conflict detection and resolution server comprises a four-layer architecture: The event access layer, as the first core layer of the GIS collaborative editing conflict detection and resolution server, is the unified entry point for connecting real-time editing events across multiple terminals. It receives all operation data streams from web, desktop, and mobile collaborative editing terminals. First, it sorts and assigns numbers to the scattered editing events on the server side to unify the timing benchmark for multi-user operations. Then, it transforms various heterogeneous editing operations into standardized formats and records core identification information. Finally, it accurately extracts the geometric influence domain, attribute influence set, and operation dependency set relationships involved in the editing operations, outputting well-organized and directly reusable preprocessed data for the subsequent conflict detection stage.
[0042] The conflict detection layer relies on the underlying spatial index and relationship tables to complete the conflict identification work across the entire chain. It first uses candidate set retrieval to quickly delineate the target data range that may have conflicts based on the spatial range of the operation, data association relationship and event type, avoiding the performance loss caused by full data scanning. Then, it sequentially completes direct conflict detection and topological semantic indirect conflict detection, covering both explicit conflicts caused by mutual exclusion of multi-user operations and implicit conflicts at the topological rule and semantic logic level. Finally, it automatically generates complete conflict records and classifies conflicts according to their impact range and severity, providing a clear basis for subsequent differentiated conflict resolution.
[0043] The conflict resolution layer is the core processing module that ensures the consistency of GIS collaborative editing data. Based on the conflict classification results output by the conflict detection layer, it matches the corresponding resolution strategy and supports three different processing modes: automatic resolution, system-recommended resolution scheme, and manual intervention. It adapts to conflict scenarios of varying complexity. After completing the initial resolution, it first re-checks the isolated candidate states to confirm the conflict handling effect, and finally performs a second verification of the version and rules to ensure that the edited results after resolution fully comply with the spatial data version specifications, topological rules, and semantic constraints, thus avoiding the introduction of new data logic errors during the conflict handling process.
[0044] The transaction traceability layer is responsible for the final implementation and full-process traceability of GIS collaborative editing operations. It transforms the verified editing operations into atomic transactions and writes them into spatial data and version control. It also generates complete event logs and data dependency graphs, fully preserving the flow trajectory and data relationships of all editing operations. When an operation anomaly occurs, it can rely on the logs to complete compensation rollback and dependency replay, achieving rapid data recovery. Finally, it broadcasts the post-commit processing results to all collaborative editing terminals, allowing multiple terminals to synchronously obtain the latest data status and ensuring real-time consistency of spatial data across terminals.
[0045] The spatial index and rule base layer is the core underlying support of the entire system. It consists of spatial data and version library, spatial index and relationship table, topology rule and semantic constraint library, and event log and mail box. The spatial index and relationship table adopts a layered hybrid deployment architecture, matching differentiated index strategies for different feature types such as points, lines and polygons. It supports dynamic adjustment of search parameters to narrow the candidate search range and reduce spatial query time. The topology rule library has pre-configured commonly used GIS topology constraints and supports visual custom configuration of rules. The semantic constraint library has pre-configured commonly used business constraints, including business priority rules, and supports importing custom rules by project. Rules are updated through versioned configuration, so that subsequent transactions use the effective rule version, completing the dynamic iteration of the underlying support capabilities.
[0046] In one embodiment, such as Figure 2 As shown, this embodiment provides a GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features. The method includes the following steps: S1: Receive real-time editing events generated by multiple collaborative editing terminals, and determine the current editing event and its related candidate editing events from the real-time editing events based on the session identifier, base version, and event status; S2: Standardize and parse the current editing event and candidate editing events to generate a collaborative editing event object. The collaborative editing event object includes at least an event identifier, user identifier, feature identifier, operation type, timestamp, base version, geometric change content, attribute change content, and dependency identifier. S3: Construct the corresponding candidate post-edited state based on the collaborative editing event object, and determine the geometric influence domain, attribute influence set, and operation dependency set; S4: Based on the geometric influence domain, retrieve spatially related elements; based on the element association relationship, retrieve related elements with dependency or control relationships; and combine the candidate editing events to form a conflict detection set. S5: Based on feature identifiers, base versions, attribute influence sets, and geometric change content, perform direct conflict detection on the current editing event and candidate editing events; calculate the topological relationship between the candidate edited state and the spatially related or associated features, and match the topological relationship with semantic constraints to perform indirect conflict detection; S6: Generate conflict records based on the results of direct and indirect conflict detection, and determine the conflict level and candidate processing strategies based on the hit mandatory constraints or conflict evaluation parameters. S7: Generate candidate processing results according to the candidate processing strategy, re-execute the direct conflict detection and indirect conflict detection on the candidate processing results in the isolated candidate state, and verify the base version; S8: If the re-detection passes and the base version remains unchanged, write the candidate processing result into the version library or business library, update the event dependency, generate a processing result event with the processed version and processing status, and broadcast the processing result event to the relevant collaborative editing end; if the re-detection fails or the base version changes, redetermine the conflict detection set and perform conflict detection.
[0047] In this embodiment, as Figure 3 As shown, Figure 3 The flowchart for the standardization and influence domain extraction of collaborative editing events illustrates the complete process from receiving real-time editing event streams from multiple collaborative editing endpoints, to standardizing and parsing the real-time editing events to generate collaborative editing event objects, and then extracting the geometric influence domain, attribute influence set, and operation dependencies based on the collaborative editing event objects, and outputting the standardized event objects and influence information.
[0048] Specifically, in step S1, receiving real-time editing events from multiple collaborative editing clients involves these clients performing operations such as adding, deleting, moving, splitting, merging, geometrically modifying, or modifying attributes on geographic features within the same collaborative session. The collaborative server receives these operations through a real-time communication mechanism, forming real-time editing events associated with session, user, time, and base version. The real-time communication mechanism can employ one or more combinations of WebSocket, long-connection push, message queue, or other real-time transmission methods, with WebSocket being the preferred implementation in this embodiment.
[0049] Furthermore, in a preferred embodiment, for the current edit event The system retrieves pending events with statuses of received, under detection, or pending confirmation from the same collaborative session, and retrieves events in... The events that have been committed since the base version. Each event records the base version set. Explicit Precedence Set Receive serial number from server If the event belong ,or The base version collection contains The processed version is then determined. Prior to Find the transitive closure of this relation to obtain the partial causal order of events.
[0050] For any event ,when and They belong to the same collaborative session, and both have the same element identifier, intersecting geometric influence domains, or involve at least one of the elements with dependency or control relationships. and In the aforementioned causal partial order, they are mutually unreachable, or exist Submitted after the base version but not accepted When included, Determined as The candidate conflict events are listed. Among them, the unreachable event belongs to the concurrent events, and the latter event belongs to the expired base version event. The client timestamp is only used to calculate the concurrency proximity; the order of events is based on the base version, the preceding dependencies, and the server receiving sequence.
[0051] In step S2, the original editing events in the real-time editing event stream are standardized and parsed to generate collaborative editing event objects. The system standardizes and parses the original editing events, extracting unique event identifiers, user identifiers, session identifiers, feature identifiers, feature types, operation types, timestamps, base versions, geometric change content, attribute change content, and prior dependency tags to generate a unified collaborative editing event object. This collaborative editing event object serves as a unified input for all subsequent processing steps, preventing workflow fragmentation caused by different representations used by different clients, different layers, or different operation types.
[0052] Based on a unified structure, collaborative editing event objects retain core change information in a differentiated manner for different editing operations. This includes: for operations such as geometric modification, moving, splitting, and merging, collaborative editing event objects retain geometric information or key geometric differences before and after the change; for attribute modification, collaborative editing event objects retain the modified fields and changes in field values; and for deletion operations, collaborative editing event objects retain the original geometry, attributes, and dependencies of the deleted features to facilitate subsequent determination of whether other features are affected.
[0053] Step S3 involves extracting the geometric influence domain, attribute influence set, and operation dependencies of the current editing event based on the collaborative editing event object. The system extracts the geometric influence domain according to the operation type and the content of the change. For adding or modifying a facet boundary, the added area, deleted area, boundary movement area, and their buffer zone can be used as the geometric influence domain; for moving points or lines, the positions before and after the movement and the movement path buffer zone can be used as the geometric influence domain; for splitting lines or split faces, the splitting line and the topological neighborhood of the split feature can be used as the geometric influence domain; for merging faces, all facet features involved in the merger and their outer boundary neighborhood can be used as the geometric influence domain. The system also extracts the attribute influence set and operation dependencies. The attribute influence set is used to determine field-level concurrent modifications, changes in business priority, or semantic rule hits; for editing events that only contain attribute changes and not geometric changes, the original geometric envelope of the edited feature and the range of associated features with dependency or control relationships with the edited feature are used as the retrieval scope of the editing event. Operational dependencies are used to determine whether the current event is based on an outdated version, depends on an unconfirmed preceding event, and whether subsequent resolution or rollback will affect the basis for the current event.
[0054] In this embodiment, as Figure 4 As shown, Figure 4 This is a flowchart illustrating the joint detection and classification process for direct and topological semantic indirect conflicts. It shows a joint detection model that takes collaborative editing event objects, related element sets, a topological rule base, and a semantic constraint base as input. Through topological judgment, semantic judgment, and joint conflict detection and classification, it outputs conflict records, conflict classification results, and recommended processing strategies. The supporting relationship between the spatial index and the rule base is also shown.
[0055] Specifically, in step S4, a conflict detection set is formed by combining the candidate editing events. Specifically, the system generates a spatial candidate set, a relational candidate set, and an event candidate set. The spatial candidate set is retrieved within the geometric influence domain using a spatial index; the relational candidate set is retrieved using a relation record table, which includes at least source element identifier, target element identifier, relation type, valid version, and rule identifier. Relationship types include dependency, control, or business association relationships; the event candidate set includes the aforementioned candidate conflict events. The system removes duplicates from the three candidate sets based on object identifiers and retains the source type and corresponding rule identifier for each candidate object, thus obtaining the conflict detection set.
[0056] In step S5, the system performs direct and indirect conflict detection on the conflict detection set. For direct conflict detection, the system obtains the basic state that the current edit event and the candidate edit events both depend on, and generates two candidate edited states respectively. For attribute changes, if the intersection of the modified fields is empty, or the candidate values of the same field are the same, the corresponding attribute operations can be merged; if the candidate values of the same field are different, a direct attribute conflict is generated. For geometric changes, the system first performs a quick filter by the intersection of geometric change regions; after the filter is successful, it proceeds according to... back and back When two operations are applied sequentially, and the two combined geometries are not equivalent under the rule tolerance, the generated geometries will directly conflict. Deletion and modification, splitting, or merging operations on the same basic element, or when the results of the two operations cannot be simultaneously true, will also result in a direct conflict in the generated operations.
[0057] Indirect conflict detection first calculates the topological predicate between the candidate edited state and related elements, and then queries semantic constraints based on the source element type, target element type, and business relationship. The topological predicate can be represented using a nine-intersection model matrix or corresponding intersection, containment, adjacency, traversal, and covering predicates. The topological predicate describes the objective spatial relationship, while the semantic constraints describe whether this spatial relationship is allowed in the corresponding business scenario. A mandatory constraint conflict is generated when a rule configured as a mandatory constraint is hit; a scoreable conflict is generated when a restrictive rule with tolerance or weight is hit.
[0058] In a preferred embodiment, for each hit topology rule Rules record topological predicates and allowable tolerances. Normalization scale Rule severity and mandatory constraint mark Calculate the amount of violation exceeding the allowable tolerance based on the rule type. The rules for surface overlap use the overlapping area exceeding the allowable value; for line or boundary offset rules, they use the distance or length exceeding the allowable value; for dependency rules, they use the excessive distance from the dependency point to the target line; and for closure or hanging rules, they use the abnormal number of occurrences. For rules that only determine whether a rule is true or false, the following will be applied: Set to 1. The single-rule topology severity is... The aggregation result of multiple topology rules is as follows: .
[0059] make A binary marker variable indicating whether a conflict-enforcing constraint is met; for a met semantic rule... Rule records soft rule weights and mandatory constraint mark If any or If it is 1, then ;otherwise The soft semantic weights are aggregated as follows: The above. and All located in .
[0060] Scope of influence Calculate according to the following formula:
[0061] in The number of affected elements, To standardize the calculation of the area, length, or buffer zone using spatial units according to the current business scenario, Number of layers affected , and To correspond to the reference scale, .
[0062] Concurrency proximity Calculate according to the following formula:
[0063] in The server receives the time difference between the two events. The path distance between two base versions in the version directed graph is calculated via their nearest common ancestor. and These are time and version decay scales, respectively. .
[0064] To demonstrate the joint enhancement and joint suppression of topological and semantic decision-making, the coupling quantity is calculated. The overall conflict score is calculated according to the following formula:
[0065] in, , , , , All are non-negative numbers, and .
[0066] Determine the lower limit of the direct conflict level based on the results of direct conflict detection. When no direct conflict is detected, =0; When a direct conflict of attributes with different candidate values in the same field is detected, or when a direct geometric conflict is detected where geometric operations do not satisfy the commutative law, =2; When a direct conflict is detected between deletion and modification, splitting, or merging operations that cannot be performed simultaneously, ... =3. When multiple direct conflicts are hit simultaneously, the maximum value among the lower limits of the corresponding direct conflict levels is taken as the threshold. .
[0067] when When this occurs, it indicates that the current conflict has matched a rule set as a mandatory constraint in the semantic constraints, and the final conflict level value will be adjusted. The value is determined to be 3; when When this occurs, it indicates that the current conflict has not met the aforementioned mandatory constraints, and the outcome is determined based on the overall conflict score. Determine the rating level :when hour, ;when hour, ;when hour, .according to Determine the final conflict level value. Among them, level values 1, 2 and 3 correspond to Level 1 conflict, Level 2 conflict and Level 3 conflict, respectively.
[0068] In a reproducible embodiment, , , , , , , The weights and thresholds mentioned are only implementation parameters used to illustrate the calculation path and can be configured based on historical conflict samples, business intervention costs, and replay results of processing effects.
[0069] Step S6 generates conflict records based on the results of direct and indirect conflict detection, and determines the conflict level and candidate handling strategies. When a conflict is detected, the system determines the lower limit of the direct conflict level based on the direct conflict type. And based on topology severity Semantic weight Scope of impact Concurrency proximity and topological semantic coupling quantity Calculate rating levels When a mandatory constraint is not met, proceed according to... Determine the final conflict level; if a mandatory constraint is hit, it is directly determined as a Level 3 conflict.
[0070] Topology severity reflects the degree of geometric deviation or disruption of topological relationships; semantic weight reflects the business priority or restriction strength of the hit rule; impact range reflects the number of affected elements, the area of the geometric impact domain, or the number of affected layers; concurrency proximity reflects the temporal proximity and version difference between multiple editing events. The system can normalize these four factors to the same dimension to form a comprehensive conflict score, and then classify them into Level 1, Level 2, and Level 3 conflicts based on low and high thresholds. Low and high thresholds can be determined through historical conflict sample statistics, business intervention cost analysis, and playback of graded processing effects, and can be configured according to business scenarios. Specific conflict registration, judgment meanings, and corresponding recommended processing strategies are shown in Table 1 below.
[0071] Table 1. Correspondence between conflict levels, judgment meanings, and recommended handling strategies.
[0072]
[0073] In this embodiment, the first threshold Configured to 0.35, second threshold. The value is set to 0.70. The above threshold is only an implementation parameter to illustrate the calculation path and can be configured based on historical samples, business intervention costs, and the results of processing effect playback.
[0074] In this embodiment, as Figure 5 As shown, Figure 5 This document presents a flowchart for conflict resolution version submission and compensation rollback / replay. It illustrates the system's progression from a pending detection state to a conflict-free state, a level 1 conflict state, a level 2 conflict state, or a level 3 conflict state, based on the joint conflict detection results. Correspondingly, it performs automatic resolution, rule recommendation, or manual confirmation, ultimately writing the candidate processing results to the version repository or business repository, generating a conflict processing result event, and broadcasting it to relevant collaborative editing endpoints. Specifically, according to the conflict's classification, it performs automatic resolution, rule recommendation, or manual confirmation conflict handling operations, generating a conflict processing result event containing full resolution information, including: For Level 1 conflicts, the system performs processing according to automatic resolution rules. For example, it performs field-level merging for concurrent modifications to non-critical fields, snaps to the nearest valid boundary for minor boundary overlaps, performs linked updates for cases where the attachment point moves with the control line, or automatically merges low-risk duplicate commits. After automatic resolution, the system generates a conflict resolution result event that includes the resolution method, the version before processing, the version after processing, the responsible user, the processing status, a timestamp, and a rollback flag.
[0075] For level-two conflicts, the system combines the topology rule base and semantic constraint base to retrieve recommended processing strategies and generate rule recommendation results. The recommendation results include the name of the recommended processing strategy, a description of the matched rule, the expected scope of modification, a rollback flag, and alternative recommended processing strategies. After the user confirms the recommended processing strategy, the system executes the corresponding resolution action; if the user rejects the recommended processing strategy, the system can either keep the current event pending or escalate the conflict to manual confirmation.
[0076] For Level 3 conflicts, the system generates a manual confirmation task. This task must include at least the conflict space extent, affected elements, hit topological rules, hit semantic constraints, candidate recommendation processing strategy, responsible user, and base version information. After manual confirmation, the system performs operations such as retention, rollback, partial correction, splitting, or re-editing based on the confirmation results.
[0077] In step S8, if the re-detection passes and the base version remains unchanged, the candidate processing result is written to the version library or business library, the event dependency is updated, a processing result event with the processed version and processing status is generated, and the processing result event is broadcast to the relevant collaborative editing end; if the re-detection fails or the base version changes, the conflict detection set is re-determined and conflict detection is performed.
[0078] Furthermore, the update event dependencies specifically include: The event dependencies form a directed acyclic graph connected in the direction of increasing submission sequence number; When a committed event is rolled back, the successor event closure of the event is determined from the directed acyclic graph. The state is restored from the version before the rolled-back event in the isolation repair branch, the rolled-back event is excluded, and the impact information determination, conflict detection, classification and processing are re-executed for the successor events in topological order. After the repair branch passes the re-inspection, it is atomically released as the new current version, retaining the original event logs and generating processing result events to identify compensation, replacement relationships, and new commit sequence numbers.
[0079] Specifically, the system does not directly write candidate processing results into the official version. Instead, it applies the corresponding processing strategy in the isolated candidate state, regenerates the impact information, calls geometric validity checks and topological predicate calculations, and performs direct and indirect conflict detection again. If a candidate result generates new mandatory constraint conflicts, or if the conflict level is higher than the level allowed for automatic submission, the candidate result is withdrawn and another candidate strategy is selected, or the process is transferred to manual confirmation.
[0080] After the re-detection passes, the system initiates a short transaction at the serializable isolation level. Row-level write locks are executed on all features to be written in ascending order of feature identifiers. The feature version number and rule version number are reread and compared with the base version set in the collaborative editing event object and the rule version recorded during conflict detection. If all versions are consistent, geometry and attribute results, incremented feature version numbers, event records, dependency edges, conflict resolution results, and records of results to be broadcast are written within the same transaction. If any version is inconsistent or serialization fails, the entire transaction is rolled back, locks are released, and the candidate set and conflict results are regenerated with the latest version.
[0081] The record to be broadcast has a unique result identifier and a monotonically increasing commit sequence number. After the transaction is committed, the broadcast process reads the committed but not yet broadcast result records and sends them to the collaborative editing end; the collaborative editing end removes duplicates using the unique result identifier and only accepts results with a commit sequence number greater than the locally applied sequence number.
[0082] The system saves event records as immutable records and records the preceding event identifier, succeeding event identifier, and dependency type using dependency edges. A dependency edge is established when the base version set of a succeeding event contains the processed version of the preceding event, the succeeding event reads or modifies an element modified by the preceding event, or the conflict detection set of the succeeding event contains relevant elements changed by the preceding event. Only points from a smaller commit sequence number to a larger commit sequence number are allowed, thus forming a directed acyclic graph of event dependencies.
[0083] When a rollback event has not yet been committed, the system cancels the event and reprocesses pending events that directly depend on it. When a rollback event has already been committed, the system does not delete or overwrite the original event, but instead creates a compensation processing task and obtains all direct and indirect successor events of the event from the dependent directed acyclic graph, forming a successor event closure.
[0084] The system loads the latest version snapshot before the commit of the event to be rolled back in the isolated repair branch; for subsequent events that do not belong to the subsequent event closure, their unaffected data results are inherited; for events that belong to the subsequent event closure, after excluding the events to be rolled back, the candidate edited states are reconstructed one by one according to the topological order of the dependency graph, and the impact domain determination, direct conflict detection, indirect conflict detection, classification, candidate resolution, and re-examination are re-executed. The reprocessed events can enter the approved, pending confirmation, or rejected states respectively.
[0085] After the entire repair branch passes topological semantic review and version verification, the current version pointer is switched to the repair branch within a short transaction. The original events are marked as compensated, and the subsequent events to be replaced are marked as superseded. The substitution relationship between the old and new event identifiers is written. The system assigns new commit sequence numbers to compensated and reprocessed events and generates records of results to be broadcast. Each collaborative editing client completes idempotent updates based on the unique result identifier, substitution relationship, and commit sequence number.
[0086] In one embodiment, this embodiment proposes an electronic device including a processor and a memory. The memory stores a computer program, which, when executed by the processor, causes the electronic device to perform all steps of a GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features, as proposed in this invention.
[0087] In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, which, when executed by a processor, implements all steps of the GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features proposed in this invention.
[0088] In one embodiment, a computer program product is proposed, comprising a computer program that, when executed by a processor, implements all steps of the proposed GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features.
[0089] In one embodiment, taking a collaborative land surveying scenario of an urban renewal project in a core urban area as an example, in the urban renewal process, user A is adjusting the boundary of a control plot, while user B is simultaneously modifying the boundary of an adjacent ordinary plot. After the two operations enter the system as real-time editing events, the system first generates collaborative editing event objects and then generates a geometric influence domain based on the boundary movement range. Spatial index retrieval results show that the two plots belong to a set of related elements and have an adjacent closed relationship. The system, combining the topology rule base, identifies that if both modifications are accepted simultaneously, boundary overlap and closure relationship disruption will occur; combining the semantic constraint base, it identifies that the business priority of the control plot is higher than that of the ordinary plot. Since this conflict simultaneously hits both a severe topology conflict and a high-priority semantic constraint, the system classifies it as a level three conflict, generates a manual confirmation task, and recommends retaining the control plot boundary modification and reverting the local boundary change of the ordinary plot. After manual confirmation, the processing result is broadcast to the collaborative editing ends of users A and B and simultaneously written back to the server-side version repository.
[0090] In one embodiment, taking a road and building collaborative editing scenario as an example, in a road facility maintenance scenario, user C adds a road centerline, and user D simultaneously updates the outline of nearby buildings. After receiving the road addition event, the system forms a geometric influence domain based on the road centerline and its buffer zone, and retrieves nearby building elements through spatial indexing. The topology rule base identifies a crossing relationship between the road centerline and the building outline, and the semantic constraint base further matches the prohibition rule that the road centerline must not cross a building. If the influence range is limited and can be corrected by offsetting or snapping, the system classifies the conflict as a secondary conflict and recommends that the user adjust the road centerline to a preset distance outside the building boundary, or revert the current road addition operation. After the user confirms the recommended processing strategy, the system performs semi-automatic correction, generates a conflict processing result event, and broadcasts it to the relevant collaborative editing terminals.
[0091] Specifically, let's consider road events. With architectural events They belong to the same session, are mutually unreachable in the event dependency graph, and the road influence domain intersects with the building candidate outline. Therefore... Joined The system calculates the topological relationship between the road centerline and the building surface, obtaining a crossing length of 3 meters. The corresponding rule has an allowable tolerance of 0 meters and a normalized scale. 5 meters, severity of rules The severity of a single rule topology is 1. In this business scenario, the rule "road centerline must not cross buildings" is configured as a non-mandatory but high-weight soft rule. Since it only affects one building element and one layer, ; calculated based on server time difference and version distance .Depend on ,use , , , , ,get: .
[0092] exist , In this case, the conflict is a secondary conflict, corresponding to the processing path for generating offset or rollback recommendation strategies.
[0093] In the isolated candidate state, the system offsets the road centerline to the outside of the building boundary and recalculates geometric validity, crossing predicates, and other relevant feature rules. After a recheck confirms no mandatory constraint conflicts, a short transaction is initiated, locking the road and building feature records; if their current versions are still equal to... and If the base version of the record and the rule version have not changed, then write the processing result, increment the version number, and generate a record to be broadcast; otherwise, roll back the transaction and recalculate based on the latest version.
[0094] The above values are reproducible real-world examples used to publicize the algorithm's computational path and do not represent actual test results for a specific project. For land parcel control boundary scenarios, the mandatory constraint flag of the control boundary rule can be configured to 1, thus directly determining it as a level 3 conflict without soft scoring; for scenarios where valves move within a small range along pipelines, in cases where mandatory constraints are not hit and... Less than If the candidate adsorption results pass the re-examination, it is determined to be a first-level conflict.
[0095] In one embodiment, taking a point-line dependency relationship collaborative editing scenario as an example, in an underground pipeline maintenance scenario, user E moves a pipeline, and user F simultaneously edits the valve point attached to that pipeline. The system extracts the position and path buffer before and after the pipeline movement event, and retrieves the point facilities attached to the pipeline. The topology rule base identifies that the valve point should maintain its dependency relationship with the pipeline, and the semantic constraint base identifies that the valve point belongs to ancillary facilities that can be updated in conjunction with the pipeline. If the movement distance is small and will not affect other high-priority elements, the system can determine the conflict as a level one conflict, automatically synchronize the valve point to the moved pipeline, and record a rollback mark. This processing result is written to the version control library and broadcast to user E and user F to keep both clients in a consistent state.
[0096] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A GIS collaborative editing conflict detection and resolution method that takes into account topological semantic features, characterized in that, include: Receive real-time editing events generated by multiple collaborative editing terminals, and determine the current editing event and its related candidate editing events from the real-time editing events based on the session identifier, base version, and event status; The current editing event and candidate editing events are standardized and parsed to generate collaborative editing event objects. The collaborative editing event objects include at least the event identifier, user identifier, feature identifier, operation type, timestamp, base version, geometric change content, attribute change content, and dependency identifier. Construct corresponding candidate post-edit states based on the collaborative editing event object, and determine the geometric influence domain, attribute influence set, and operation dependency set; Based on the geometric influence domain, spatially related elements are retrieved; based on the element association relationship, related elements with dependency or control relationships are retrieved; and combined with the candidate editing events, a conflict detection set is formed. Based on feature identifiers, base versions, attribute influence sets, and geometric change content, direct conflict detection is performed on the current edit event and candidate edit events; the topological relationship between the candidate edited state and the spatially related or associated features is calculated, and the topological relationship is matched with semantic constraints to perform indirect conflict detection; Conflict records are generated based on the results of direct and indirect conflict detection, and conflict levels and candidate processing strategies are determined based on the hit mandatory constraints or conflict evaluation parameters. Candidate processing results are generated according to the candidate processing strategy. The direct conflict detection and indirect conflict detection are re-executed on the candidate processing results in the isolated candidate state, and the base version is verified. If the re-detection passes and the base version remains unchanged, the candidate processing result is written to the version library or business library, the event dependency is updated, a processing result event with the processed version and processing status is generated, and the processing result event is broadcast to the relevant collaborative editing end. If the re-detection fails or the base version changes, the conflict detection set is redefined and conflict detection is performed.
2. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 1, characterized in that: The real-time editing events are transmitted through at least one or more real-time communication mechanisms, such as WebSocket, long-connection push, and message queue.
3. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 1, characterized in that, The standardized parsing process is as follows: Extract the event unique identifier, user identifier, session identifier, feature identifier, feature type, operation type, timestamp, base version, geometric change content, attribute change content, and predecessor dependency tag from the edit event to generate a collaborative editing event object with a unified structure; Based on a unified structure, collaborative editing event objects retain core change information in a differentiated manner according to the characteristics of different editing operations, including: Operations involving geometric modification, movement, splitting, and merging preserve geometric information or key geometric differences before and after the changes; Attribute modification operations retain the modified field and the changes to the field value. Deletion operations preserve the original geometry, attributes, and dependencies of the deleted features.
4. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 1, characterized in that: The geometric influence domain is matched and generated according to different operation types: for operations of adding or modifying face boundaries, the added area, deleted area, boundary movement area and its buffer are used as the geometric influence domain. For point or line movement operations, the position before and after movement and the buffer of the movement path are used as the geometric influence domain; for line or surface splitting operations, the splitting line and the topological neighborhood of the split feature are used as the geometric influence domain; for surface merging operations, all surface features involved in the merging and their outer boundary neighborhood are used as the geometric influence domain. For edit events that only involve attribute changes and not geometric changes, the original geometric envelope of the edited element and the range of associated elements that have a dependency or control relationship with the edited element are used as the retrieval scope of the edit event.
5. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 1, characterized in that: The conflict detection set includes spatial candidate elements, relation candidate elements, and event candidate objects; The spatial candidate elements are retrieved within the geometric influence domain through spatial indexing, the relational candidate elements are retrieved through dependency, control or business association relationships, and the event candidate objects are unresolved editing events that have the same session identifier as the current editing event and meet preset version relationship or event status conditions.
6. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 1, characterized in that, The direct collision detection includes: When the current edit event and the candidate edit event have the same element identifier or act on the same basic element, the common basic state of the two is obtained, and the first candidate edited state and the second candidate edited state are generated respectively. For attribute changes, if the attribute impact sets of two entities have the same field and the corresponding candidate field values are different, the attributes are determined to be in direct conflict. For geometric changes, first determine whether the geometric change regions of the two events intersect; if they intersect, generate two combined states according to the order of executing the current editing event first and then the candidate editing event, and the order of executing the candidate editing event first and then the current editing event, respectively. When the two combined states are not equivalent under the preset geometric tolerance, a direct geometric conflict is determined. When one event is a deletion operation and another event is a modification, splitting, or merging operation, or when both events act on the same basic element but the results cannot be simultaneously achieved, it is determined that the operations are in direct conflict.
7. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 1, characterized in that: The indirect conflict detection is performed based on topological rules and semantic constraints. The topological rules include at least source feature type, target feature type, topological predicate, allowable tolerance, rule severity, mandatory constraint marker, and candidate processing strategy. The semantic constraints include at least source feature type, target feature type, business relationship, business priority, prohibited or restricted attributes, semantic weight, and mandatory constraint marker.
8. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 7, characterized in that, The indirect conflict detection includes: Calculate at least one topological predicate among intersection, containment, adjacency, distance, closure, dangling, or attachment between the candidate edited state and related features; Query the corresponding semantic constraints based on the source feature type and the target feature type; An indirect conflict record is generated when the topological predicate satisfies the prohibition conditions specified by the semantic constraints or exceeds the tolerance specified by the semantic constraints.
9. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 8, characterized in that: In the indirect conflict detection step, at least one of the following semantic constraints is set as a mandatory constraint: prohibition of crossing, control boundary must not be destroyed, or specified dependency relationship must not be broken. When the mandatory constraint is hit, the corresponding conflict is identified as a preset high-level conflict, and the conflict level is not reduced by other low-weight evaluation parameters; Conflicts that do not meet mandatory constraints are classified into conflict levels according to conflict evaluation parameters.
10. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 9, characterized in that: The conflict evaluation parameters include topology severity. Semantic weight Scope of impact and concurrency proximity , , , and The range of values is all ; according to and Calculate topological semantic coupling According to the calculation formula Calculate the overall conflict score Among them, each weight , , , , All are non-negative numbers and the sum of their weights is 1; The lower limit of the direct conflict level is determined based on the results of the direct conflict detection. When no direct conflict is detected, When a direct attribute conflict or a direct geometric conflict is detected, When a direct conflict in operations is detected, The scoring level is determined based on the comprehensive conflict score S. When S is less than the first threshold, When S is greater than or equal to the first threshold and less than the second threshold, When S is greater than or equal to the second threshold, When a mandatory constraint is hit, the final conflict level will be adjusted. It has been determined to be a Level 3 conflict; When a mandatory constraint is not met, according to Determine the final conflict level L, where level values 1, 2, and 3 correspond to Level 1, Level 2, and Level 3 conflict, respectively.
11. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 1, characterized in that, When a re-detection fails or the base version changes, the conflict detection set is re-determined and conflict detection is performed, including: In isolated candidate states, a candidate processing strategy is applied to regenerate the geometric influence domain, attribute influence set, and operation dependency set, and to perform direct conflict detection and indirect conflict detection. After the re-detection passes, the database transaction is started. The elements to be written are locked in the order of the element identifiers. The current version number of each element to be written is compared with the base version number in the collaborative editing event object. The current rule version is also compared with the rule version used during conflict detection. When all versions are consistent, write the element results, increment the version number, write the event dependencies and processing result events in the same transaction; when any version is inconsistent or the transaction serialization fails, roll back the transaction and re-execute the conflict detection based on the latest version.
12. The GIS collaborative editing conflict detection and resolution method considering topological semantic features according to claim 1, characterized in that, The update event dependencies specifically include: The event dependencies form a directed acyclic graph connected in the direction of increasing submission sequence number; When a committed event is rolled back, the successor event closure of the event is determined from the directed acyclic graph, the state is restored from the version before the event in the isolation repair branch, the event is excluded, and the impact information determination, conflict detection, classification and processing are re-executed for the successor events in topological order. After the repair branch passes the re-inspection, it is atomically released as the new current version, retaining the original event logs and generating processing result events to identify compensation, replacement relationships, and new commit sequence numbers.
13. A GIS collaborative editing conflict detection and resolution system that takes into account topological semantic features, used to execute the method as described in any one of claims 1-12, characterized in that, It includes an event access module, an impact information determination module, a candidate object retrieval module, a conflict detection module, a conflict handling module, and a result submission module, among which: The event access module is used to receive real-time editing events generated by multiple collaborative editing terminals, determine the current editing event and related candidate editing events from the real-time editing events according to the session identifier, base version and event status, perform standardized parsing on the current editing event and candidate editing events, and generate a collaborative editing event object. The collaborative editing event object includes at least the event identifier, user identifier, feature identifier, operation type, timestamp, base version, geometric change content, attribute change content and dependency identifier. The impact information determination module is used to construct a corresponding candidate post-edited state based on the collaborative editing event object, and to determine the geometric impact domain, attribute impact set, and operation dependency set. The candidate object retrieval module is used to retrieve spatially related elements based on the geometric influence domain, retrieve related elements with dependency or control relationships based on element association relationships, and form a conflict detection set by combining the candidate editing events. The conflict detection module is used to perform direct conflict detection on the current editing event and the candidate editing event based on feature identifier, base version, attribute influence set and geometric change content, calculate the topological relationship between the candidate edited state and the spatially related or associated features, match the topological relationship with semantic constraints to perform indirect conflict detection, generate conflict records based on the results of the direct and indirect conflict detection, and determine the conflict level and candidate processing strategy based on the hit mandatory constraints or conflict evaluation parameters. The conflict handling module is used to generate candidate processing results according to the candidate processing strategy, and to re-execute the direct conflict detection and indirect conflict detection on the candidate processing results in an isolated candidate state; The result submission module is used to verify the base version. When the re-detection passes and the base version has not changed, the candidate processing result is written to the version library or business library, the event dependency is updated, a processing result event with the processed version and processing status is generated and broadcast to the relevant collaborative editing end. When the re-detection fails or the base version changes, the process of re-determining the conflict detection set and executing conflict detection is triggered.
14. An electronic device comprising a processor and a memory, characterized in that, The memory stores a computer program, which, when executed by the processor, causes the electronic device to perform the method according to any one of claims 1-12.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-12.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-12.
