A method, device and medium for supporting online real-time editing of million-level vector data
By employing a density-adaptive streaming processing method and a closed-loop self-maintaining engine, the problems of architecture collapse in real-time processing of millions of vector data and inaccurate multi-user collaborative control were solved, enabling efficient real-time editing and collaborative editing.
Patent Information
- Application Number
- CN202511340233.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-09-19
AI Technical Summary
Existing vector data editing solutions cannot support real-time operations on millions of features, leading to data processing architecture collapse and inaccurate multi-user collaborative control, thus failing to achieve efficient real-time and collaborative editing.
By dividing high- and low-density regions using a density-adaptive streaming processing method, generating standardized feature sequences, performing topology repair and index optimization, and combining real-time status synchronization and dynamic rendering, topology breakpoints are identified and processed to achieve efficient multi-user collaborative editing.
It achieves stability in real-time processing architecture for millions of vector data points and accuracy in multi-user collaborative control, optimizes memory usage and rendering speed, breaks through the memory bottleneck of traditional full-load mode, and realizes sub-unit precision topology self-healing.
Smart Images

Figure CN120832135B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of spatial data collaborative processing, and in particular to a method, device and medium for supporting online real-time editing of million-level vector data. BACKGROUND
[0002] Vector data editing technology has experienced paradigm shift from desktop single machine operation to Web collaborative processing. The early technical system highly depends on the desktop platform of ArcGIS and SuperMap, and realizes the creation, topological maintenance and analysis functions of complex spatial data through localized computing, but is difficult to support multi-user real-time collaboration due to the limitations of closed architecture and single machine resources. With the development of WebGL graphics rendering, spatial database and distributed computing technology, the Web-based solution based on open source technology has gradually matured, realizing online visualization and basic editing capabilities of vector data. Key technology breakthroughs include spatial index optimization, streaming data transmission and front-end virtualization rendering. In recent years, the operation conversion conflict resolution method and real-time state synchronization engine are introduced into the field of collaborative editing, providing a technical framework for multi-user concurrent operation.
[0003] The existing vector data editing scheme has two core defects: on the one hand, the data processing architecture cannot support real-time operation of million-level features, and the full memory loading mode leads to the risk of file parsing crash, and the redundancy of feature storage structure leads to the decay of database efficiency, and the directory tree and other auxiliary components have interactive lag when the data volume is 100,000; on the other hand, the collaborative editing mechanism has a fundamental defect, and the multi-user display and hidden control depends on dynamic field maintenance, which causes database lock contention and performance degradation, and the conflict arbitration adopts a static priority strategy, which leads to inaccurate business logic. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a method for supporting online real-time editing of million-level vector data to solve the problems of real-time processing architecture collapse of million-level vector data and inaccurate multi-user collaborative control.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In a first aspect, the present application provides a method for supporting online real-time editing of million-level vector data, which comprises the following steps: receiving user-uploaded million-level vector data, counting the distribution density of elements in a spatial grid to divide high-density and low-density areas, and generating a standardized element sequence through real-time coordinate conversion; connecting hanging points and segmenting face-shaped overlapping areas according to the spatial proximity relationship of the standardized element sequence, and performing topological repair on the standardized element sequence; writing the generated topological snapshot index into a spatial database, generating a database state report; verifying the spatial relationship of elements in the spatial database according to the topological snapshot index to generate a database operation instruction, and obtaining a real-time state notification of the database operation instruction according to the database state report; dynamically rendering the standardized element sequence based on the real-time state notification, rendering the operable standardized element as green, rendering the standardized element operated by multiple users as yellow, and rendering the non-operable standardized element as red; when the standardized element operated by the user is yellow or red, performing real-time interception and pushing a prompt, and generating a structured operation log; verifying the adjacency, connectivity and conflict-free inclusion relationship between the element change coordinates in the structured operation log and the topological snapshot index, generating a processing patch by identifying topological break points and performing spatial interpolation connection, marking the element coordinate set that needs to be processed at the same time, and outputting the reprocessing area coordinates by calculating the minimum bounding rectangle.
[0008] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, the method comprises the following steps:
[0009] According to the user-uploaded million-level vector data, the spatial grid is divided, and the number of point, line and face elements in each spatial grid is counted to generate a density distribution matrix.
[0010] The high-density and low-density areas of the density distribution matrix are identified, the high-density areas are divided into fine-grained blocks, the low-density areas are divided into coarse-grained blocks, and a block data grid set is obtained.
[0011] The original coordinates in the block data grid set are extracted, and a standardized sequence is generated in real time through a streaming analysis method.
[0012] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, the method comprises the following steps:
[0013] The isolated end points of line elements in the standardized element sequence are extracted, and the near-neighbor elements are connected through a vortex adsorption method to generate a repaired element set.
[0014] Based on the triangulation algorithm, the overlapping surface area in the repair feature set is divided into triangular mesh, and the central axis of the triangular mesh is extracted as the segmentation boundary, the overlapping surface area is reorganized, and the segmentation feature set is generated.
[0015] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, the generated topology snapshot index is written into the spatial database, and a database state report is generated, and the specific steps are as follows,
[0016] The spatial relationship of the segmentation feature set is extracted, a binary topology graph is generated, and a topology snapshot index is obtained through a bitmap storage structure compression method;
[0017] The generated topology snapshot index is written into the spatial database through a sharding transaction method, and a database state report is generated by calculating a real-time topology fingerprint.
[0018] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, the generated topology snapshot index is written into the spatial database, and a database state report is generated, and the specific steps are as follows,
[0019] According to the topology snapshot index, the built-in function of the spatial database is called to verify the spatial relationship of the elements, and the tolerance accuracy is dynamically adjusted according to the element distribution density, and a verification report is generated by identifying the conflict elements;
[0020] The spatial relationship verification report and the database state report are combined to generate a database operation instruction through calculation of a dynamic priority;
[0021] The database operation instruction is differentially encoded and compressed, and is packaged into a real-time state notification in binary protocol format.
[0022] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, based on the real-time state notification, the standardized feature sequence is dynamically rendered, the operable standardized feature is rendered as green, the multi-user operated standardized feature is rendered as yellow, and the non-operable standardized feature is rendered as red; when the user operated standardized feature is yellow or red, real-time interception is performed and a prompt is pushed, a structured operation log is generated, and the specific steps are as follows,
[0023] The state mark in the real-time state notification is parsed, and the standardized feature sequence is dynamically rendered, the operable standardized feature is rendered as green, the multi-user operated standardized feature is rendered as yellow, and the non-operable standardized feature is rendered as red, and a rendering state change record is obtained;
[0024] When the user operation target element is yellow or red, the operation request is intercepted in real time and prompt information is pushed, and operation interception records are generated synchronously;
[0025] The operation interception records and the rendering state change records are aggregated, and a structured operation log is generated by using a columnar storage compression method.
[0026] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, the method comprises the following steps:
[0027] The adjacency, connectivity and conflict-free inclusion relationship between the element change coordinates in the operation log and the topological snapshot index are compared to obtain a list of topological break points by locating the break points.
[0028] According to the type of the break points in the list of topological break points, geometric repair patches are generated by using an interpolation algorithm.
[0029] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, the method comprises the following steps:
[0030] In a second aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program is executed by the processor to implement any step of the method for supporting online real-time editing of million-level vector data according to the first aspect of the present application.
[0031] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program, and wherein the computer program is executed by a processor to implement any step of the method for supporting online real-time editing of million-level vector data according to the first aspect of the present application.
[0032] The present application has the following advantages: by using the density adaptive streaming processing method, the processing granularity is dynamically divided according to the spatial element distribution characteristics, the memory occupation is essentially optimized while the geometric accuracy in high-density areas is ensured, and the memory bottleneck of the traditional full-load mode is broken; combined with the closed-loop self-maintenance engine, the intelligent repair algorithm based on the matching of break point types is used to realize the sub-unit accuracy topological self-healing, and the tolerance-driven minimum bounding rectangle dynamic expansion technology is used to accurately locate the reprocessing area. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0034] Fig. 1 A flow chart for supporting the online real-time editing method of the million-level vector data;
[0035] Fig. 2 A flow chart for generating a status report;
[0036] Fig. 3 A flow chart for generating an operation log;
[0037] Fig. 4 A flow chart for outputting in the processing area coordinates. DETAILED DESCRIPTION
[0038] In order to make the above objectives, features and advantages of the present application more apparent and comprehensible, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0039] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application, so the present application is not limited to the specific embodiments disclosed below.
[0040] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0041] Reference Figs. 1-4 For one embodiment of the present application, the embodiment provides a method for supporting online real-time editing of million-level vector data, comprising the following steps:
[0042] S1, receiving the user uploaded million-level vector data, counting the element distribution density in the spatial grid to divide high and low density areas, and generating a standardized element sequence through real-time coordinate conversion;
[0043] S1.1, dividing the spatial grid according to the user uploaded million-level vector data, and generating a density distribution matrix by counting the number of point, line and surface elements in each spatial grid;
[0044] It should be noted that the user uploaded million-level vector data is divided into a square spatial grid structure. The spatial grid coverage is uniformly arranged in the longitude increasing direction and the latitude increasing direction, and each spatial grid has independent geographical boundary coordinates. The geographical boundary coordinates include four parameters: minimum longitude value, minimum latitude value, maximum longitude value and maximum latitude value, which are used to define the spatial range of the spatial grid.
[0045] The spatial relationship of the elements (point elements, line elements and surface elements) in each spatial grid is determined, and when the minimum longitude value ≦ the coordinate value of the point element ≦ the maximum longitude value and the minimum latitude value ≦ the coordinate value of the point element ≦ the maximum latitude value are satisfied, the point element is counted into the spatial grid; when the geometric line segment of the line element intersects with the geographical boundary of the spatial grid or the line segment is completely located within the boundary range of the spatial grid, the line element is counted into the spatial grid; when the polygon area of the surface element overlaps with the geographical boundary of the spatial grid, the surface element is counted into the spatial grid. After completing the spatial relationship determination, the number of point elements, the number of line elements and the number of surface elements in the spatial grid are respectively accumulated, and the total number of elements in the spatial grid is obtained by adding the number of the three types of elements.
[0046] A two-dimensional matrix data structure is created, the matrix row number corresponds to the spatial grid arrangement number in the latitude increasing direction, and the matrix column number corresponds to the spatial grid arrangement number in the longitude increasing direction. The matrix element value stores the total number of elements in the corresponding spatial grid, and finally generates the density distribution matrix.
[0047] S1.2, identify the high and low density areas of the density distribution matrix, use fine-grained partitioning for high-density areas and coarse-grained partitioning for low-density areas to obtain a set of partitioned data grids;
[0048] It should be noted that first, all element values of the density distribution matrix are traversed, and the total sum of non-zero element values is accumulated, the number of non-zero elements is counted, and the ratio of the total sum of non-zero element values to the number of non-zero elements is taken as the distribution mean. The area where the matrix element value is higher than the distribution mean is marked as a high-density area, and the area where the matrix element value is lower than the distribution mean is marked as a low-density area.
[0049] Subsequently, fine-grained partitioning strategy is used to perform data cutting for high-density areas to obtain partitioned data grids, and the size of each partitioned data grid is controlled to be the minimum; coarse-grained partitioning strategy is used to perform data cutting for low-density areas, and the size of each partitioned data grid is controlled to be the maximum.
[0050] The spatial continuity principle requires that the execution of the block decision must avoid the core area of the element space aggregation, the shortest spatial distance between any two elements in the same block does not exceed the average element spacing of the density area, the line / surface element is not divided by the block decision, and the elements with topological association (such as adjacent plots) must belong to the same block. By executing the spatial continuity principle, the final block data grid set is generated.
[0051] S1.3, extract the original coordinates in the block data grid set, and convert the standard sequence in real time by the streaming analysis method.
[0052] It should be noted that each block data grid in the block data grid set is traversed, the original data block binary content of the block data grid is read, the original coordinate system coordinate value of the vector element is obtained by analyzing the original data block binary content, the single point coordinate value of the point element is extracted, the node coordinate sequence of the line element is extracted, and the boundary ring coordinate sequence of the surface element is extracted. The original coordinates are reserved in precision and format.
[0053] The streaming processing interface of the spatial data analysis library is called to establish the analysis pipeline, the extracted original coordinates are input into the pipeline, the pipeline performs real-time coordinate system conversion, the coordinate system conversion process is independently performed on each coordinate point in real time, the memory is immediately released after processing, and the complete data set is not accumulated and stored. After completion, the converted element geometry is encapsulated according to the element type, the point element is encapsulated as a POINT structure, the line element is encapsulated as a LINESTRING structure, and the surface element is encapsulated as a POLYGON structure. Each element is independently output to keep the structure separate.
[0054] The converted element geometry is encoded in the OGC or WKT standard text format: the point element generates a "POINT (example, longitude value latitude value)" format text; the line element generates a "LINESTRING (example, longitude value 1 latitude value 1, longitude value 2 latitude value 2,...)" format text; the surface element generates a "POLYGON (example, longitude value 1 latitude value 1, longitude value 2 latitude value 2,...)" format text; the WKT data of the elements in the same block data grid is stored in a list structure in the analysis order; and finally, the standardized sequence is formed.
[0055] Further, the spatial data analysis library is a function encapsulation library integrating open source geographic spatial data processing, which realizes the vector data format analysis and coordinate system conversion function by calling a standard application program interface. The spatial data analysis library supports analyzing the binary file structure of the mainstream vector formats of SHP, KML and DXF, and the specific process is as follows: loading the GDAL data driver during initialization; binding the input data stream to create a data source object; traversing the layer definition in the data source; extracting the geometry coordinates and attribute fields of each element; calling the PROJ library to perform real-time coordinate system conversion; and finally outputting the standardized WKT format geometry text.
[0056] S2, connecting the hanging points according to the spatial proximity relationship of the standardized element sequence, and dividing the overlapped area, performing topological repair on the standardized element sequence, writing the generated topological snapshot index into the spatial database, and generating a database state report;
[0057] S2.1, extracting isolated endpoints of line elements in the standardized element sequence, connecting the nearest elements by vortex adsorption method to generate a repaired element set;
[0058] It should be noted that the geometry of the line element in the scanned standardized element sequence is extracted; the endpoint coordinates of the line element are extracted; a fixed radius circular search area is established with the endpoint coordinates as the center; it is detected whether there are other line element endpoints or nodes in the search area; if there are no other element geometric points in the search area, the current endpoint is marked as an isolated endpoint;
[0059] A fixed radius circular adsorption buffer is established with the coordinates of the isolated endpoint as the center; the nearest neighbor element node coordinates are searched within the adsorption buffer; when there are other element geometric points in the search area, the element geometric point is projected onto the spatial rectangular coordinate system to obtain the straight line distance between the isolated endpoint coordinates and the nearest neighbor element node coordinates; a linear interpolation point sequence is generated between the isolated endpoint coordinates and the nearest neighbor node element coordinates at equal intervals; the linear interpolation point sequence is inserted into the node sequence of the line element to reconstruct the line element geometry to form a continuous element.
[0060] The connected line element updates the element WKT data, and the point element and the surface element remain unchanged in WKT description; all elements are re-integrated to generate a repaired element set containing all elements.
[0061] S2.2, based on the triangulation algorithm, the overlapped surface domain in the repaired element set is decomposed into a triangular mesh, and the central axis of the triangular mesh is extracted as a partition boundary, the overlapped surface domain is reorganized, and a partition element set is generated;
[0062] It should be noted that the polygon intersection area between the face elements in the repaired element set is traversed to obtain the intersection area between the two polygons; the intersection point coordinates of all edges of the two polygons are obtained; the intersection points and the vertices of the two polygons are collected to generate an intersection polygon vertex sequence. The intersection points and the vertices of the two polygons are sorted clockwise; the ordered points are connected to form a closed polygon; the closed polygon is the overlapped area, and it is judged whether the face element has an overlapped area; an overlapped area vertex coordinate set is generated.
[0063] All vertices are inserted into the overlapped area vertex coordinate set; the original boundary line of the overlapped area is set as a non-crossable constraint edge; a completely constrained triangular mesh is constructed on the vertex set; it is ensured that all constraint edges are retained as triangular mesh boundaries.
[0064] The central axis of the triangular mesh is extracted as a segmentation boundary, and the overlapping area is segmented by the central axis as a cutting line; the boundary ring vertex sequence of each sub-face domain after cutting is reorganized to generate a new independent face domain;
[0065] The new independent face domain encapsulates the geometry in POLYGON format; the point elements and line elements maintain the structure of the repaired feature set unchanged; all features are reordered by spatial position to obtain feature identifiers; and a segmented feature set containing all geometric features is generated.
[0066] S2.3, extract the spatial relationship of the segmented feature set, generate a binary topological graph, and obtain the topological snapshot index through a bitmap storage structure compression method;
[0067] It should be noted that the spatial relationship of the segmented feature set (area inclusion relationship, line segment connection relationship and spatial contact relationship) is extracted, and a two-dimensional matrix structure is created; the row number and column number of the two-dimensional matrix structure correspond to the feature identifier of the segmented feature set; the matrix elements are assigned values, for example, the feature pair has a spatial relationship, and the value is 1, otherwise the value is 0; and a complete binary topological relationship is generated.
[0068] A key-value pair structure storage system is constructed, the key name field uses the "feature identifier" string; the key value field stores the corresponding binary topological relationship; and finally a complete topological snapshot index structure is formed.
[0069] S2.4, write the generated topological snapshot index into the spatial database through the sharding transaction method, and generate a database status report through the calculation of real-time topological fingerprints.
[0070] It should be noted that the feature identifiers in the topological snapshot index are divided, and the feature identifiers are segmented; each segment of the feature identifier contains a fixed number of feature identifiers, forming multiple data shards; an independent database transaction is created for each data shard; batch insertion operations are performed in the independent database transaction; the key-value pair data of the topological snapshot index is written into the spatial database to obtain a list of shard write states.
[0071] Read the topological index table record of the latest written data shard; extract the feature identifier and calculate the cyclic redundancy check value as the real-time topological fingerprint.
[0072] Create a structured report document; the report document includes feature identifiers, shard write state lists, and real-time topological fingerprints; and a database status report is generated in JSON format.
[0073] Further, the spatial database is a special data storage structure constructed based on an open source database management integrated geographic spatial data processing extension; core functions are to store geometric coordinates (WKT / WKB format) and attribute data of point, line and surface vector elements; support spatial index construction and provide topological relationship verification capability, and provide high reliable storage and calculation for real-time editing of vector data.
[0074] S3, verifying the spatial relationship of the elements of the spatial database according to the topological snapshot index to generate a database operation instruction, and obtaining a real-time state notification of the database operation instruction according to the database state report;
[0075] S3.1, calling the built-in function of the spatial database according to the topological snapshot index to verify the spatial relationship of the elements, and dynamically adjusting the tolerance accuracy in combination with the element distribution density to generate a verification report by identifying the conflict elements.
[0076] It should be noted that the key value data structure of the topological snapshot index is read, the element identifier field in the key value data structure is parsed, and the binary topological relationship matrix is restored; the matrix row number and column number correspond to the serial number of the element identifier, and the matrix element value stores the adjacency, connectivity and containment.
[0077] Get the row number element identifier and the column number element identifier; call the spatial contact function built-in the spatial database to verify the adjacency of the elements; call the line segment connection function built-in the spatial database to verify the connectivity of the elements; call the region containing function built-in the spatial database to verify the containment of the elements.
[0078] Get the number of spatial grid elements corresponding to the maximum number of grid elements in the density distribution matrix; calculate the ratio of the number of spatial grid elements to the maximum number of grid elements; dynamically adjust the tolerance accuracy according to the ratio.
[0079] Compare the spatial database function return result with the matrix value in the topological relationship matrix; if the spatial contact function returns but the matrix value is zero, record the adjacency conflict; if the line segment connection function returns false but the matrix value is one, record the connectivity conflict; if the containment verification result is inconsistent with the matrix value, record the containment conflict; generate a conflict element record entry containing a conflict element identifier pair and a conflict type.
[0080] Create a structured report document; the report document contains the conflict element identifier; the conflict type records the adjacency conflict, the connectivity conflict or the containment conflict string; generate a verification report in JSON format.
[0081] S3.2, combining the spatial relationship verification report and the database state report, generating a database operation instruction by calculating a dynamic priority;
[0082] It should be noted that the conflict element list of the spatial relationship verification report is read; the conflict element identifier, the associated element identifier, and the conflict type are extracted; the block identifier and the topology fingerprint of the database state report are read; and the conflict element processing task queue is created.
[0083] The entropy formula is applied to the conflict element processing task queue to calculate the operation priority, and the expression is:
[0084] ;
[0085] Among them, is the operation priority value, is the natural constant base representing the time decay factor, is the time decay coefficient (e.g., the lower limit 0.15 makes the obsolete conflict resolution rate > 90%, and the upper limit 0.25 makes the high-complexity operation timeout rate > 20%), is the conflict duration, is the user permission weight, is the operation complexity coefficient (e.g., When <0.6, the priority of high-complexity operations (such as topology repair) is insufficient, resulting in a task completion rate of less than 95%; >0.8, the basic operation timeout rate is > 15%), is the number of vertices, is the operation conflict type, is the logarithmic function with base 10. The task entry with the highest operation priority value is selected; the element locking structured query statement is generated, the statement type includes the update operation, the target table is the vector data table, the user state field is set to the locking identifier, and the limited condition is the conflict element identifier list; and it is packaged into a complete structured database operation instruction.
[0086] S3.3, difference coding compression is performed on the database operation instruction, and it is packaged into a real-time state announcement in binary protocol format.
[0087] S3.3, difference coding compression is performed on the database operation instruction, and it is packaged into a real-time state announcement in binary protocol format.
[0088] It should be noted that first, the database operation instruction is partitioned according to the spatial position of the density distribution matrix based on the partition code of the spatial grid, and the partition code is obtained. Each partition corresponds to an independent database operation instruction and constructs an empty instruction set. Based on the empty instruction set, all current database operation instructions are marked as new data blocks, the partition code is serialized into a JSON byte stream, and the byte length is recorded. Subsequently, a five-field binary protocol frame is constructed to obtain a real-time state announcement.
[0089] S4. Based on the real-time state notification, dynamically render the standardized element sequence, render the operable standardized element as green, render the multi-user operated standardized element as yellow, and render the inoperable standardized element as red; when the user operated standardized element is yellow or red, intercept in real time and push a prompt, and generate a structured operation log;
[0090] S4.1, analyze the state mark in the real-time state notification, and dynamically render the standardized element sequence, render the operable standardized element as green, render the multi-user operated standardized element as yellow, and render the inoperable standardized element as red, and obtain the rendering state change record;
[0091] It should be noted that the state mark in the real-time state notification is analyzed, and the state mark includes operable, multi-user operation and inoperable. The element identifier of the standardized element sequence is traversed, the state mark is queried, and the color rendering rule is applied, the operable standardized element is rendered as green, the multi-user operated standardized element is rendered as yellow, and the inoperable standardized element is rendered as red, and an element rendering state mapping table is generated.
[0092] The element WKT data of the incoming standardized element sequence is injected; the color parameter of the element rendering state mapping table is injected; the color value change event of the standardized element is monitored; the color attribute before the change and the color attribute after the change are recorded; the timestamp when the change occurs is captured; a single change record is generated, and all change records are integrated according to the timestamp to form a rendering state change record set.
[0093] S4.2, when the user operates the target element as yellow or red, intercept the operation request in real time and push the prompt information, and synchronously generate the operation interception record;
[0094] It should be noted that the target coordinate position of the user operation is obtained, the standardized element sequence is inversely queried through the spatial coordinates, the target element identifier of the target coordinate position is matched, and the user identifier and the operation timestamp are recorded; the target element identifier is queried, and the color attribute field value is read; if the color attribute value is yellow or red, the interception operation is performed, and the text prompt information is pushed to the user, and the text content includes the target element identifier and the user identifier; the operation interception record entry is created, the target element identifier and the operation user identifier are recorded, and the operation interception record is generated through the operation timestamp in ascending order;
[0095] S4.3, aggregate the operation interception record and the rendering state change record, and generate a structured operation log by using columnar storage compression method.
[0096] It should be noted that the operation interception record set and the rendering state change record set are merged, the operation interception record is marked as "interception type", and the rendering state change record is marked as "rendering type".
[0097] Split each record in the operation interception record set and the rendering state change record set into independent field columns, forming seven independent data columns of timestamp column, record type column, element identifier column, user identifier column, old state column, new state column and operation category column, each column storing the same type of data.
[0098] Independently apply compression algorithms to the separated field columns (incremental encoding for the timestamp column, dictionary encoding for the record type column, prefix compression for the element identifier column, bitmap storage for the user identifier column, enumeration encoding for the old and new state columns, and Huffman encoding for the operation category column), and encapsulate the compressed blocks and metadata headers to generate a binary log file.
[0099] S5, verify the adjacency, connectivity and conflict-free inclusion relationship of the element change coordinates in the structured operation log and the topology snapshot index, generate a patch by identifying topology breakpoints and performing spatial interpolation connection, and mark the element coordinate set that needs to be processed, and output the reprocessing area coordinates by calculating the minimum bounding rectangle.
[0100] S5.1, obtain the topology breakpoint list by comparing the adjacency, connectivity and conflict-free inclusion relationship of the element change coordinates in the operation log and the topology snapshot index by locating the breakpoints;
[0101] It should be noted that the element change record of the operation log is parsed, and the changed element change coordinates are extracted; the adjacency, connectivity and conflict-free inclusion relationship of the topology snapshot index is read. The built-in spatial contact function of the changed element change coordinates is called to verify the element adjacency; the built-in line segment connection function of the element change coordinates is called to verify the element connectivity; the built-in area inclusion function of the element change coordinates is called to verify the conflict-free inclusion relationship, and the comparison function verification result is obtained.
[0102] The comparison function verification result and the matrix value of the adjacency, connectivity and conflict-free inclusion relationship of the topology snapshot index, for example, the adjacency verification passes but the matrix value = 0, which is recorded as an adjacency breakpoint, the connectivity verification fails but the matrix value = 1, which is recorded as a connectivity breakpoint, and the inclusion verification result ≠ matrix value, which is recorded as an inclusion breakpoint, to generate a topology breakpoint list.
[0103] S5.2, according to the breakpoint type in the topology breakpoint list, generate a geometric repair patch by interpolation algorithm;
[0104] It should be noted that the breakpoint type (adjacency breakpoint type, connectivity breakpoint type and inclusion breakpoint type) of the topology breakpoint list is read, and the coordinate sequence of the breakpoint is extracted as the repair reference point.
[0105] For the repair benchmark, the inverse distance interpolation algorithm is used to collect the coordinates of the boundary points of the surrounding features of the break point coordinates and generate the interpolation point coordinates; a line feature geometry is created (the starting point is the break point coordinates and the ending point is the interpolation point coordinates), and the geometry is encapsulated into a line feature WKT format, and sorted in ascending order according to the break point timestamp, and finally the repair patch is output.
[0106] S5.3 extracts the geometric vertex coordinates of the repair patch, calculates the minimum outer rectangle using the convex hull algorithm, and obtains the coordinates of the reprocessing region by marking the reprocessing region.
[0107] It should be noted that the geometric WKT text content of the parsed geometric repair patch is used to identify the coordinate sequence after the keywords LINESTRING or POLYGON to form vertex coordinates.
[0108] Merge all vertex coordinates to form a point set, and sort the point set in ascending order of longitude values. Construct a lower convex hull boundary, traversing counterclockwise from the point with the minimum longitude to the point with the maximum longitude, obtaining the minimum and maximum longitude values. Construct an upper convex hull boundary, traversing counterclockwise from the point with the maximum longitude to the point with the minimum longitude, obtaining the minimum and maximum latitude values. Merge the lower and upper convex hull boundaries to form a convex polygon boundary. Based on the minimum and maximum longitude values, and the minimum and maximum latitude values, combined with the convex polygon boundary, obtain the minimum bounding rectangle.
[0109] Query the spatial grid covered by the minimum bounding rectangle in the density distribution matrix. Traverse all grids in the density distribution matrix and determine whether the geographic boundary of the grid intersects with the minimum bounding rectangle. Record the feature quantity values of all intersecting grids. Sum the feature quantity values of all intersecting grids to count the number of intersecting grids. Use the ratio of the sum of the feature quantity values of intersecting grids to the number of intersecting grids as the average feature density value, and obtain the coordinates of the reprocessing area by calculating the dynamic expansion amount. The expression for calculating the dynamic expansion amount is:
[0110] ;
[0111] in, For dynamic expansion, Based on extended values, This represents the current number of grid features. The maximum number of grid features in the density distribution matrix. The density decay adjustment factor (obtained by fitting an exponential function to the peak dielectric loss decay rate under different aging cycles, with a value range of: For example, the density attenuation adjustment factor of epoxy resin insulation material was measured to be 0.12 through a dielectric spectrum aging test.
[0112] The embodiment also provides a computer device suitable for supporting the online real-time editing method of the million-level vector data, which comprises a memory and a processor; the memory is used for storing computer executable instructions, and the processor is used for executing the computer executable instructions to realize the online real-time editing method of the million-level vector data proposed in the above embodiment.
[0113] The computer device can be a terminal, which comprises a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is used for providing computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with external terminals. The wireless communication can be realized through WIFI, an operator network, NFC (Near Field Communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, a trackball or a touchpad arranged on the shell of the computer device, or an external keyboard, a touchpad or a mouse, etc.
[0114] The embodiment also provides a storage medium having a computer program stored thereon, which is executed by a processor to realize the online real-time editing method of the million-level vector data proposed in the above embodiment. The storage medium can be realized by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.
[0115] In summary, the application breaks through the memory bottleneck of the traditional full-quantity loading mode by: a density adaptive streaming method, which dynamically divides the processing granularity according to the spatial element distribution characteristics, ensures the geometric accuracy of high-density areas, and realizes essential optimization of memory occupation; in combination with a closed-loop self-maintenance engine, an intelligent repair algorithm based on fracture point type matching is used to realize sub-unit accuracy topology self-healing, and a tolerance-driven minimum bounding rectangle dynamic expansion technology is used to accurately locate the reprocessing area.
[0116] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A method for supporting online real-time editing of million-level vector data, characterized in that: The application relates to a method for processing massive vector data, and belongs to the technical field of spatial database. The method comprises the following steps of, According to the user-uploaded massive vector data, a spatial grid is divided, and a density distribution matrix is generated by counting the number of point, line and surface elements in each spatial grid. The high and low density areas of the density distribution matrix are identified, the high density area is divided into fine-grained blocks, the low density area is divided into coarse-grained blocks, and a block data grid set is obtained. The original coordinates in the block data grid set are extracted, and a standardized sequence is generated by real-time conversion through a streaming analysis method. According to the spatial proximity relationship of the standardized element sequence, a hanging point is connected, and a topological repair is performed on the standardized element sequence by segmenting the overlapped area, a topological snapshot index is generated, the generated topological snapshot index is written into a spatial database, a database state report is generated, and the specific steps are as follows, The element spatial relationship of the segmented element set is extracted, a binary topological graph is generated, and a topological snapshot index is obtained through a bitmap storage structure compression method. The generated topological snapshot index is written into the spatial database through a sharding transaction method, and a database state report is generated by calculating a real-time topological fingerprint. According to the topological snapshot index, the element spatial relationship of the spatial database is verified, a database operation instruction is generated, and the real-time state notification of the database operation instruction is obtained according to the database state report, and the specific steps are as follows, According to the topological snapshot index, the built-in function of the spatial database is called to verify the element spatial relationship, and the tolerance accuracy is dynamically adjusted in combination with the element distribution density, and a verification report is generated by identifying the conflict elements. In combination with the spatial relationship verification report and the database state report, a database operation instruction is generated by calculating a dynamic priority; The database operation instruction is differentially encoded and compressed, and is packaged into a real-time state notification in a binary protocol format. Based on the real-time state notification, the standardized element sequence is dynamically rendered, the operable standardized elements are rendered in green, the standardized elements operated by multiple users are rendered in yellow, and the non-operable standardized elements are rendered in red; when the standardized elements operated by the user are yellow and red, real-time interception and prompt pushing are performed, and a structured operation log is generated; The element change coordinates in the structured operation log are verified for adjacency, connectivity and non-conflict containing relationship with the topological snapshot index, a processing patch is generated by identifying a topological break point and performing spatial interpolation connection, and a coordinate set of elements needing processing is marked, and a reprocessing area coordinate is output by calculating a minimum bounding rectangle.
2. The method for supporting online real-time editing of million-level vector data according to claim 1, characterized in that: The method for processing massive vector data comprises the following steps of, Isolated end points of line elements in the standardized element sequence are extracted, and a repair element set is generated by connecting adjacent elements through a vortex adsorption method. Based on a triangular mesh division algorithm, the overlapped surface domain in the repair element set is divided into triangular meshes, a central axis of the triangular mesh is extracted as a segmentation boundary, the overlapped surface domain is reorganized, and a segmented element set is generated.
3. The method for supporting online real-time editing of million-level vector data according to claim 2, characterized in that: The real-time state notification-based dynamic rendering of the standardized element sequence renders the operable standardized element as green, renders the multi-user operated standardized element as yellow, and renders the inoperable standardized element as red; when the user-operated standardized element is yellow or red, real-time interception and prompt pushing are performed, and a structured operation log is generated, the specific steps being as follows, The state mark in the real-time state notification is parsed, and the standardized element sequence is dynamically rendered, the operable standardized element is rendered as green, the multi-user operated standardized element is rendered as yellow, and the inoperable standardized element is rendered as red, and a rendering state change record is obtained; When the user-operated target element is yellow and red, the operation request is intercepted in real time, and prompt information is pushed, and an operation interception record is synchronously generated; The operation interception record and the rendering state change record are aggregated, and a structured operation log is generated by using a columnar storage compression method.
4. The method for supporting online real-time editing of million-level vector data according to claim 3, characterized in that: The element change coordinates in the structured operation log and the adjacency, connectivity and conflict-free inclusion relationship of the topological snapshot index are verified, a processing patch is generated by identifying a topological breaking point and performing spatial interpolation connection, and the specific steps are as follows, The element change coordinates in the operation log and the adjacency, connectivity and conflict-free inclusion relationship of the topological snapshot index are compared, and a topological breaking point list is obtained by locating the breaking point; According to the breaking point type in the topological breaking point list, a geometric repair patch is generated by using an interpolation algorithm.
5. The method for supporting online real-time editing of million-level vector data according to claim 4, characterized in that: The element coordinate set to be processed is marked, the minimum bounding rectangle is calculated to output the reprocessing area coordinates, the geometric vertex coordinates of the repair patch are extracted, the minimum bounding rectangle is calculated by using a convex hull algorithm, and the reprocessing area coordinates are obtained by marking the reprocessing area. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is characterized in that: The processor executes the computer program to realize the steps of the support million-level vector data online real-time editing method according to any one of claims 1-5.
7. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program is executed by the processor to realize the steps of the support million-level vector data online real-time editing method according to any one of claims 1-5.
Citation Information
Patent Citations
High-performance pipe network data online editing method and system
CN117591519A