Method and system for automatically extracting coordinates and elevations of points of a planar drilling pattern
By analyzing and allocating borehole points, numbering labels, and elevation control points in the borehole layout map, the problems of omission and mismatch in the automatic extraction of borehole numbers, plane coordinates, and elevations were solved, achieving efficient, accurate data extraction and consistent output.
Patent Information
- Application Number
- CN202611111561.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-08-25
AI Technical Summary
Existing technologies have low efficiency in automatically extracting borehole numbers, plane coordinates, and elevations from borehole layout maps in geotechnical engineering investigation, municipal road and building foundation engineering. They are prone to omissions, mismatches, and duplicate entries, and it is difficult to guarantee a one-to-one correspondence between the numbering labels, resulting in inconsistencies in elevation control points.
By parsing the planar borehole layout map in DWG or DXF format, borehole point records, annotation records, and elevation control point sets are generated. The candidate range is determined by the local point spacing and the text height on the drawing. An initial correspondence is established and candidate matching costs are generated. Global one-to-one allocation is performed, and ambiguous clusters are allocated in a secondary manner. A triangulation network is constructed for elevation interpolation, and the borehole number, planar coordinates, and interpolated elevation are output.
It improves the accuracy and efficiency of borehole data extraction, reduces omissions and mismatches, ensures the consistency of borehole number, plane coordinates and elevation, and outputs quality inspection information for easy review and traceability.
Smart Images

