Method and device for supporting online real-time editing of million-level vector data and medium
By employing density-adaptive streaming processing and topology repair techniques, the problems of processing crashes and multi-user control inaccuracies in real-time editing of millions of vector data have been solved, enabling efficient real-time editing and collaborative operation.
Patent Information
- Application Number
- CN202511340233.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-09-19
AI Technical Summary
Existing vector data editing solutions cannot support real-time operations on millions of features, leading to risks of file parsing crashes and database efficiency degradation. At the same time, multi-user collaborative editing mechanisms suffer from control inaccuracies.
High and low density regions are divided by density-adaptive streaming processing, standardized feature sequences are generated by real-time coordinate transformation, and multi-user operations are intercepted in real time by combining topology repair and dynamic rendering technologies to generate structured operation logs. Topology breakpoints are then processed through intelligent repair algorithms.
It achieves stability of real-time processing architecture for millions of vector data points and accuracy of multi-user collaborative control, optimizes memory usage and topology self-healing capability, and improves system response speed and reliability.
Smart Images

Figure CN120832135A_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 calculation, 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 the online visualization and basic editing capability 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, the full memory loading mode leads to the risk of file parsing crash, and the redundancy of feature storage structure causes the efficiency of database to decay, and the directory tree and other auxiliary components will have interactive lag when the data volume is 100,000; on the other hand, the collaborative editing mechanism has a fundamental defect, 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 static priority strategy, which leads to business logic misalignment. 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 multi-user collaborative control misalignment.
[0006] To solve the above technical problems, the present application provides the following technical solutions: In a first aspect, the present application provides a method for supporting online real-time editing of million-level vector data, which comprises: 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, the standardized element operated by multiple users as yellow, and 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.
[0007] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, the method comprises the following steps: According to the user-uploaded million-level vector data, a spatial grid is divided, and a density distribution matrix is generated by counting the number of point, line and face elements in each spatial grid. High-density and low-density areas of the density distribution matrix are identified, fine-grained partitioning is adopted in the high-density area, coarse-grained partitioning is adopted in the low-density area, and a partitioned data grid set is obtained. Original coordinates in the partitioned data grid set are extracted, and a standardized sequence is generated in real time through a streaming analysis method.
[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: Isolated end points of line elements in the standardized element sequence are extracted, and neighboring elements are connected through a vortex adsorption method to generate a repaired element set. Based on a triangular mesh partitioning algorithm, overlapping face domains in the repaired element set are decomposed into triangular meshes, and the central axes of the triangular meshes are extracted as segmentation boundaries, the overlapping face domains are reorganized, and a segmented element set is generated.
[0009] 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, The element space relationship of the segmented element set is extracted, a binary topology graph is generated, and a topology snapshot index is obtained through a bitmap storage structure compression method; 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.
[0010] 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, The built-in function of the spatial database is called according to the topology snapshot index to verify the element space relationship, and the tolerance accuracy is dynamically adjusted according to the element distribution density, and a verification report is generated by identifying conflicting elements; The spatial relationship verification report and the database state report are combined to generate a database operation instruction through calculation of a dynamic priority; The database operation instruction is differentially encoded and compressed, and is packaged into a real-time state notification in binary protocol format.
[0011] 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, 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 non-operable standardized element is rendered as red, and a rendering state change record is obtained; When the user operates the target element as yellow or red, the operation request is intercepted in real time and the prompt information is pushed, and the operation interception record is generated synchronously; 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.
[0012] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, in the method, the abutment, connectivity and conflict-free inclusion relationship between the element change coordinates in the structured operation log and the topological snapshot index are verified, and a patch is generated by identifying a topological break point and performing spatial interpolation connection generation processing, and the specific steps are as follows, The abutment, connectivity and conflict-free inclusion relationship between the element change coordinates in the operation log and the topological snapshot index are compared, and the list of topological break points is obtained by locating the break points. According to the type of the break point in the list of topological break points, a geometric repair patch is generated by an interpolation algorithm.
[0013] As a preferred scheme of the method for supporting online real-time editing of million-level vector data, in the method, the element coordinate set that needs to be processed is marked, the coordinate of the reprocessing area is output by calculating the minimum bounding rectangle, the geometric vertex coordinates of the repair patch are extracted, the minimum bounding rectangle is calculated by a convex hull algorithm, and the coordinate of the reprocessing area is obtained by marking the reprocessing area.
[0014] In a second aspect, the present application provides a computer device, comprising a memory and a processor, and the memory stores a computer program, 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.
[0015] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program, 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.
[0016] The present application has the following beneficial effects: 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 through; in combination with the closed-loop self-maintenance engine, the intelligent repair algorithm based on the type matching of the break point 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
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creating any creative labor.
[0018] Fig. 1A flow chart for supporting the online real-time editing method of the million-level vector data; Fig. 2 A flow chart for generating a status report; Fig. 3 A flow chart for generating an operation log; Fig. 4 A flow chart for outputting the processing area coordinates. DETAILED DESCRIPTION
[0019] In order to make the above objectives, features and advantages of the present application more apparent, specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0020] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details given herein. In other instances, well-known methods have not been described in detail in order to avoid unnecessarily obscuring the present application. Accordingly, it will be appreciated that the present application is not limited to the embodiments disclosed herein, and that the embodiments are provided for illustrative purposes only.
[0021] 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.
[0022] 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: 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; 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; It should be noted that the user uploaded million-level vector data is divided into a square spatial grid structure. The spatial grid coverage range is uniformly arranged in the increasing direction of longitude and latitude, and each spatial grid has independent geographical boundary coordinates. The geographical boundary coordinates include four parameters of 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.
[0023] The spatial relationship judgment is performed on the coordinates of the elements (point elements, line elements and surface elements) in each spatial grid. 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 at the same time, the spatial grid is counted. When the geometric line segment of the line element has an intersection 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 in the spatial grid. When the polygon area of the surface element has an overlapping area with the geographical boundary of the spatial grid, the surface element is counted in the spatial grid. After the spatial relationship judgment is completed, the number of point elements, the number of line elements and the number of surface elements in the spatial grid are accumulated respectively, and the total number of elements in the spatial grid is obtained by adding the numbers of the three types of elements.
[0024] 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 of the corresponding spatial grid, and finally a density distribution matrix is generated.
[0025] S1.2, identifying high and low density areas of the density distribution matrix, using fine-grained partitioning for high density areas and coarse-grained partitioning for low density areas to obtain a set of partitioned data grids; 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 with the element value higher than the distribution mean is marked as a high density area, and the area with the element value lower than the distribution mean is marked as a low density area.
[0026] Subsequently, fine-grained partitioning strategy is used for data cutting to obtain partitioned data grids for high density areas, which requires the size of each partitioned data grid to be controlled within a minimum range. Coarse-grained partitioning strategy is used for data cutting for low density areas, which allows the size of each partitioned data grid to be controlled within a maximum range.
[0027] The spatial continuity principle requires that the partitioning decision must avoid the core area of the element space aggregation, the shortest spatial distance between any two elements in the same partition is not more than the average element spacing of the density area, the line / surface elements are not split by the partitioning decision, and the elements with topological association (such as adjacent plots) must belong to the same partition. By executing the spatial continuity principle, a set of partitioned data grids is finally generated.
[0028] S1.3, extracting the original coordinates in the set of partitioned data grids, and generating a standardized sequence in real time through a streaming analysis method.
[0029] It should be noted that each tile data grid in the tile data grid set is traversed; the original data block binary content of the tile data grid is read; the original coordinate system coordinate values of the vector elements are obtained by parsing the original data block binary content; the single point coordinate value is extracted for point elements, the node coordinate sequence is extracted for line elements, and the boundary ring coordinate sequence is extracted for surface elements; and the original coordinates are retained in precision and format.
[0030] A streaming interface of the spatial data parsing library is called to establish a parsing pipeline; the extracted original coordinates are input into the pipeline; the pipeline performs real-time coordinate system conversion; the coordinate system conversion process independently performs real-time coordinate system conversion on each coordinate point, immediately releases the memory after processing, and does not accumulate the complete data set; after the conversion is completed, the elements are packaged into element geometries according to the element types, the point elements are packaged into POINT structures, the line elements are packaged into LINESTRING structures, and the surface elements are packaged into POLYGON structures; and each element is independently output to keep the structures separate.
[0031] The converted element geometries are encoded in the OGC or WKT standard text format: the point elements generate "POINT (example, longitude value latitude value)" format text; the line elements generate "LINESTRING (example, longitude value 1 latitude value 1, longitude value 2 latitude value 2,...)" format text; and the surface elements generate "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 tile data grid are stored in a list structure in the parsing order; and a standardized sequence is finally formed.
[0032] Further, the spatial data parsing library is a function encapsulation library integrating open source geospatial data processing, and realizes vector data format parsing and coordinate system conversion functions by calling a standard application program interface. The spatial data parsing library supports parsing of binary file structures of mainstream vector formats such as SHP, KML and DXF, and the specific process is as follows: loading a GDAL data driver during initialization; binding an input data stream to create a data source object; traversing layer definitions in the data source; extracting geometry coordinates and attribute fields of each element; calling a PROJ library to perform real-time coordinate system conversion; and finally outputting a standardized WKT format geometry text.
[0033] S2, according to the spatial proximity relationship of the standardized element sequence, connecting the hanging points and segmenting the overlapped area, performing topological repair on the standardized element sequence, writing the generated topological snapshot index into a spatial database, and generating a database state report; S2.1, extracting isolated endpoints of line elements in the standardized element sequence, connecting adjacent elements by vortex adsorption method, and generating a repaired element set; It should be noted that the geometry of the line element in the scan standardization element sequence is scanned; 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 geometry points in the search area, the current endpoint is marked as an isolated endpoint; 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 range; when there are other element geometry points in the search area, the element geometry 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, and the line element geometry structure is reconstructed to form a continuous element.
[0034] The connected line element updates the element WKT data, and the point element and the surface element remain unchanged in the WKT description; all elements are re-integrated to generate a repaired element set containing all elements.
[0035] S2.2, based on the triangular mesh subdivision algorithm, the overlapping 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 segmentation boundary, the overlapping surface domain is reorganized, and a segmented element set is generated; It should be noted that the polygon intersection area between the surface elements in the repaired element set is obtained by traversing the surface element geometry structure; 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 overlapping area, and it is judged whether the surface element has an overlapping area; a vertex coordinate set of the overlapping area is generated.
[0036] All vertices are inserted into the vertex coordinate set of the overlapping area; the original boundary line of the overlapping area is set as a non-crossable constraint edge; a completely constrained triangular mesh is constructed on the vertex set; and all constraint edges are ensured to be retained as triangular mesh boundaries.
[0037] 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; new independent surface domains are generated by reorganizing the boundary ring vertex sequences of the cut sub-surface domains; The new independent surface domain encapsulates the geometry in POLYGON format; the point element and the line element remain unchanged in the structure of the repaired element set; all elements are reordered according to the spatial position to obtain the element identifier; a segmented element set containing all geometric elements is generated.
[0038] S2.3. Extract the spatial relationship of the elements of the segmented feature set, generate a binary topological map, and obtain a topological snapshot index using a bitmap storage structure compression method; It should be noted that the spatial relationships of the elements of the segmented feature set (region containment relationship, line segment connection relationship and spatial contact relationship) are extracted to create a two-dimensional matrix structure; the row numbers and column numbers of the two-dimensional matrix structure correspond to the feature identifiers of the segmented feature set; the matrix elements are assigned values, for example, if there is a spatial relationship between the elements, a value of 1 is assigned, otherwise a value of 0 is assigned; and a complete binary topological relationship is generated.
[0039] Build a key-value pair structure storage system, where the key name field uses the "feature identifier" string; the key value field stores the corresponding binary topological relationship; and finally forms a complete topological snapshot index structure.
[0040] S2.4. Write the generated topology snapshot index into the spatial database through the sharding transaction method, and generate a database status report by calculating the real-time topology fingerprint.
[0041] It should be explained that the feature identifiers in the topology snapshot index are divided into segments; each segment of the feature identifier contains a fixed number of feature identifiers to form multiple data shards; an independent database transaction is created for each data shard; batch insert operations are performed in the independent database transaction; the key-value pair data of the topology snapshot index is written into the spatial database, and a shard write status list is obtained.
[0042] Read the topology index table record of the most recently written data shard; extract the feature identifier and calculate the cyclic redundancy check value as the real-time topology fingerprint.
[0043] Create a structured report document; the report document contains feature identifiers, shard write status list, and real-time topology fingerprint; and uses JSON format to encapsulate and generate a database status report.
[0044] Furthermore, the spatial database is a dedicated data storage structure built based on open source database management and integrated geographic spatial data processing extensions; its core function is to store the geometric coordinates (WKT / WKB format) and attribute data of vector elements such as points, lines, and surfaces; it supports spatial index construction and provides topological relationship verification capabilities, providing highly reliable storage and calculation for real-time editing of vector data.
[0045] S3. Verify the spatial relationship of the elements of the spatial database based on the topological snapshot index to generate a database operation instruction, and obtain a real-time status notification of the database operation instruction based on the database status report; S3.1. Call the built-in function of the spatial database based on the topological snapshot index to verify the spatial relationship of the elements, dynamically adjust the tolerance accuracy based on the element distribution density, and generate a verification report by identifying conflicting elements.
[0046] It should be noted that the key-value data structure of the topology snapshot index is read, the feature identifier field in the key-value data structure is parsed, and the binary topology relationship matrix is restored; the matrix row number and column number correspond to the sequence number of the feature identifier, and the matrix element value stores adjacency, connectivity and inclusion.
[0047] Get the row number feature identifier and column number feature identifier; call the built-in spatial contact function of the spatial database to verify the feature adjacency; call the built-in line segment connection function of the spatial database to verify the feature connectivity; call the built-in area containment function of the spatial database to verify the feature containment.
[0048] Obtain 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; and dynamically adjust the tolerance accuracy based on the ratio.
[0049] Compare the results returned by the spatial database function with the matrix values in the topological relationship matrix; if the spatial contact function returns but the matrix value is zero, record an adjacency conflict; if the line segment connection function returns false but the matrix value is one, record a connectivity conflict; if the containment verification result is inconsistent with the matrix value, record a containment conflict; generate a conflict feature record entry containing the conflict feature identifier pair and the conflict type.
[0050] Create a structured report document; the report document contains conflict feature identifiers; the conflict type records adjacency conflict, connectivity conflict, or containment conflict string; and the verification report is generated using JSON format encapsulation.
[0051] S3.2. Combine the spatial relationship verification report and the database status report to generate database operation instructions by calculating dynamic priorities; It should be explained that the conflict element list of the spatial relationship verification report is read; the conflict element identifier, associated element identifier, and conflict type are extracted; the block identifier and topological fingerprint of the database status report are read; and a conflict element processing task queue is created; The operation priority is calculated by applying the entropy formula based on the conflict element processing task queue. The expression is: ; in, is the operation priority value, is the natural constant base representing the time decay factor, is the time attenuation coefficient ( For example, a lower limit of 0.15 makes the stale conflict resolution rate > 90%, and an upper limit of 0.25 makes the high-complexity operation timeout rate > 20%). The duration of the conflict, is the user permission weight, Operational complexity coefficient ( ),For example, When the value is less than 0.6, high-complexity operations (such as topology repair) are not prioritized enough, resulting in a task completion rate below 95%; >0.8 basic operation timeout rate>15%) is the number of prime vertices, is the operation conflict type, is the logarithmic function with base 10.
[0052] Select the task entry with the highest operation priority value; generate a feature lock structured query statement, the statement type includes update operation, the target table is a vector data table, the user status field is set to a lock identifier, and the restriction condition is a list of conflicting feature identifiers; encapsulate it into a complete structured database operation instruction.
[0053] S3.3. Perform differential encoding and compression on the database operation instructions and encapsulate them into a real-time status notification in a binary protocol format.
[0054] It should be noted that, first, database operation instructions are partitioned by spatial location based on the partition codes of the spatial grid of the density distribution matrix to obtain partition codes. Each partition corresponds to an independent database operation instruction, and an empty instruction set is constructed. Based on the empty instruction set, all current database operation instructions are marked as newly added data blocks. The partition codes are serialized into a JSON byte stream, and the byte length is recorded. Subsequently, a five-field binary protocol frame is constructed to obtain real-time status notifications.
[0055] S4. Dynamically render the standardized element sequence based on real-time status notifications, rendering operable standardized elements green, standardized elements operated by multiple users yellow, and inoperable standardized elements red; when a standardized element operated by a user is yellow or red, intercept and push notifications in real time, and generate a structured operation log; S4.1. Parse the status mark in the real-time status notification and dynamically render the standardized element sequence, rendering operable standardized elements green, multi-user operated standardized elements yellow, and inoperable standardized elements red, and obtain rendering status change records; It should be noted that the status tags in the real-time status notification are parsed. The status tags include operable, multi-user operated, and inoperable. The feature identifiers of the standardized feature sequence are traversed, and by querying the status tags and applying the color rendering rules, operable standardized features are rendered green, multi-user operated standardized features are rendered yellow, and inoperable standardized features are rendered red, generating a feature rendering state mapping table.
[0056] WKT data of the incoming standardized feature sequence; inject color parameters of the feature rendering state mapping table; monitor color value change events of the standardized features; record color attributes before and after the change; capture the timestamp when the change occurs; generate a single change record, and integrate all change records by timestamp to form a rendering state change record set.
[0057] S4.2, when the user operates the target feature to be yellow or red, intercept the operation request in real time and push the prompt information, and generate the operation interception record synchronously; It should be noted that the target coordinate position of the user operation is obtained, the standardized feature sequence is retrieved through the spatial coordinates, the target feature identifier of the target coordinate position is matched, and the user identifier and operation timestamp are recorded; the target feature 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 feature identifier and the user identifier; the operation interception record entry is created, the target feature identifier and the operation user identifier are recorded, and the operation interception record is generated through the operation timestamp in ascending order; 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.
[0058] 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".
[0059] The operation interception record set and the rendering state change record set are split into independent field columns to form seven independent data columns of timestamp column, record type column, feature identifier column, user identifier column, old state column, new state column and operation category column, each column stores the same type of data.
[0060] The separated field columns are independently applied with compression algorithm (incremental encoding is performed on the timestamp column, dictionary encoding is performed on the record type column, prefix compression is performed on the feature identifier column, bitmap storage is performed on the user identifier column, enumeration encoding is performed on the new and old state columns, and Huffman encoding is performed on the operation category column), and a binary log file is generated by encapsulating the compressed block and the metadata header.
[0061] S5, verify the adjacency, connectivity and conflict-free inclusion relationship of the feature change coordinates in the structured operation log and the topological snapshot index, generate a processing patch by identifying the topological fracture point and performing spatial interpolation connection, mark the feature coordinate set that needs to be processed at the same time, and output the reprocessing area coordinates by calculating the minimum bounding rectangle.
[0062] S5.1, obtain a topology break point list by locating break points through comparing element change coordinates in the operation log with adjacency, connectivity and non-conflict containing relationship of the topology snapshot index; It should be noted that the element change record of the operation log is analyzed, the changed element change coordinates are extracted, and the adjacency, connectivity and non-conflict containing 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 containing function of the element change coordinates is called to verify the non-conflict containing relationship, and the comparison function verification result is obtained.
[0063] The comparison function verification result is compared with the matrix value of the adjacency, connectivity and non-conflict containing relationship of the topology snapshot index. For example, the adjacency verification passes but the matrix value is 0, which is recorded as an adjacency break; the connectivity verification fails but the matrix value is 1, which is recorded as a connectivity break; and the containing verification result ≠ the matrix value, which is recorded as a containing break. The topology break point list is generated.
[0064] S5.2, generate a geometric repair patch through an interpolation algorithm according to the break point type in the topology break point list; It should be noted that the break type (adjacency break type, connectivity break type and containing break type) of the topology break point list is read, and the coordinate sequence of the break point is extracted as a repair reference point.
[0065] For the repair reference point, the inverse distance interpolation algorithm is used to collect the surrounding element boundary point coordinates of the break point coordinates to generate interpolation point coordinates; a line element geometry is created (the starting point is the break point coordinate and the ending point is the interpolation point coordinate), which is encapsulated into a line element WKT format through the geometry, and arranged in ascending order of the break point timestamp. Finally, the repair patch is output.
[0066] S5.3, extract the geometric vertex coordinates of the repair patch, calculate the minimum bounding rectangle through the convex hull algorithm, and obtain the reprocessing area coordinates through marking the reprocessing area.
[0067] It should be noted that the geometric WKT text content of the geometric repair patch is analyzed, the coordinate sequence after the LINESTRING or POLYGON keyword is identified, and the vertex coordinates are formed.
[0068] All vertex coordinates are merged to form a point set, which is sorted in ascending order of the longitude value of the vertex coordinates; the lower convex hull boundary is constructed, and the longitude minimum value and the longitude maximum value are obtained by traversing the longitude minimum point to the maximum point in a counterclockwise direction; the upper convex hull boundary is constructed, and the latitude minimum value and the latitude maximum value are obtained by traversing the longitude maximum point to the minimum point in a counterclockwise direction. The lower convex hull boundary and the upper convex hull boundary are merged to form a convex polygon boundary. The minimum bounding rectangle is obtained based on the longitude minimum value, the longitude maximum value, the latitude minimum value and the latitude maximum value in combination with the convex polygon boundary; The spatial grid covered by the minimum circumscribed rectangle in the density distribution matrix is queried, all grids in the density distribution matrix are traversed, it is judged whether the geographic boundary of the grid intersects with the minimum circumscribed rectangle, and the element quantity value of all intersecting grids is recorded. The sum of the element quantity values of all intersecting grids is accumulated, and the number of intersecting grids is counted. The ratio of the sum of the element quantity values of the intersecting grids to the number of the intersecting grids is taken as the average element density value, and the reprocessing area coordinates are obtained by calculating the dynamic expansion amount. The expression for calculating the dynamic expansion amount is: ; wherein, is the dynamic expansion amount, is the basic expansion value, is the current grid element quantity, is the maximum grid element quantity in the density distribution matrix, is a density attenuation adjustment factor (obtained by fitting an exponential function according to the measured dielectric loss peak value decay rate at different aging periods, and the value range is: For example, the density attenuation adjustment factor of an epoxy resin insulating material is 0.12 through a material dielectric spectrum aging test).
[0069] The embodiment also provides a computer device suitable for supporting the online real-time editing method of the million-level vector data, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the online real-time editing method of the million-level vector data provided in the above embodiment.
[0070] The computer device can be a terminal, and the computer device includes 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 to provide computing and control capabilities. The memory of the computer device includes 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 to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved 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, trackball or touchpad arranged on the shell of the computer device. In addition, the input device can be an external keyboard, touchpad or mouse, etc.
[0071] The embodiment also provides a storage medium on which a computer program is stored, the program being executed by a processor to implement the method for supporting online real-time editing of million-level vector data as proposed in the above embodiment; the storage medium can be implemented 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.
[0072] 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, and realizes essential optimization of memory occupation while guaranteeing the geometric precision in high-density areas; 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.
[0073] It should be noted that the above embodiments are only used to illustrate the technical solutions of the application rather than limit the application. Although the application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the application, and all of them should be covered in the scope of the claims of the 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 and displaying massive vector data. The method comprises the following steps of: receiving user-uploaded massive vector data, counting element distribution density in a spatial grid to divide high-density and low-density areas, and generating a standardized element sequence through real-time coordinate conversion; According to the spatial proximity relationship of the standardized element sequence, hanging points are 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, and a database state report is generated; According to the topological snapshot index, the spatial relationship of elements in the spatial database is verified, a database operation instruction is generated, and a real-time state notification of the database operation instruction is obtained according to the database state report; Based on the real-time state notification, the standardized element sequence is dynamically rendered, the operable standardized element is rendered as green, the standardized element operated by multiple users is rendered as yellow, and the non-operable standardized element is rendered as red; when the standardized element operated by the user is 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 conflict-free inclusion relationship with the topological snapshot index, a processing patch is generated by identifying a topological fracture point and performing spatial interpolation connection, meanwhile, the element coordinate set 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 comprises the following steps of: receiving user-uploaded massive vector data, counting element distribution density in a spatial grid to divide high-density and low-density areas, and generating a standardized element sequence through real-time coordinate conversion, According to the user-uploaded massive vector data, a spatial grid is divided, the number of point, line and surface elements in each spatial grid is counted, and a density distribution matrix is generated; High-density and low-density areas of the density distribution matrix are identified, fine-grained block division is adopted in the high-density area, coarse-grained block division is adopted in the low-density area, and a block data grid set is obtained; Original coordinates in the block data grid set are extracted, and a standardized sequence is generated through real-time conversion by using a streaming analysis method.
3. The method for supporting online real-time editing of million-level vector data according to claim 2, characterized in that: The method comprises the following steps of: extracting isolated end points of line elements in the standardized element sequence, connecting adjacent elements through a vortex adsorption method, and generating a repaired element set; Based on a triangular mesh division algorithm, the overlapped surface domain in the repaired element set is divided into a triangular mesh, 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. The method comprises the following steps of: extracting element spatial relationships of the segmented element set, generating a binary topological graph, and obtaining a topological snapshot index through a bitmap storage structure compression method; 4. The method for supporting online real-time editing of million-level vector data according to claim 3, characterized in that: 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. The method comprises the following steps of: 5. The method for supporting online real-time editing of million-level vector data according to claim 4, characterized in that: According to the topological 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 in combination with the element distribution density, and a verification report is generated by identifying the conflict elements; Combined 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 difference coded and compressed, and is packaged into a real-time state notification in binary protocol format.
6. The method for supporting online real-time editing of million-level vector data according to claim 5, characterized in that: The real-time state notification is used to dynamically render the standardized element sequence, 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; 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, and the specific steps are 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.
7. The method for supporting online real-time editing of million-level vector data according to claim 6, characterized in that: The element change coordinates in the verification structured operation log are verified in combination with the adjacency, connectivity and conflict-free inclusion relationship of the topological snapshot index, a processing patch is generated by identifying a topological breakpoint and performing spatial interpolation connection, and the specific steps are as follows, The element change coordinates in the operation log are compared with the adjacency, connectivity and conflict-free inclusion relationship of the topological snapshot index, and the topological breakpoint list is obtained by locating the breakpoint; According to the breakpoint type in the topological breakpoint list, a geometric repair patch is generated by using an interpolation algorithm.
8. The method for supporting online real-time editing of million-level vector data according to claim 6, 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. 9.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-8.
10. 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-8.
Citation Information
Patent Citations
High-performance pipe network data online editing method and system
CN117591519A
BIM rapid lightweight method
CN118799529A
GIS spatial data processing system and method
CN120123451A
Intelligent visual management method and system for enterprise big data
CN120144416A
Vector geographic element collaborative update management method, device and medium
CN120492468A
Cited By
Log collection method, system and device based on MQTT protocol and medium
CN121711241A