Figure CN122636735A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of engineering survey drawing data processing technology, specifically to a method and system for automatically extracting the coordinates and elevations of planar borehole layout points. Background Technology
[0002] In geotechnical engineering investigation, municipal road construction, traffic engineering, and building foundation engineering, it is often necessary to organize borehole numbers, planar coordinates, and corresponding elevations based on a planar borehole layout map to form a borehole layout result table. Existing planar borehole layout maps are mostly drawn in DWG or DXF format. Borehole points, borehole numbers, and elevation control points may be stored as point entities, text entities, or block reference entities, distributed in model space or different block definitions. Due to differences in drafting habits, layer settings, text offset direction, scale, and entity organization methods across different projects, the distance or direction between borehole points and their numbering labels is not always fixed.
[0003] Current technologies primarily rely on manual point-by-point searching, copying, and verification in CAD drawings, or using simple rules such as fixed search radius and nearest distance to match borehole points with their assigned numbers. This manual processing is labor-intensive and prone to omissions, mismatches, and duplicate entries. Furthermore, simple rules can easily lead to incorrect assignment of adjacent numbers to borehole points when there is dense borehole layout, overlapping text, inconsistent local label offsets, or repeated extraction of the same graphic element via different paths, and it's difficult to guarantee a one-to-one correspondence between numbers and labels. In addition, elevation control points may have inconsistent elevations at the same location, there may be insufficient control points, or boreholes may be outside the effective interpolation range. Current methods typically require separate elevation calculations and manual verification, resulting in a disconnect between coordinate extraction, number matching, and elevation assignment, leading to inconsistencies in results and reduced processing efficiency.
[0004] Therefore, how to accurately and reliably extract borehole numbers, planar coordinates, and elevations from a planar borehole layout map, and effectively identify ambiguous matches, duplicate records, and abnormal data, has become a technical problem that needs to be solved in this field. Summary of the Invention
[0005] This application provides a method and system for automatically extracting the coordinates and elevation of planar borehole locations, in order to at least solve some of the technical problems existing in the related technologies described above.
[0006] According to a first aspect of the embodiments of this application, an automatic method for extracting the coordinates and elevation of planar borehole locations is provided, including: Parse the DWG or DXF format planar borehole layout map to generate borehole point records, annotation records, and a set of elevation control points; Based on the local point spacing of the borehole point record and the text height of the annotation record, the candidate range is determined and the candidate annotation set is filtered. An initial correspondence is established based on the borehole point records and annotation records that are closest to each other and have the same extraction path, and the local annotation offset is determined based on the initial correspondence. Based on the spatial relationship, textual features, and source relationship between borehole point records and annotation records in the candidate annotation set, candidate matching costs are generated in conjunction with local annotation bias; global one-to-one allocation is performed based on the candidate matching costs to obtain the initial allocation results; Ambiguous clusters are identified from borehole point records and annotation records with shared candidate relationships. Template correspondences are filtered based on the alternative allocation cost of the correspondences around the ambiguous clusters, and local annotation templates are formed. Based on the candidate matching cost, the deviation relative to the local annotation template, and the intersection of matching line segments, secondary allocation is performed on the ambiguous clusters to obtain borehole data records. A triangulation network is constructed based on the set of elevation control points. Elevation interpolation is performed on the plane coordinates in the borehole data records, and the borehole number, plane coordinates and interpolated elevation are output.
[0007] As an optional approach, the local point spacing is obtained as follows: based on the borehole point records, the planar distances between each borehole point and its nearest predetermined number of other borehole points are obtained, and the median of each planar distance is taken; the median of the text heights of all annotation records with text heights is taken as the drawing text height; the spatial scale is determined according to the local point spacing and the drawing text height; the candidate range is determined according to the candidate range coefficient and the spatial scale; and the annotation records within the candidate range are added to the candidate annotation set.
[0008] As an optional approach, the initial correspondence consists of borehole point records and annotation records that are the closest to each other, have the same extraction path, and have consistent block reference instance relationships. The annotation bias vector pointing from the planar coordinates of the borehole point record to the planar coordinates of the annotation record in each initial correspondence is calculated. Within a local neighborhood centered on the borehole point record and whose range is determined by the distance between corresponding local points, the median of the two coordinate components of the annotation bias vector is taken to obtain the local annotation bias.
[0009] As an optional approach, the spatial relationship includes planar distance and label offset difference, the text features include text height difference and text angle difference, and the source relationship includes extracted path relationship and block reference instance relationship; the spatial relationship, text features and source relationship are respectively processed to be dimensionless and the candidate matching cost is synthesized according to weight.
[0010] As an optional approach, the global one-to-one allocation includes: constructing an allocation matrix with borehole point records as rows and labeled records and unmatched virtual records as columns; writing the candidate matching costs into the corresponding matrix elements; setting a prohibition cost for non-candidate relationships; setting an unmatching cost for borehole point records and their corresponding unmatched virtual records; and using a linear sum allocation algorithm to obtain the initial allocation result. The prohibition cost is higher than the upper bound of the total cost of any allocation scheme that does not contain non-candidate relationships, and the unmatching cost is determined based on the distribution of candidate matching costs for verified correct and incorrect correspondences.
[0011] As an optional approach, the ambiguous cluster is a connected component formed by connecting candidate relationships and includes at least two borehole point records and two annotation records. For the selected correspondence in the initial allocation result, the initial minimum total cost of the ambiguous cluster is obtained. After prohibiting the selected correspondence, reassignment is carried out and an alternative minimum total cost is obtained. The matching confidence is determined based on the increment of the alternative minimum total cost relative to the initial minimum total cost. The confidence threshold is calibrated using the harmonic mean of the accuracy and recall of the verified incorrect correspondence as the evaluation index. The correspondence with the matching confidence reaching the confidence threshold is determined as the template correspondence.
[0012] As an optional approach, template correspondences around the ambiguous cluster are collected, and the median of the two coordinate components of the labeling bias vector of the template correspondence is taken to form the local labeling template. For feasible one-to-one allocation schemes within the ambiguous cluster, a secondary judgment target value is formed based on the candidate matching cost, the deviation of each correspondence relative to the local labeling template, and the number of matching line segment intersections. The feasible one-to-one allocation scheme with the lowest secondary judgment target value is selected to replace the initial allocation result, and the borehole data record is generated based on the replaced initial allocation result.
[0013] As an optional approach, the extraction path includes a block reference path and a model space scatter path. Drilling data records from different extraction paths with a planar distance not exceeding the coordinate merging tolerance are grouped into a duplicate record group. When the drilling numbers in the duplicate record group are the same, the drilling data record with the lowest candidate matching cost is retained. When the drilling numbers are different, the template correspondences around the duplicate record group are collected to form a local annotation template. The comprehensive verification cost is determined based on the candidate matching cost and the deviation relative to the local annotation template. The drilling data record with the lowest comprehensive verification cost is retained, and the remaining drilling data records are written into the matching quality inspection data.
[0014] As an optional approach, the set of elevation control points is generated from the inserted entities with non-zero elevations in the GCD layer. For elevation control points with the same planar coordinates and whose elevation differences do not exceed the project's elevation difference limit, the average elevation is taken. Elevation control points whose elevation differences exceed the project's elevation difference limit are written into the elevation quality inspection data and removed from the set of elevation control points. A Deloitte triangulation is constructed based on the processed set of elevation control points. When the planar coordinates recorded in the borehole data are within the triangle of the Deloitte triangulation, linear interpolation of the centroid coordinates is performed based on the three vertices of the triangle. When the coordinates are outside the convex hull of the Deloitte triangulation, the interpolated elevation is set to empty and the out-of-range status is recorded.
[0015] According to a second aspect of the embodiments of this application, an automatic extraction system for planar borehole layout coordinates and elevations is also provided, comprising: The drawing parsing module is used to parse DWG or DXF format planar borehole layout drawings and generate borehole point records, annotation records, and sets of elevation control points. The candidate annotation filtering module is used to determine the candidate range and filter the candidate annotation set based on the local point spacing of the borehole point record and the text height of the annotation record. The local annotation offset determination module is used to establish an initial correspondence between borehole point records and annotation records that are the closest to each other and have the same extraction path, and to determine the local annotation offset based on the initial correspondence. The initial allocation module is used to generate candidate matching costs based on the spatial relationship, textual features, and source relationship between borehole point records and annotation records in the candidate annotation set, combined with local annotation bias; and to perform global one-to-one allocation based on the candidate matching costs to obtain the initial allocation results. The secondary allocation module is used to identify ambiguous clusters from borehole point records and annotation records with shared candidate relationships, filter template correspondences based on the alternative allocation cost of the corresponding relationships around the ambiguous clusters, and form local annotation templates. Based on the candidate matching cost, the deviation relative to the local annotation templates, and the intersection of matching line segments, the ambiguous clusters are allocated in a secondary manner to obtain borehole data records. The elevation interpolation module is used to construct a triangulation network based on a set of elevation control points, perform elevation interpolation on the plane coordinates in the borehole data records, and output the borehole number, plane coordinates, and interpolated elevation.
[0016] This application analyzes borehole points, numbering labels, and elevation control points in a planar borehole layout map. It adaptively determines the candidate range based on local point spacing and drawing text height, and uses local label offset to constrain the spatial correspondence between borehole points and numbering labels, reducing omissions and mismatches caused by changes in drawing scale, layout density, and label position. Furthermore, it uses spatial relationships, text features, and element source relationships to form candidate matching costs, and avoids duplicate assignment of the same number by multiple borehole points through global one-to-one allocation. For areas with complex local candidate relationships, it combines reliable surrounding correspondences to form local label templates and performs secondary allocation for ambiguous correspondences, thereby improving matching accuracy in dense layout and cross-labeling scenarios. By merging and verifying duplicate records generated by different extraction paths and removing abnormal elevation control points, a triangulation network is constructed for elevation interpolation, maintaining consistency between borehole numbers, planar coordinates, and elevations. It also outputs quality inspection information such as mismatches, number conflicts, and elevation anomalies, facilitating review and traceability, thus improving the efficiency of borehole data processing and the reliability of results.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Furthermore, no embodiment in this disclosure is required to achieve all the effects described above. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0019] Figure 1 This is a flowchart illustrating an automatic extraction method for planar borehole layout coordinates and elevations provided in an embodiment of this disclosure.
[0020] Figure 2 A flowchart for obtaining the initial allocation result provided in an embodiment of this disclosure.
[0021] Figure 3 This is a schematic diagram of the secondary allocation process provided in an embodiment of this disclosure.
[0022] Figure 4 This is a schematic block diagram of an automatic extraction system for planar borehole layout coordinates and elevations provided in an embodiment of this disclosure.
[0023] Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0025] This implementation method is applicable to the processing of planar borehole layout maps in geotechnical engineering investigation, municipal roads, traffic engineering, and building foundation engineering. The input file is a DWG or DXF format file. The map uses a ZDH layer to store borehole points and borehole numbers, and a GCD layer to store topographic elevation control points. Borehole points are represented by POINT entities, borehole numbers by TEXT or MTEXT entities, and elevation control points by INSERT entities with non-zero Z-coordinates. The running device is a computer capable of accessing CAD format conversion components, configured with a Python runtime environment, DXF parsing components, numerical calculation components, and table generation components.
[0026] The implementation process of the method described in this application will be described in detail below with reference to specific embodiments. It should be noted that this embodiment is only used to explain this application and is not intended to limit the scope of protection of this application. Conventional adjustments or substitutions of each step by those skilled in the art without departing from the concept of this application should be included in the scope of protection of this application.
[0027] Please see Figure 1 , Figure 1 This is a flowchart of an automatic extraction method for planar borehole layout coordinates and elevations according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes the following steps: S1, parse the planar borehole layout map in DWG or DXF format, and generate borehole point records, annotation records and elevation control point sets; S2. Based on the local point spacing of the borehole point record and the text height of the annotation record, determine the candidate range and filter the candidate annotation set; S3, establish an initial correspondence between borehole point records and annotation records that are closest to each other and have the same extraction path, and determine the local annotation offset based on the initial correspondence; S4. Based on the spatial relationship, textual features, and source relationship between the borehole point records and the annotation records in the candidate annotation set, and combined with the local annotation bias, generate candidate matching costs; perform global one-to-one allocation based on the candidate matching costs to obtain the initial allocation results; S5. Identify ambiguous clusters from borehole point records and annotation records with shared candidate relationships. Filter template correspondences based on the alternative allocation cost of the corresponding relationships around the ambiguous clusters and form local annotation templates. Perform secondary allocation on the ambiguous clusters based on the candidate matching cost, the deviation from the local annotation templates, and the intersection of matching line segments to obtain borehole data records. S6 constructs a triangulation network based on the set of elevation control points, performs elevation interpolation on the plane coordinates in the borehole data record, and outputs the borehole number, plane coordinates, and interpolated elevation.
[0028] In some embodiments, for step S1, the task handler identifies the file format of the planar borehole layout diagram. When the input is a DWG format file, the format conversion component calls the CAD application to perform graphic checks, redundant object cleanup, and DXF export, generating a DXF format file such as the R2010 version. If the input is already a DXF format file, it directly proceeds to primitive parsing. After conversion, it checks that the output file exists and its length is greater than 0, and then closes the CAD application.
[0029] The DXF parsing component reads the model space and all block definitions, retrieving ZDH and GCD layers by case-insensitive layer names. For ZDH layer POINT entities in model space, their world coordinates are read directly. For ZDH layer POINT entities in block definitions, the translation, rotation, and scaling parameters of the corresponding INSERT entity are read, and the local coordinates are converted to world coordinates using a block reference transformation matrix. Each POINT entity generates a drill point record, which includes a record identifier, X coordinate, Y coordinate, extraction path, and block reference instance identifier. The extraction path indicates whether the primitive comes from a block reference path or a model space scatter path; the block reference instance identifier is used to distinguish different INSERT entities defined in the same block in model space, and the block reference instance identifier corresponding to the model space scatter path is null.
[0030] For TEXT and MTEXT entities in the ZDH layer, the DXF parsing component reads the number text, insertion point coordinates, text height, and text rotation angle, and removes format control characters in the MTEXT entity that do not change the semantics of the number. When the text insertion point is located in a block definition, it is converted to world coordinates through a block reference transformation matrix. Each text entity generates a label record, including a label record identifier, borehole number text, X coordinate, Y coordinate, text height, text rotation angle, extraction path, and block reference instance identifier.
[0031] For INSERT entities in a GCD layer, the DXF parsing component reads their world coordinates X, Y, and Z, and writes entities with non-zero Z coordinates into the elevation control point set. Each record in the elevation control point set includes X coordinate, Y coordinate, and elevation. The parser reads the insertion unit identifier from the DXF header variable and converts the coordinates, text height, and elevation to meters. If the insertion unit identifier is missing, it reads the drawing unit from the project task parameters. If the project task parameters also do not provide a drawing unit, it stops processing the current file to prevent length data in different units from being included in subsequent calculations.
[0032] For example, if the insertion point of a block reference instance is 100 meters east and 200 meters north, and the local coordinates of the POINT entity within the block are 2 meters east and 3 meters north, and the world coordinates of the borehole point record are 102 meters east and 203 meters north when there is no rotation and the scaling ratio is 1; if the local coordinates of the TEXT entity within the same block are 4.5 meters east and 4 meters north, the world coordinates of the annotation record are 104.5 meters east and 204 meters north. The three types of parsing results are respectively entered into candidate generation, number matching, and elevation interpolation.
[0033] In some embodiments, for step S2, the candidate generation program takes all borehole point records as input. For any borehole point record, it calculates the planar Euclidean distance between that borehole point record and other borehole point records. A predetermined number of borehole point records are selected according to their distances from smallest to largest. The median of the selected planar distances is then taken as the local point spacing of the current borehole point record. The local point spacing represents the spatial scale of the borehole arrangement surrounding the current borehole point record, in meters. The predetermined number is determined through parameter search based on verified correspondences, with candidate values ranging from 3 to 8. If the total number of borehole point records is insufficient, it is adjusted to the total number of borehole point records minus 1. When there is only one borehole point record in the figure, the median of its planar distances to all marked records is taken.
[0034] Specifically, the spacing between local points is calculated using the following formula:
[0035] in,( ) represents the local point spacing recorded at the (i)th borehole point; )and( ) represents the X and Y coordinates recorded at the (i)th borehole point; )and( () represents the X and Y coordinates recorded at the nearest borehole points; ) represents the record closest to the (i)th borehole point. Record of ) drilling points.
[0036] Meanwhile, the candidate generation program filters all annotation records for those with a text height greater than 0, and takes the median text height as the drawing text height. The drawing text height represents the typical height of the borehole number characters in the current drawing, in meters. Annotation records with a text height of 0 or missing are still retained in the annotation record set, but are not included in the drawing text height statistics.
[0037] In one example, the planar distances between a certain borehole point record and the five most recent borehole point records are 18.0 meters, 19.5 meters, 20.0 meters, 21.0 meters, and 24.0 meters, respectively, with a local point spacing of 20.0 meters; the effective text heights are 1.8 meters, 2.0 meters, 2.0 meters, 2.1 meters, and 2.2 meters, respectively, with a drawing text height of 2.0 meters.
[0038] In one embodiment, the candidate generation program determines the spatial scale based on the local point spacing and the text height on the drawing, and then determines the candidate range based on the spatial scale and the candidate range coefficient.
[0039] Spatial dimensions are calculated using the following formula:
[0040] in,( ) represents the spatial scale recorded at the (i)th borehole point; ) indicates the distance between local points; () indicates the height of the text on the drawing. The candidate range is calculated using the following formula:
[0041] in,( ) represents the candidate range radius recorded at the (i)th borehole point; () represents the candidate range coefficient, which takes a value greater than 0 and is dimensionless; () indicates spatial scale.
[0042] The candidate range coefficient and the predetermined quantity are searched using the same set of verified correspondences. Verified correspondences refer to genuine correspondences confirmed manually. The program establishes a candidate annotation set for each set of parameters and calculates the proportion of genuine annotation records entering the candidate annotation set. Among combinations where this proportion meets the project's allowable omission rate requirement, the combination with the lowest average number of candidates is selected. When the project's allowable omission rate is 0.5%, the proportion must be at least 99.5%. When there are no historical samples, the closest corresponding relationships with the same extraction path and consistent block reference instance relationships are extracted from the current drawing, and samples are formed after manual sampling.
[0043] For each borehole point record, the candidate generation program calculates the planar distance between it and all annotation records. Annotation records with a planar distance not greater than the candidate range radius are written into the candidate annotation set of that borehole point record. Annotation records with a planar distance greater than the candidate range radius do not participate in the subsequent candidate matching cost calculation of that borehole point record, but can still enter the candidate annotation set of other borehole point records.
[0044] For example, when the spacing between local points is 20.0 meters, the height of the text on the drawing is 2.0 meters, and the candidate range coefficient is 0.45, the spatial scale is approximately 20.10 meters, and the radius of the candidate range is approximately 9.05 meters; when the planar distances of the three annotation records are 3.20 meters, 7.50 meters, and 11.00 meters, the first two will enter the candidate annotation set, while the third will not.
[0045] In some embodiments, for step S3, the initial correspondence generation program performs two nearest neighbor searches. Specifically, the first search uses borehole point records as the query object and finds the annotation record with the closest planar distance among all annotation records; the second search uses annotation records as the query object and finds the borehole point record with the closest planar distance among all borehole point records. When the borehole point record and the annotation record are the closest to each other, have the same extraction path, and have consistent block reference instance relationships, an initial correspondence is established between them. Consistent block reference instance relationships mean that both come from scattered paths in the model space, or both come from the same block reference instance.
[0046] The initial correspondence is used to calculate the offset of borehole numbers relative to borehole points and is not directly used as the final matching result. The "nearest" condition restricts the nearest relationships in two directions, and the extraction of path and block reference instance relationships excludes irrelevant combinations in different cartographic structures.
[0047] For example, if the distances between borehole record P1 and annotation records T1 and T2 are 2.8 meters and 4.0 meters respectively, and the nearest annotation record to P1 is T1; and the distances between annotation record T1 and borehole records P1 and P2 are 2.8 meters and 3.6 meters respectively, and the nearest borehole record to T1 is also P1, and P1 and T1 come from the same reference instance, then P1 and T1 form an initial correspondence. If the nearest borehole record to T1 is P2, then P1 and T1 do not form an initial correspondence.
[0048] For each initial correspondence, the bias statistics program subtracts the planar coordinates of the borehole point records from the planar coordinates of the annotation records to obtain the annotation bias vector:
[0049] in, This represents the annotation offset vector between the borehole point record and the annotation record; and This represents the X and Y coordinates of the borehole point record; and This indicates the X and Y coordinates of the labeled record.
[0050] The bias statistics program collects initial correspondences within a local neighborhood determined by the local point spacing, centered on the current borehole point record. The local neighborhood radius is the product of the local point spacing and the neighborhood range coefficient, which is determined through parameter search of verified correspondences, with candidate values ranging from 1.5 to 4.0. During parameter search, the average normalized difference between the local annotation bias and the verified true annotation bias is calculated for each candidate value, and the candidate value with the smallest average normalized difference is selected.
[0051] When there are at least three initial correspondences collected, the median of the horizontal and vertical components of the annotation bias vector is taken to obtain the local annotation bias of the current borehole point record; when there are fewer than three, the median of the horizontal and vertical components of all initial correspondences is taken. The local annotation bias represents the typical direction and distance of the surrounding numbered text of the current borehole point record relative to the borehole point, and participates in the candidate matching cost calculation.
[0052] In one example, the annotation bias vectors for the five initial correspondences within the local neighborhood are 2.8m and 1.9m, 3.1m and 2.0m, 3.0m and 2.2m, 2.9m and 2.1m, and 8.5m and -1.0m, respectively. Taking the median of the horizontal and vertical components, the local annotation biases are 3.0m and 2.0m, respectively. The last initial correspondence differs significantly from the others, but the median of the components is still determined by the majority correspondences.
[0053] In some embodiments, for step S4, Figure 2 A flowchart for obtaining the initial allocation result provided in this embodiment of the disclosure is shown below. Figure 2 As shown, in step S201, candidate matching costs are generated based on the spatial relationship, textual features, and source relationship between the borehole point records and the annotation records in the candidate annotation set, combined with the local annotation bias.
[0054] Specifically, the candidate matching cost calculation program traverses the borehole point records and their candidate annotation sets. Spatial relationships include planar distance and annotation offset differences; textual features include text height differences and text angle differences; source relationships include extraction path relationships and block reference instance relationships; all data come from borehole point records, annotation records, candidate ranges, and local annotation offsets.
[0055] Among them, the planar distance feature is obtained by the ratio of the planar distance between the borehole point record and the annotation record to the radius of the corresponding candidate range; the annotation offset difference feature is obtained by the ratio of the magnitude of the difference vector between the current candidate combination's annotation offset vector and the local annotation offset to the spatial scale; the text height difference feature is obtained by the ratio of the absolute difference between the text height of the candidate annotation record and the text height of the drawing to the text height of the drawing; and the text angle difference feature is obtained by the ratio of the minimum circumferential angle difference between the text rotation angle of the candidate annotation record and the dominant text angle of all annotation records to the circumferential half angle.
[0056] The candidate matching cost is calculated according to the following formula:
[0057] in, Let $\frac{i}{j}$ represent the candidate matching cost between the (i)th borehole point record and the (j)th annotation record. , , , , and The following are represented in sequence: planar distance features, annotation offset difference features, text height difference features, text angle difference features, extraction path relationships, and block reference instance relationships; , , , , and Each weight is not less than 0 and the sum is 1.
[0058] In this process, each weight is enumerated using verified correspondences. Taking 0.05 as an example, weight combinations with a total sum of 1 are enumerated. Each weight group is assigned one-to-one, and the proportion of correct correspondences is calculated. When the proportions are the same, the combination with fewer unmatched numbers and fewer ambiguous clusters is selected in turn. When the mapping specifications change, the newly added verified correspondences are used for recalibration.
[0059] For example, with weights of 0.35, 0.30, 0.10, 0.05, 0.10, and 0.10 respectively, candidate combination A has six features with weights of 0.30, 0.10, 0.05, 0, 0, and 0, resulting in a candidate matching cost of 0.14. Candidate combination B has six features with weights of 0.42, 0.35, 0.05, 0.10, 0, and 0, resulting in a candidate matching cost of 0.262. Although candidate combination B is still within the candidate range, its planar distance and label bias difference are higher than those of candidate combination A, thus incurring a higher cost in subsequent allocations.
[0060] In step S202, a global one-to-one allocation is performed based on the candidate matching costs to obtain the initial allocation result. Specifically, the allocation procedure constructs an allocation matrix with borehole point records as rows and annotation records and unmatched virtual records as columns. Unmatched virtual records refer to calculated columns that do not correspond to any drawing entity and only indicate that the borehole point record is not paired with the actual annotation record. For annotation records in the candidate annotation set, the candidate matching cost is written to the corresponding matrix element; for actual annotation records that do not belong to the candidate annotation set, a prohibition on allocation cost is written; for borehole point records and their corresponding unmatched virtual records, an unmatched cost is written, and a prohibition on allocation cost is written between them and other unmatched virtual records.
[0061] The prohibition cost is determined based on the number of borehole point records, the maximum candidate matching cost, and the unmatched cost, and is higher than the upper bound of the total cost of any allocation scheme that does not contain non-candidate relationships. The unmatched cost is determined based on the distribution of candidate matching costs for verified correct and incorrect correspondences; when the two cost distributions are separate, the average of adjacent quantiles is taken; when they overlap, the candidate value with the largest sum of the retention rate of correct correspondences and the rejection rate of incorrect correspondences is selected.
[0062] For example, if the cost of a 95th percentile candidate match with a verified correct correspondence is 0.28, and the cost of a 5th percentile candidate match with a verified incorrect correspondence is 0.36, then the cost for a non-match is 0.32. If a drawing contains 3 borehole point records and the maximum candidate match cost is 0.40, then the prohibition allocation cost can be set to a value greater than 4 times 0.40, such as 1.70. The allocation program calls the linear sum allocation algorithm to solve for the minimum total cost of the allocation matrix and outputs the initial allocation results; each borehole point record is allocated at most one real annotation record, and each real annotation record is allocated at most one borehole point record. Borehole point records allocated to unmatched virtual records are recorded as unmatched.
[0063] As an example, the candidate matching costs for the three borehole point records and the three real annotation records are as follows: the first row has costs of 0.12, 0.28, and the prohibition cost; the second row has costs of 0.18, 0.16, and 0.40; and the third row has the prohibition cost, costs of 0.22, and 0.14. When the non-matching cost is 0.32, the linear sum allocation algorithm selects the first column of the first row, the second column of the second row, and the third column of the third row, resulting in an initial total cost of 0.42. This allocation result adheres to the column uniqueness constraint, preventing two borehole point records from sharing the same annotation record.
[0064] In some embodiments, for step S5, Figure 3 This is a schematic diagram of the secondary allocation process provided in the embodiments of this disclosure, such as... Figure 3 As shown, in step S301, ambiguous clusters are identified and template correspondences are filtered.
[0065] Specifically, the allocation procedure treats borehole point records as first-class nodes and annotation records as second-class nodes, establishing candidate edges between each borehole point record and each annotation record in its candidate annotation set. When a connected component formed by these candidate edges simultaneously contains at least two borehole point records, at least two annotation records, and nodes connected by more than two candidate edges, the connected component is identified as an ambiguous cluster. An ambiguous cluster represents a local region where multiple borehole point records and multiple annotation records have overlapping candidate relationships.
[0066] For each selected correspondence located within an ambiguous cluster in the initial allocation result, first obtain the initial minimum total cost of the ambiguous cluster, then prohibit the selected correspondence and re-execute the linear sum allocation algorithm to obtain the alternative minimum total cost.
[0067] The matching confidence is determined based on the increment of the alternative minimum total cost relative to the initial minimum total cost:
[0068] in, This represents the matching confidence of the (i)th selected corresponding relationship; Represents the initial minimum total cost of the ambiguous cluster; This indicates the minimum total cost of substitution after prohibiting the selection of the (i)th correspondence; This indicates the machine precision of the floating-point number type used by the computing device.
[0069] The confidence threshold is determined by verifying erroneous match relationships. For different candidate thresholds, the accuracy and recall of erroneous match relationship identification are statistically analyzed, and their harmonic mean is calculated. The candidate threshold with the largest harmonic mean is taken as the confidence threshold. Selected match relationships that reach the confidence threshold are determined as template match relationships, while selected match relationships that do not reach the confidence threshold are retained in the ambiguous cluster and undergo secondary allocation.
[0070] For example, the initial minimum total cost of a certain ambiguous cluster is 0.46, the minimum total cost of substitution after disabling a selected correspondence is 0.70, and the matching confidence is approximately 0.522. When the calibrated confidence threshold is 0.12, the selected correspondence is determined to be a template correspondence. The minimum total cost of substitution corresponding to another selected correspondence is 0.48, and the matching confidence is approximately 0.043. Because it does not reach the confidence threshold, it enters secondary allocation.
[0071] In step S302, a local annotation template is formed and a secondary allocation of ambiguous clusters is performed. In one embodiment, the secondary allocation procedure collects template correspondences around the ambiguous cluster, where the center of the ambiguous cluster is the arithmetic mean of the X and Y coordinates of all borehole point records within the cluster, and the collection range is determined by the median of the local point spacing within the cluster and the neighborhood range coefficient; template correspondences within the collection range that do not belong to the current object to be reassigned are added to the template set. The median of the horizontal and vertical components of the annotation bias vector in the template set is taken respectively to form a local annotation template. The local annotation template refers to the typical text bias vector reflected by the filtered correspondences around the ambiguous cluster. When there are no template correspondences around the cluster, the median of the annotation bias vector components of all initial correspondences is used.
[0072] For any candidate correspondence within an ambiguous cluster, the secondary allocation procedure calculates the magnitude of the difference vector between its annotation bias vector and the local annotation template, and divides it by the corresponding spatial scale to obtain the bias relative to the local annotation template. Subsequently, for each feasible one-to-one allocation scheme, the candidate matching cost within the scheme is added to the weighted bias, and a penalty value corresponding to the number of intersections of matching line segments is added to form the secondary judgment target value:
[0073] in, This indicates a feasible one-to-one allocation scheme. The secondary determination of the target value; Indicates the cost of candidate matching; This indicates the deviation of the candidate correspondence from the local annotation template; Indicates the number of intersections of the matched line segments; Indicates the template deviation coefficient; This represents the cross-penalty coefficient.
[0074] Template bias coefficient and cross-penalty coefficient are enumerated by parameters through verified ambiguity clusters, with candidate values increasing by 0.05 between 0 and 1; a secondary allocation is performed on each group of coefficients, selecting the combination with the highest proportion of true correspondence, and if the proportions are the same, selecting the combination with the smaller secondary judgment target value.
[0075] Specifically, when the number of borehole point records contained in an ambiguous cluster does not exceed the precise enumeration size threshold, all allocation schemes that satisfy the candidate edge constraints and one-to-one constraints are enumerated, and the scheme with the lowest secondary judgment target value is selected. When the number exceeds the precise enumeration size threshold, starting from the initial allocation result, the label records corresponding to two borehole point records are swapped one by one. The swap is only accepted if the candidate edge constraints are still satisfied after the swap and the secondary judgment target value decreases, until no swap is accepted in a complete round. The precise enumeration size threshold is determined based on the evaluation time of a single scheme and the allowable processing time of a single cluster measured by the operating equipment. For example, when the evaluation time of a single scheme is 20 microseconds and the allowable processing time of a single cluster is 1 second, the precise enumeration size threshold can be taken as 8.
[0076] In one example, the ambiguous cluster contains borehole point records P1 and P2 and annotation records T1 and T2. Scheme 1 assigns P1 to T1 and P2 to T2, with a sum of candidate matching costs of 0.30, a sum of deviations from the local annotation template of 0.10, and 0 matching segment intersections. Scheme 2 assigns P1 to T2 and P2 to T1, with a sum of candidate matching costs of 0.27, a sum of deviations from the local annotation template of 0.28, and 1 matching segment intersection. When the template deviation coefficient is 0.30 and the intersection penalty coefficient is 0.08, the secondary decision target value for Scheme 1 is 0.33, and for Scheme 2 it is 0.434. The secondary allocation selects Scheme 1 and replaces the initial allocation result.
[0077] After the secondary allocation is completed, borehole data records are generated based on the replaced initial allocation results. These records include borehole number, X-coordinate, Y-coordinate, candidate matching cost, matching confidence, extraction path, and block reference instance identifier. The borehole number comes from the annotation record, and the X-coordinate and Y-coordinate come from the borehole point record. Borehole point records assigned to unmatched virtual records and unselected annotation records are written into the matching quality inspection data.
[0078] In some embodiments, duplicate records of borehole data from different extraction paths are merged; specifically, block reference paths and model space scatter paths may generate borehole data records with similar planar positions, and the record merging program determines the coordinate merging tolerance based on the drawing text height and coordinate merging coefficient.
[0079] in, Indicates the coordinate merging tolerance; Indicates the coordinate merging coefficient; This indicates the height of the text on the drawing. The coordinate merging coefficient is determined based on the distribution of the ratio of the planar distance to the text height of verified duplicate records, taking the quantile value corresponding to the percentage of duplicate records allowed to be omitted from merging in the project. For example, if 1% of verified duplicate records are allowed not to be automatically merged, the 99th quantile value is used. When there are no historical samples, records with the same borehole number, different extraction paths, and similar planar positions are extracted from the current drawing, and these are manually verified to form a sample.
[0080] In one embodiment, borehole data records from different extraction paths and whose planar distance does not exceed the coordinate merging tolerance are grouped into the same duplicate record group. When the borehole numbers within the duplicate record group are the same, the borehole data record with the lowest candidate matching cost is retained, and the extraction paths of the other borehole data records are appended to the source information of the retained record. When the borehole numbers are different, the record merging program collects the template correspondences around the duplicate record group and forms a local annotation template. Then, it determines the comprehensive verification cost based on the candidate matching cost of each borehole data record and the deviation of its annotation bias vector relative to the local annotation template. The comprehensive verification cost is the sum of the deviations after weighting the aforementioned candidate matching costs and template deviation coefficients. The borehole data record with the lowest comprehensive verification cost is retained, and the remaining borehole data records are written into the matching quality inspection data.
[0081] For example, the text height on the drawing is 1.00 meter, the coordinate merging coefficient is 0.05, and the coordinate merging tolerance is 0.05 meters. The block reference path yields borehole data record ZK12, and the model space scatter path yields borehole data record ZK21 at a distance of 0.03 meters. Both are placed in the same duplicate record group. The candidate matching costs for the two borehole data records are 0.14 and 0.20 respectively, their deviations from the local annotation template are 0.10 and 0.25 respectively, and the template deviation coefficient is 0.30. Therefore, the comprehensive verification costs are 0.17 and 0.275 respectively. The borehole data record with borehole number ZK12 is retained, and the other record is added to the matching quality inspection data. After the duplicate records are merged, the retained borehole data records form the query point set for elevation interpolation.
[0082] In some embodiments, for step S6, the elevation processing program first merges elevation control points with the same plane coordinates according to the X and Y coordinates. For multiple elevation control points under the same plane coordinates, the difference between the maximum and minimum elevations is calculated. If the elevation difference does not exceed the project's elevation difference limit for the same point, the arithmetic mean of the multiple elevations is taken as the elevation of that location. If the elevation difference exceeds the project's elevation difference limit for the same point, the corresponding elevation control point is written into the elevation quality inspection data and removed from the elevation control point set. The project's elevation difference limit for the same point (allowable elevation difference error) is one of the core standards for measuring whether the measurement accuracy meets the standards. It refers to the maximum allowable difference between the maximum and minimum elevation values of multiple elevation control points at the same plane coordinates. If this limit is exceeded, the measurement needs to be remeasured. Optionally, it can be directly read according to the mapping level and result accuracy requirements adopted by the project, for example, it can be configured to be 0.10 meters.
[0083] For example, if there are three elevation values of 10.02 meters, 10.05 meters, and 10.08 meters under the same plane coordinates, the elevation difference limit for the same point in the project is 0.10 meters, the elevation difference is 0.06 meters, and the average elevation is taken as 10.05 meters; if the elevation values are 10.02 meters, 10.05 meters, and 10.30 meters, and the elevation difference is 0.28 meters, then the elevation control point at that location will be included in the elevation quality inspection data and will not participate in the triangulation network construction.
[0084] When the set of elevation control points retains at least 3 non-collinear elevation control points, the elevation processing program constructs a two-dimensional Deloitte triangulation using X and Y coordinates. The input is a two-dimensional array composed of the plane coordinates of the elevation control points, and the output is a set of triangle vertex indices. When there are fewer than 3 elevation control points or all of them are collinear, no triangulation is constructed, and the status of insufficient control points is recorded.
[0085] For each borehole data record, the elevation processing program uses the X and Y coordinates as query points to locate the corresponding triangle in the Delaunay triangulation. When the query point is located inside or on the boundary of the triangle, the centroid coordinates are calculated based on the planar coordinates of the query point and the three triangle vertices. Then, linear interpolation of the centroid coordinates is performed on the elevations of the three vertices.
[0086] in, and This represents the X and Y coordinates of the borehole data record; , , , , and Represents the planar coordinates of the three vertices of the triangle; , and Indicates the coordinates of the centroid.
[0087] The interpolated elevation is calculated according to the following formula:
[0088] in, This represents the interpolated elevation of the borehole data record; , and This represents the elevations of the three vertices of the triangle. When the query point is outside the convex hull of the Delaunay triangulation, the interpolated elevation is set to empty, and the out-of-range status is recorded; the nearest neighbor elevation is not used for substitution.
[0089] For example, the three elevation control points of the triangle are 0 meters east, 0 meters north, and 10 meters elevation; 10 meters east, 0 meters north, and 12 meters elevation; and 0 meters east, 10 meters north, and 11 meters elevation. The plane coordinates of the borehole data record are 2 meters east and 3 meters north. The calculated coordinates of the three centroids are 0.5, 0.2, and 0.3, respectively, and the interpolated elevation is 10.7 meters. The elevation processing program writes this interpolated elevation into the corresponding borehole data record, ensuring that the borehole number, X coordinate, Y coordinate, and interpolated elevation maintain the same recording relationship.
[0090] In some embodiments, the result generation program arranges borehole data records in natural order according to borehole number, creating a structured table containing sequence number, borehole number, X coordinate, Y coordinate, interpolated elevation, and elevation status, where the natural order is only used for output sorting. Matching quality inspection data and elevation quality inspection data are written to separate worksheets, recording records of unmatched borehole points, records without annotations, records not retained within duplicate record groups, abnormal elevation control points, and borehole data records for which interpolated elevations were not obtained.
[0091] Each DXF format file generates a structured table file, and multiple table files are compressed together and uploaded to the object storage service. The task processing program returns the number of formal borehole data records, the number of mismatches, the number of ambiguous clusters reassigned, the number of duplicate record groups, the number of out-of-range records, and the address of the result file.
[0092] Therefore, borehole point records and annotation records are first used to form candidate matching costs based on local point spacing, drawing text height, and local annotation offset. Then, a global one-to-one allocation is used to restrict the unique occupancy relationship of annotation records, and ambiguous clusters are reassigned based on local annotation templates and the intersection of matching line segments. Duplicate borehole data records in different extraction paths are filtered by coordinate merging tolerance and comprehensive verification costs, and the records are retained for Delaunay triangulation elevation interpolation. The borehole number, plane coordinates, and interpolated elevation in the output table are taken from the borehole data records and elevation interpolation results, respectively, and are accompanied by quality inspection data corresponding to mismatches, number conflicts, and elevation anomalies.
[0093] Please see Figure 4 , Figure 4 This is a structural block diagram of an automatic extraction system for planar borehole layout coordinates and elevations provided in an embodiment of this application. Figure 4 As shown, the system includes: The drawing parsing module 401 is used to parse the planar borehole layout drawing in DWG or DXF format and generate borehole point records, annotation records and elevation control point sets. The candidate annotation filtering module 402 is used to determine the candidate range and filter the candidate annotation set based on the local point spacing of the borehole point record and the text height of the annotation record. The local annotation offset determination module 403 is used to establish an initial correspondence between borehole point records and annotation records that are the closest to each other and have the same extraction path, and to determine the local annotation offset based on the initial correspondence. The initial allocation module 404 is used to generate candidate matching costs based on the spatial relationship, textual features, and source relationship between borehole point records and annotation records in the candidate annotation set, combined with local annotation bias; and to perform global one-to-one allocation based on the candidate matching costs to obtain the initial allocation results. The secondary allocation module 405 is used to determine ambiguous clusters from borehole point records and annotation records with shared candidate relationships, filter template correspondences based on the alternative allocation cost of the corresponding relationships around the ambiguous clusters, and form local annotation templates. Based on the candidate matching cost, the deviation relative to the local annotation templates, and the intersection of matching line segments, the ambiguous clusters are allocated in a secondary manner to obtain borehole data records. The elevation interpolation module 406 is used to construct a triangulation network based on the set of elevation control points, perform elevation interpolation on the plane coordinates in the borehole data record, and output the borehole number, plane coordinates and interpolated elevation.
[0094] Each processing unit and / or module in the embodiments of this application can be implemented by an analog circuit that implements the functions described in the embodiments of this application, or by software that executes the functions described in the embodiments of this application.
[0095] Please see Figure 5 It shows a schematic block diagram of an electronic device according to an embodiment of this application, which can be used to implement... Figure 1 The method in the illustrated embodiment. (As shown) Figure 5 As shown, the electronic device may include: The system includes at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502. The communication bus 502 is used to enable connection and communication between the components. The user interface 503 may include buttons, and optionally include a standard wired or wireless interface. The network interface 504 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.
[0096] The processor 501 may include one or more processing cores and connect to various parts within the electronic device through various interfaces and lines. It implements various functions and data processing of the electronic device by running or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and by accessing data in the memory 505. Optionally, the processor 501 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 501 may also integrate one or more combinations of CPU, GPU, and modem.
[0097] Memory 505 may include random access memory (RAM) or read-only memory (ROM). Optionally, memory 505 includes a non-transitory computer-readable medium for storing instructions, programs, code, code sets, or instruction sets. Memory 505 may be divided into a program storage area and a data storage area, wherein the program storage area can be used to store instructions for implementing an operating system and instructions for implementing the foregoing method embodiments; the data storage area can be used to store data related to the relevant method embodiments. Memory 505 may also be at least one storage device located remotely from processor 501. Figure 5 As shown, the memory 505, which serves as a computer storage medium, may contain an operating system, a network communication module, a user interface module, and program instructions.
[0098] In particular, the methods and / or embodiments in this application can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by processor 501, it performs the functions defined in the methods of this application.
[0099] Another embodiment of this application provides a storage medium storing computer program instructions thereon, which can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of this application.
[0100] In the above embodiments, the descriptions of each embodiment have different focuses. Parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The above descriptions are merely preferred embodiments of this application and explanations of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by specific combinations of the above technical features, but should also cover other technical solutions formed by arbitrary combinations of the above technical features or their equivalent features without departing from the inventive concept.
Claims
1. A method for automatically extracting the coordinates and elevation of planar borehole locations, characterized in that, include: Parse the planar borehole layout map in DWG or DXF format and generate borehole point records, annotation records, and a set of elevation control points; Based on the local point spacing of the borehole point record and the text height of the annotation record, the candidate range is determined and the candidate annotation set is filtered. An initial correspondence is established based on the borehole point records and annotation records that are closest to each other and have the same extraction path, and the local annotation offset is determined based on the initial correspondence. Based on the spatial relationship, textual features, and source relationship between borehole point records and annotation records in the candidate annotation set, candidate matching costs are generated in conjunction with local annotation bias; global one-to-one allocation is performed based on the candidate matching costs to obtain the initial allocation results; Ambiguous clusters are identified from borehole point records and annotation records with shared candidate relationships. Template correspondences are filtered based on the alternative allocation cost of the correspondences around the ambiguous clusters, and local annotation templates are formed. Based on the candidate matching cost, the deviation relative to the local annotation template, and the intersection of matching line segments, secondary allocation is performed on the ambiguous clusters to obtain borehole data records. A triangulation network is constructed based on the set of elevation control points. Elevation interpolation is performed on the plane coordinates in the borehole data records, and the borehole number, plane coordinates and interpolated elevation are output.
2. The method according to claim 1, characterized in that, The local point spacing is obtained in the following way: based on the borehole point records, the planar distances between each borehole point and the nearest predetermined number of other borehole points are obtained, and the median of each planar distance is taken; the median of the text height of all annotation records with text height is taken as the drawing text height; the spatial scale is determined according to the local point spacing and the drawing text height; the candidate range is determined according to the candidate range coefficient and the spatial scale; and the annotation records within the candidate range are added to the candidate annotation set.
3. The method according to claim 2, characterized in that, The initial correspondence consists of borehole point records and annotation records that are the closest to each other, have the same extraction path, and have consistent block reference instance relationships. The annotation bias vector from the planar coordinates of the borehole point record to the planar coordinates of the annotation record in each initial correspondence is calculated. Within a local neighborhood centered on the borehole point record and whose range is determined by the distance between the corresponding local points, the median of the two coordinate components of the annotation bias vector is taken to obtain the local annotation bias.
4. The method according to claim 3, characterized in that, The spatial relationships include planar distance and label offset differences; the text features include text height differences and text angle differences; and the source relationships include extraction path relationships and block reference instance relationships. The spatial relationships, text features, and source relationships are respectively processed to be dimensionless and the candidate matching costs are synthesized according to weights.
5. The method according to claim 4, characterized in that, The global one-to-one allocation includes: constructing an allocation matrix with borehole point records as rows and labeled records and unmatched virtual records as columns; writing the candidate matching costs into the corresponding matrix elements; setting a prohibition cost for non-candidate relationships; setting an unmatching cost for borehole point records and their corresponding unmatched virtual records; and using a linear sum allocation algorithm to obtain the initial allocation result. The prohibition cost is higher than the upper bound of the total cost of any allocation scheme without non-candidate relationships, and the unmatching cost is determined based on the distribution of candidate matching costs for verified correct and incorrect correspondences.
6. The method according to claim 5, characterized in that, The ambiguous cluster is a connected component formed by connecting candidate relationships and includes at least two borehole point records and two annotation records; for the selected correspondence in the initial allocation result, the initial minimum total cost of the ambiguous cluster is obtained, the selected correspondence is prohibited and reassignment is carried out and an alternative minimum total cost is obtained, and the matching confidence is determined according to the increment of the alternative minimum total cost relative to the initial minimum total cost. The confidence threshold is calibrated using the harmonic mean of the accuracy and recall of the verified incorrect correspondences as the evaluation index, and the correspondences whose matching confidence reaches the confidence threshold are determined as the template correspondences.
7. The method according to claim 6, characterized in that, Collect the template correspondences around the ambiguous clusters, and take the median of the two coordinate components of the annotation bias vector of the template correspondence to form the local annotation template; For feasible one-to-one allocation schemes within the ambiguous cluster, a secondary judgment target value is formed based on the candidate matching cost, the deviation of each correspondence relative to the local annotation template, and the number of matching line segment intersections. The feasible one-to-one allocation scheme with the lowest secondary judgment target value is selected to replace the initial allocation result, and the borehole data record is generated based on the replaced initial allocation result.
8. The method according to claim 7, characterized in that, The extraction path includes block reference path and model space scatter path; borehole data records from different extraction paths with a planar distance not exceeding the coordinate merging tolerance are grouped into duplicate record group. When the borehole numbers in the duplicate record group are the same, the borehole data record with the lowest candidate matching cost is retained; when the borehole numbers are different, the template correspondences around the duplicate record group are collected and a local annotation template is formed. The comprehensive verification cost is determined based on the candidate matching cost and the deviation relative to the local annotation template. The borehole data record with the lowest comprehensive verification cost is retained, and the remaining borehole data records are written into the matching quality inspection data.
9. The method according to claim 8, characterized in that, The set of elevation control points is generated from the inserted entities with non-zero elevations in the GCD layer. For elevation control points with the same planar coordinates and whose elevation difference does not exceed the project's elevation difference limit, the average elevation is taken. Elevation control points whose elevation difference exceeds the project's elevation difference limit are written into the elevation quality inspection data and removed from the elevation control point set. A Deloitte triangulation network is constructed based on the processed elevation control point set. When the planar coordinates recorded in the borehole data are within the triangle of the Deloitte triangulation network, linear interpolation of the centroid coordinates is performed based on the three vertices of the triangle. When the coordinates are outside the convex hull of the Deloitte triangulation network, the interpolated elevation is set to empty and the out-of-range status is recorded.
10. An automatic system for extracting coordinates and elevations of planar borehole locations, characterized in that, include: The drawing parsing module is used to parse DWG or DXF format planar borehole layout drawings and generate borehole point records, annotation records, and sets of elevation control points. The candidate annotation filtering module is used to determine the candidate range and filter the candidate annotation set based on the local point spacing of the borehole point record and the text height of the annotation record. The local annotation offset determination module is used to establish an initial correspondence between borehole point records and annotation records that are the closest to each other and have the same extraction path, and to determine the local annotation offset based on the initial correspondence. The initial allocation module is used to generate candidate matching costs based on the spatial relationship, textual features, and source relationship between borehole point records and annotation records in the candidate annotation set, combined with local annotation bias; and to perform global one-to-one allocation based on the candidate matching costs to obtain the initial allocation results. The secondary allocation module is used to identify ambiguous clusters from borehole point records and annotation records with shared candidate relationships, filter template correspondences based on the alternative allocation cost of the corresponding relationships around the ambiguous clusters, and form local annotation templates. Based on the candidate matching cost, the deviation relative to the local annotation templates, and the intersection of matching line segments, the ambiguous clusters are allocated in a secondary manner to obtain borehole data records. The elevation interpolation module is used to construct a triangulation network based on a set of elevation control points, perform elevation interpolation on the plane coordinates in the borehole data records, and output the borehole number, plane coordinates, and interpolated elevation.