Drilling information automatic extraction method based on large language model reasoning and related equipment

By constructing structured prompt templates and large language models to extract spatial features and relational information of borehole entities, and combining vector geometry algorithms, the problem of automatically extracting the absolute three-dimensional coordinates of borehole entities in existing technologies has been solved, achieving efficient and accurate automatic three-dimensional coordinate reasoning.

CN121638424APending Publication Date: 2026-03-10INNER MONGOLIA RESEARCH INSTITUTE CHINA UNIVERSITY OF MINING AND TECHNOLOGY (BEIJING) +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies struggle to automatically infer the absolute three-dimensional coordinates of borehole entities from complex, unstructured geological documents, resulting in low automation and a high susceptibility to errors.

Method used

A method based on a large language model is adopted to extract the spatial features and spatial relationship information of the borehole entity relative to the reference point by constructing a structured prompt template. The absolute three-dimensional coordinates of the borehole entity are calculated by combining vector geometry and minimum curvature algorithm.

Benefits of technology

It enables the automatic extraction of absolute three-dimensional coordinates of borehole entities from unstructured geological documents, improving automation, reducing errors, providing reliable spatial basis, and providing accurate three-dimensional coordinate data for geological exploration and engineering design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638424A_ABST
    Figure CN121638424A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a drilling information automatic extraction method based on large language model reasoning. The method comprises the following steps: acquiring an unstructured geological document; constructing a first structured prompt template; extracting the spatial feature information from the unstructured geological document through a first large language model by using the first structured prompt template; constructing a second structured prompt template; extracting the spatial relationship information from the unstructured geological document through a second large language model by utilizing the second structured prompt template; and obtaining absolute three-dimensional coordinates of the drilling entity according to the spatial feature information and the spatial relationship information. According to the invention, the absolute position of the drilling entity in the three-dimensional space can be directly obtained from the unstructured engineering document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of geological engineering technology, and in particular to an automatic method and related equipment for extracting borehole information based on large language model reasoning. Background Technology

[0002] It should be noted that the above description of the technical background is only for the purpose of providing a clear and complete explanation of the technical solutions of the present invention and facilitating understanding by those skilled in the art. It should not be assumed that the above technical solutions are known to those skilled in the art simply because they have been described in the background section of this invention.

[0003] 3D geological modeling serves as the digital foundation for infrastructure safety, resource exploration, and environmental monitoring; the accuracy of the model directly impacts the reliability of engineering decisions. Currently, a large amount of critical borehole data remains stored in unstructured engineering documents, requiring manual interpretation and input, which is time-consuming and error-prone. The field of geological engineering has long explored the automation of this process.

[0004] With the development of deep learning technology, related technologies have been applied to entity recognition in unstructured engineering documents. However, automatically inferring the absolute position of entities in three-dimensional space from complex, relative, and often ambiguous natural language remains a significant challenge. Summary of the Invention

[0005] In view of this, the purpose of one or more embodiments of this disclosure is to provide an automatic method and related equipment for extracting borehole information based on large language model reasoning, so as to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the first aspect of this disclosure provides a method for automatically extracting borehole information based on large language model reasoning, comprising: Obtain unstructured geological documents; Construct a first structured prompt template, which is used to instruct the large language model to extract spatial feature information of the borehole entity from the input data; Using the first structured prompt template, the spatial feature information is extracted from the unstructured geological document through the first large language model. The spatial feature information includes at least one of the location description, depth, azimuth, and dip angle of the borehole entity. A second structured prompt template is constructed, which is used to instruct the large language model to extract the spatial relationship information of the borehole entity relative to the reference point from the input data; Using the second structured prompt template, the spatial relationship information is extracted from the unstructured geological document through the second large language model. The spatial relationship information includes at least one of a first reference point, a second reference point, and a distance. Based on the spatial feature information and the spatial relationship information, the absolute three-dimensional coordinates of the borehole entity are obtained.

[0007] Optionally, the absolute three-dimensional coordinates of the borehole entity are obtained based on the spatial feature information and the spatial relationship information, including: Extract the three-dimensional coordinates of the first and second reference points from the engineering survey database; Based on the three-dimensional coordinates of the first reference point and the second reference point, the direction vector from the first reference point to the second reference point is obtained; The starting coordinates of the borehole entity are obtained based on the coordinates of the first reference point, the direction vector, and the distance in the spatial relationship information. Based on the azimuth, tilt angle and depth in the spatial feature information, the three-dimensional displacement of the borehole entity from the starting point to the ending point is obtained through the minimum curvature algorithm. The endpoint coordinates of the borehole entity are obtained based on the starting point coordinates and the three-dimensional displacement.

[0008] Optionally, the first and second largest language models are invoked using unified rules, and the randomness parameter and the output length parameter remain consistent.

[0009] Optionally, the first and second largest language models can be selected from multiple large language models using a preset multi-model selection strategy.

[0010] Optionally, a pre-defined multi-model selection strategy is used to determine the large language model, including: Multiple candidate large language models are obtained. These candidate large language models are called through a unified rule, and the randomness parameter and the output length parameter are kept consistent. The candidate large language models are evaluated using preset evaluation indicators to obtain statistical analysis results of the candidate large language models; Based on the statistical analysis results, the candidate large language model that satisfies both capability verification and performance verification is identified as the target large language model.

[0011] Optionally, the candidate large language models are evaluated using preset evaluation indicators to obtain statistical analysis results of the candidate large language models, including: Obtain unstructured geological documents for testing and the corresponding test results; The test unstructured geological document is input into the candidate large language model, and the output result of each candidate large language model is obtained; The output results are compared with the test results according to the preset evaluation indicators to obtain the evaluation indicator value of each candidate large language model; Based on the evaluation index values, statistical analysis results are obtained for each of the candidate large language models.

[0012] Optionally, based on the statistical analysis results, the candidate large language models that meet the capability verification and performance verification requirements are determined as the target large language model, including: Identify the core evaluation indicators among the evaluation metrics; Select large language models whose core evaluation index values ​​are greater than preset thresholds are identified as candidate large language models. Calculate the overall score for each of the candidate large language models; The candidate large language model with the highest overall score is selected as the target large language model.

[0013] A second aspect of this disclosure provides an automatic borehole information extraction device based on large language model reasoning, comprising: The acquisition module is configured to acquire unstructured geological documents; The first construction module is configured to construct a first structured prompt template, which is used to instruct the large language model to extract spatial feature information of the borehole entity from the input data. The first extraction module is configured to use the first structured prompt template to extract the spatial feature information from the unstructured geological document through the first large language model. The spatial feature information includes at least one of the location description, depth, azimuth and dip angle of the borehole entity. The second construction module is configured to construct a second structured prompt template, which is used to instruct the large language model to extract the spatial relationship information of the borehole entity relative to the reference point from the input data. The second extraction module is configured to use the second structured prompt template to extract the spatial relationship information from the unstructured geological document through the second large language model. The spatial relationship information includes at least one of a first reference point, a second reference point, and a distance. The coordinate calculation module is configured to obtain the absolute three-dimensional coordinates of the borehole entity based on the spatial feature information and the spatial relationship information.

[0014] A third aspect of this disclosure provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in the first aspect.

[0015] In a fourth aspect, this disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in the first aspect.

[0016] As described above, the present disclosure provides an automatic borehole information extraction method and related equipment based on large language model reasoning. First, unstructured geological documents are acquired. Then, a first structured prompt template and a second structured prompt template are constructed to extract spatial feature information of the borehole entity and spatial relationship information relative to a reference point. Subsequently, these two types of templates are used to extract corresponding information from the unstructured geological documents through the first structured prompt template and the second large language model, respectively. Finally, the absolute three-dimensional coordinates of the borehole entity are obtained by combining the two types of information. Its technical advantage lies in focusing on target information extraction through structured prompt templates, avoiding interference from unstructured text, and reducing error accumulation through clearly defined dual-model extraction. This provides reliable spatial basis for geological exploration and engineering design, thereby realizing the automatic reasoning of the absolute position of the borehole entity in three-dimensional space using a large language model. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in one or more embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only one or more embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating one or more embodiments of the automatic borehole information extraction method based on large language model reasoning. Figure 2 This is a radar chart showing the performance of a large language model according to an embodiment of this disclosure. Figure 3 This is a box plot showing the distribution of performance metrics for a large language model according to an embodiment of this disclosure. Figure 4 This is a schematic diagram of the Pearson correlation coefficient matrix between performance metrics of a large language model according to an embodiment of this disclosure; Figure 5 A graph showing the Pareto front analysis results of a large language model performance index according to an embodiment of this disclosure; Figure 6This is a schematic diagram of the structure of an automatic borehole information extraction device based on large language model reasoning, which is one or more embodiments of this disclosure. Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to one or more embodiments of this disclosure. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0020] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar words used in one or more embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0021] As described in the background section, while related technologies can accurately identify borehole entities in unstructured geological documents, they struggle to automatically derive the absolute three-dimensional coordinates of borehole entities from the relative descriptions within these documents. A cognitive gap exists between entity recognition and geometric understanding, requiring manual intervention in key areas and limiting the level of automation.

[0022] refer to Figure 1 This disclosure discloses one or more embodiments of an automatic borehole information extraction method based on large language model reasoning, comprising the following steps: Step S101: Obtain unstructured geological documents; Step S102: Construct a first structured prompt template, which is used to instruct the large language model to extract spatial feature information of the borehole entity from the input data; Step S103: Using the first structured prompt template, extract spatial feature information from the unstructured geological document through the first large language model. The spatial feature information includes at least one of the following: location description of the borehole entity, depth, azimuth angle, and dip angle. Step S104: Construct a second structured prompt template, which is used to instruct the large language model to extract the spatial relationship information of the borehole entity relative to the reference point from the input data; Step S105: Using the second structured prompt template, extract spatial relationship information from the unstructured geological document through the second large language model. The spatial relationship information includes at least one of the first reference point, the second reference point, and distance. Step S106: Obtain the absolute three-dimensional coordinates of the borehole entity based on spatial feature information and spatial relationship information.

[0023] In this embodiment of the disclosure, unstructured geological documents refer to geological-related texts or files that are not organized in a fixed format and do not have a unified data structure, such as summary reports of exploration projects, geological maps, rock strata observation records, etc.

[0024] In this embodiment of the disclosure, the unstructured geological document contains descriptive text of borehole entities, which can be used as the parsed text content of the calling model.

[0025] In some embodiments, the first prompt template may include fields that include one or more of the following: basic information of the borehole entity, design parameters, and actual parameters. Basic information may include the borehole entity identifier, name, and construction date. Design parameters may include the design borehole depth, design azimuth, and design parameters of the borehole entity design scheme. Actual parameters may include the actual dip angle and the termination formation. The fields defined in the first prompt template can be determined according to actual circumstances, and this disclosure does not limit them.

[0026] In one embodiment of this disclosure, the first structured prompt template may include borehole number, location description, designed borehole depth (meters), designed azimuth (degrees), designed dip angle (degrees), actual dip angle (degrees), termination formation, and construction date.

[0027] In this embodiment of the disclosure, the first large language model takes an unstructured geological document and a first structured prompt template as input data and outputs the spatial feature information of borehole entities contained in the unstructured geological document.

[0028] In some embodiments, to ensure the completeness and correct format of the output results, the output results can be validated and missing fields can be marked.

[0029] After obtaining the output of the first language model, the extracted borehole entities can be added to the borehole entity set for unified processing.

[0030] In some embodiments, the second structured prompt template may include basic information about the reference point, distance parameters of the borehole entity relative to the reference point, etc. The fields defined in the second prompt template can be determined according to the actual situation, and this disclosure does not limit them.

[0031] In some embodiments, the second prompt template may also include a confidence level to estimate the accuracy of the final output absolute three-dimensional coordinate result.

[0032] In some embodiments, the first reference point is used as a reference point for determining the absolute three-dimensional coordinates of the borehole entity, and the second reference point is used to assist the first reference point in determining the direction.

[0033] In this embodiment of the disclosure, the second language model takes a second structured prompt template and an unstructured geological document as input data and outputs relationship information of borehole entities.

[0034] In some embodiments, the completeness and confidence of the output of the second language model can also be verified, and results with confidence below a preset threshold can be marked.

[0035] In some embodiments, it can be verified whether the obtained absolute three-dimensional coordinates are within the engineering area to ensure the rationality of the absolute three-dimensional coordinates.

[0036] In some embodiments, the first and second language models can be obtained based on different training data and training methods.

[0037] In some embodiments, the first and second large language models can be trained based on the same or different large language models.

[0038] In some embodiments, the process of calculating the absolute three-dimensional coordinates of the borehole entity may include: extracting the three-dimensional coordinates of a first reference point and a second reference point from an engineering survey database; obtaining a direction vector from the first reference point to the second reference point based on the three-dimensional coordinates of the first and second reference points; obtaining the starting point coordinates of the borehole entity based on the coordinates of the first reference point, the direction vector, and the distance in the spatial relationship information; obtaining the three-dimensional displacement from the starting point to the ending point of the borehole entity using a minimum curvature algorithm based on the azimuth, tilt angle, and depth in the spatial feature information; and obtaining the ending point coordinates of the borehole entity based on the starting point coordinates and the three-dimensional displacement.

[0039] In some embodiments, the function of the direction vector can be expressed as: ; in, This represents the first reference point, with coordinates as follows: , This represents the second reference point, with coordinates as follows: .

[0040] In some embodiments, the function of the starting coordinates of the borehole entity can be expressed as: ; in, Indicates distance.

[0041] In some embodiments, the function of the endpoint coordinates of the borehole entity can be expressed as: ; in, Represents three-dimensional displacement. , , , Indicates the tilt angle. Indicates azimuth. Indicates depth.

[0042] In some embodiments, the absolute three-dimensional coordinates of the borehole entities in the borehole entity set can be calculated and output uniformly after obtaining the absolute three-dimensional coordinates of all borehole entities.

[0043] In other embodiments, the absolute three-dimensional coordinates of the borehole entities in the borehole entity set can be calculated and output.

[0044] In some embodiments, the absolute three-dimensional coordinates of the borehole entities can be calculated sequentially, or they can be calculated according to other sorting methods.

[0045] In some embodiments, the calling rules of the first and second language models are unified, and the random parameters and output length parameters are also kept consistent to ensure that the outputs of the first and second language models are consistent.

[0046] In one embodiment of this disclosure, both the first and second largest language models are set to temperature=0.1 and max_tokens=8192.

[0047] As mentioned above, the first and second largest language models can be trained based on the same or different large language models.

[0048] In developing this disclosure, the applicant discovered that while various large language models are rapidly emerging, the field of geological engineering lacks systematic multi-model validation and professional evaluation. The selection of large language models often relies on experience or general scoring rather than task-specific empirical testing, resulting in high costs and a high risk of failure. Furthermore, the evaluation of related technologies tends to emphasize comprehensive indicators and general benchmarks, neglecting the verification of core capabilities for specialized tasks, which can easily lead to an "efficiency-effectiveness paradox": models that perform well in comprehensive scoring and speed may completely fail in key capabilities, thus pushing "seemingly good but unusable" solutions to deployment.

[0049] In other words, the relevant technologies still suffer from problems such as blind model selection and oversimplification of evaluation methods.

[0050] In some embodiments, the target model can be selected and trained from the following large language models: DeepSeek-R1-32B, DeepSeek-R1-14B, DeepSeek-R1-7B, QWQ-32B, Qwen2.5-Max, GPT-3.5-Turbo, and GPT-4o-Mini. This disclosure does not limit the selection of the large language model.

[0051] In some embodiments, the evaluation metrics for large language models may include one or more of the following: Extraction Recall (ER), Location Recall (LR), Coordinate Success Rate (CSR), Processing Stability (PS), Efficiency Coefficient (EC), and Average Location Processing Time (ALPT).

[0052] ER represents the ratio of the number of valid borehole entities successfully extracted to the actual number of existing borehole entities during the borehole entity extraction process. The higher the value, the better the extraction integrity.

[0053] LR represents the ratio of the number of successfully extracted location-related information (such as reference point location information) to the actual number of existing location-related information. The higher the value, the better the completeness of the extraction.

[0054] CSR represents the ratio of the number of valid coordinates extracted to the total number of coordinates extracted. Valid coordinates refer to coordinates that are in the correct format, meet the accuracy requirements, and can be used for subsequent calculations.

[0055] PS represents the rate of abnormal fluctuations or failures during continuous data processing; the smaller the value, the stronger the processing stability.

[0056] EC represents the balance index between data processing speed and processing quality in large language models. The higher the value, the more data can be processed per unit time while ensuring high efficiency.

[0057] ALPT represents the average processing time for data related to a single location; the lower the value, the higher the data processing efficiency.

[0058] In some embodiments, a paired t-test can also be performed on the evaluation results to avoid the evaluation results being influenced by random factors. The paired t-test can use statistical methods to calculate the probability that the final evaluation result is affected by random factors.

[0059] In some embodiments, when the probability that the difference is caused by chance is less than 0.04%, the model's ability is judged to have a true difference (significant difference).

[0060] In some embodiments, effect size tests can also be performed on the evaluation results to determine the actual impact of significant differences. That is, to determine the actual magnitude of significant differences in the actual application context.

[0061] In some embodiments, Pareto front analysis can also be performed on the evaluation results to evaluate the model with the best overall performance.

[0062] In some embodiments, Pareto front analysis can also be performed on the evaluation results to evaluate the model with the best overall performance.

[0063] To further avoid pushing solutions that "look good but are not usable" to deployment, some embodiments also propose an evaluation paradigm to select models that prioritize capability verification over performance optimization.

[0064] The evaluation paradigm has a two-stage decision-making logic: first, models with core capabilities are selected through threshold indicators, and then comprehensive performance optimization is carried out on the validated models.

[0065] In some embodiments, the threshold metric can be whether the core evaluation metric of the model exceeds a threshold value.

[0066] In one embodiment of this disclosure, the threshold is set to 0.6.

[0067] In some embodiments, weights can be assigned to each evaluation metric based on the actual situation.

[0068] In one embodiment of this disclosure, the model's overall score can be set as follows: Comprehensive_Score[model]=0.30×CSR+0.25×ER+0.20×EC+0.15×LR+0.05×PS+0.05×ALPT.

[0069] It is understandable that this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities.

[0070] The following describes the technical solution of this disclosure in further detail using an embodiment of this disclosure.

[0071] In this embodiment, the description fragment of borehole 01J-1 is first extracted from the geological exploration report.

[0072] The description excerpt specifically states: "01J-1 borehole, designed location: 88m before point 15 on the track incline; designed azimuth: 256°; designed inclination: +30°; designed depth: 110m. This borehole was drilled on August 27, 2021, during the afternoon shift. The actual azimuth was 256°, and the inclination was +30°. Drilling was performed to 6.5m using a φ133mm drill bit. A 6m φ127mm casing was then inserted into the borehole. Grouting was used to solidify the casing, with 0.65t of cement used for grouting. After 8 hours of solidification, the borehole was swept to 7m using a φ94mm drill bit for a self-pressure test." The test pressure was 4.3 MPa, stabilized for 32 minutes, and no water leakage was observed around the perimeter. After passing the test pressure, a φ75mm drill bit was used to drill to a position of 101m where water was encountered, with a water flow rate of 0.2 m³ / h and a water pressure of 0.2 MPa. Drilling continued to a final depth of 112.5m. After the drill rod was removed, there was no water in the hole. The borehole was inclined, showing a rightward deviation of 1.48m and a downward sag of 2.38m, for a total deviation of 3.86m. Yellow sand was encountered between 100.5m and 108m, and the final depth of the hole into the bottom gravel was 5.41m. Construction was completed on August 29, 2021. In this embodiment, the first structured prompt template is set as follows: json{"instruction":"Please extract borehole information from the geological document and output it in the following JSON format:","schema":{"hole_id":"Borehole number","location_desc":"Location description","design_params":{"design_depth":"Design borehole depth (meters)","design_azimuth":"Design azimuth (degrees)","design_inclination":"Design dip (degrees)"},"actual_params":{"actual_depth":"Actual borehole depth (meters)","actual_azimuth":"Actual azimuth (degrees)","actual_inclination":"Actual dip (degrees)","end_formation":"Termination formation","drilling_date":"Construction date"}}}.

[0073] Based on the first structured prompt template mentioned above, the structured output data of the first large language model is: json{"hole_id":"01J-1","location_desc":"88m before point 15# on the track","design_params":{"design_depth":110.0,"design_azimuth":256.0,"design_inclination":30.0,"design_diameter":null,"design_purpose":null},"actual_params":{"actual_depth":112.5,"actual_azimuth":256.0,"actual_inclination":30.0,"actual_diameter":null,"start_formation":null,"end_formation":"bottom gravel","drilling_date":"2021-08-29","deviation":{"depth_deviation":2.5,"azimuth_deviation":0.0,"inclination_deviation":0.0}}}.

[0074] The corresponding text is: 01J-1 borehole, designed location: 88m before point 15 on the track incline; designed azimuth: 256°; designed inclination: +30°; designed borehole depth: 110m. This borehole was drilled on August 27, 2021, during the afternoon shift. The actual azimuth was 256°, and the inclination was +30°. Drilling was performed to 6.5m with a φ133mm drill bit. A 6m φ127mm casing was then inserted into the borehole. Grouting was used to solidify the casing, with 0.65T of cement used for grouting. After solidification for 8 hours, a φ94mm drill bit was used to drill to a depth of 7 meters for a self-pressure test. The test pressure was 4.3 MPa, and the hole remained stable for 32 minutes without leakage around the perimeter. After passing the pressure test, a φ75mm drill bit was used to drill to a depth of 102m where water was encountered at a flow rate of 0.2 m³ / h and a pressure of 0.2 MPa. Drilling continued to a final depth of 112.5m. After removing the drill rod, no water was found in the hole. The borehole was then measured for inclination; the borehole deviated 1.48m to the right and sagged 2.33m, with a total deviation of 3.86m. Drilling reached 100.5m to 108m where yellow sand was encountered, and the final depth into the bottom gravel was 5.41m. Construction was completed on August 29, 2021.

[0075] The second structured prompt template can be set as follows: json{"instruction":"Please parse the following location description and extract the spatial location relationship:","input":"88m ahead of point 15 on the track","schema":{"reference_point_id":"Main reference point number","direction_point_id":"Direction reference point number","distance":"Distance parameter (meters)","direction_desc":"Direction keyword","direction_type":"Direction type (forward / backward / left / right)","lateral_offset":{"direction":"Offset direction","distance":"Offset distance (meters)"},"vertical_offset":{"direction":"Offset direction","distance":"Offset distance (meters)"},"confidence":"Parsing confidence (0-1)","reasoning":"Natural language description of the location relationship"}}.

[0076] The structured data output by the second language model can be expressed as: json{"reference_point_id":"15","direction_point_id":"16","distance":88,"direction_desc":"front","direction_type":"forward","confidence":0.95,"reasoning":"Move 88 meters from point 15 to point 16"}.

[0077] Then, the coordinates of the reference points were queried, and the coordinates of the first reference point P1 (point 15) were determined to be (4098017.5580, 38562.2380, -150.2), and the coordinates of the second reference point P2 (point 16) were (4098009.6740, 38529.7140, -146.3).

[0078] Thus, the direction vector is calculated as follows: ; Based on the parameter d=88m, the coordinates of the borehole starting point are calculated as follows: ; Based on the azimuth α = 256°, inclination θ = +30°, and borehole depth L = 112.5m, the coordinates of the borehole endpoint are calculated as follows: ; ; ; .

[0079]

[0080] In one embodiment of this disclosure, the model selection process is as follows.

[0081] First, 30 real geological engineering project documents were selected as the test dataset, with each document containing an average of approximately 2954 characters and 154 borehole entity information. A validation framework was established, comprising seven representative models covering four technical architectures: inference-enhanced architecture (DeepSeek-R1 series: 32B, 14B, 7B), specialized inference optimization (QWQ-32B), large-scale general optimization (Qwen2.5-Max), and commercial benchmark models (GPT-3.5-Turbo, GPT-4o-Mini). The inference-enhanced architecture refers to a model architecture that integrates explicit cognitive decomposition and multi-step inference mechanisms (such as chain-of-thought), capable of simulating the human process of solving structured problems. All models used the same parameter configuration (temperature=0.1), and each document underwent three rounds of repeated testing, resulting in a total of 630 valid samples.

[0082] The evaluation system includes six core indicators: ER, LR, CSR, PS, EC and ALPT, with weights set at 0.25, 0.15, 0.3, 0.05, 0.2 and 0.05 respectively.

[0083] The overall performance comparison of the seven major language models obtained after evaluation is shown in the table below.

[0084] The performance radar charts of the seven major language models are shown below. Figure 2 As shown.

[0085] It can be seen that the performance of large language models presents three tiers: DeepSeek-R1-32B and DeepSeek-R1-14B have the best performance, with comprehensive scores of 0.965 and 0.935 respectively, and CSR indices of 0.992 and 0.954 respectively; Qwen2.5-Max, QWQ-32B, and GPT-4o-Mini have comprehensive scores between 0.877 and 0.921, which are considered medium performance; DeepSeek-R1-7B (score 0.817, CSR=0.585) and GPT-3.5-Turbo (score 0.683, CSR=0.000) have capability deficiencies.

[0086] like Figure 3 As shown, among the six evaluation indicators, the CSR indicator has the largest box span and the data dispersion is significantly higher than other indicators, verifying that the technical difficulty of spatial reasoning tasks is far greater than that of basic text extraction tasks.

[0087] In developing this invention, the inventors discovered that the GPT-3.5-Turbo model performs excellently in metrics such as efficiency coefficient (EC=0.966) and recall rate (ER=0.996), but completely fails in coordinate success rate (CSR) (CSR=0.000, all 630 inference attempts failed). This indicates that the model can extract textual information quickly and accurately, but is completely incapable of completing spatial reasoning tasks.

[0088] Figure 4 The Pearson correlation coefficient matrix shows the correlation coefficients between the six evaluation indicators. Figure 5 This is a Pareto front analysis based on the original 6-dimensional index space.

[0089] It can be seen that the correlation between CSR and other indicators is generally low (|r|<0.5), proving that spatial reasoning ability is an independent technical dimension. Statistical test results show that in 126 paired comparisons, 78 (61.9%) were significant after Bonferroni correction (p<0.0004); the CSR indicator reached significance in 14 (66.7%) comparisons, making it a key dimension for distinguishing model capabilities. The effect size of the CSR difference between DeepSeek-R1-32B and GPT-3.5-Turbo is Cohen's d>2.0, indicating a maximum effect. Dimensionality reduction to 3D using PCA for visualization explained 99.03% of the total variance.

[0090] The seven models were selected based on an evaluation paradigm.

[0091] First, capability verification is performed. In this embodiment, in the first stage, CSR is used as a threshold indicator, and the minimum capability threshold is set to 0.60. The verification results are as follows: The following five models have been validated: DeepSeek-R1-32B (CSR=0.992), QWQ-32B (CSR=0.985), Qwen2.5-Max (CSR=0.976), DeepSeek-R1-14B (CSR=0.954), and GPT-4o-Mini (CSR=0.669).

[0092] Two models failed validation: DeepSeek-R1-7B (CSR=0.585) and GPT-3.5-Turbo (CSR=0.000).

[0093] In the second stage, Pareto front analysis was performed on the five models that passed the first stage validation, identifying four Pareto optimal solutions in the original six-dimensional index space. For example... Figure 5As shown, in this embodiment, the models corresponding to the four Pareto optimal solutions are: DeepSeek-R1-32B, DeepSeek-R1-14B, Qwen2.5-Max, and GPT-4o-Mini. Using PCA to reduce the dimensionality to 3D visualization, a total of 99.03% of the total variance is explained.

[0094] Then, a weighted composite score was calculated (the weights for CSR, ER, EC, LR, PS, and ALPT were 0.25, 0.15, 0.3, 0.05, 0.2, and 0.05, respectively).

[0095] The final ranking of the large language models is as follows: DeepSeek-R1-32B, DeepSeek-R1-14B, Qwen2.5-Max, QWQ-32B, and GPT-4o-Mini.

[0096] This can be understood as DeepSeek-R1-32B being the preferred large language model, DeepSeek-R1-14B being a secondary option, and Qwen2.5-Max, QWQ-32B, and GPT-4o-Mini being alternatives. However, GPT-4o-Mini carries usage risks and should be chosen with caution.

[0097] It is understood that the technical solution disclosed herein can utilize a large language model to automatically extract borehole entities, and automatically convert position descriptions into precise three-dimensional coordinates based on vector geometry and minimum curvature methods, breaking through the core challenge of spatial reasoning, forming a complete link from text understanding to spatial reasoning, and performing intelligent coordinate reasoning.

[0098] This disclosure utilizes configurable location description parsing prompt templates to adapt to different mines' guide point representation habits and external data association methods, achieving a balance between universality and flexibility. The system outputs structured borehole entities and 3D coordinate results, providing standardized data input for geological modeling and offering integrated capabilities for multi-model switching and coordinate reasoning.

[0099] Furthermore, the technical solution disclosed herein can also construct a systematic evaluation system covering multiple large language models, support technology selection with rigorous statistical comparison, and conduct multi-model verification; and propose the CVPO paradigm of "capability verification takes precedence over performance optimization", verifying core capabilities first through hierarchical evaluation to avoid the "efficiency-effectiveness paradox".

[0100] It should be noted that the methods of one or more embodiments of this disclosure can be executed by a single device, such as a computer or server. The methods of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to complete the process. In such a distributed scenario, one of these devices may execute only one or more steps of the methods of one or more embodiments of this disclosure, and the multiple devices will interact with each other to complete the method described.

[0101] It should be noted that the above description pertains to specific embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0102] Based on the same inventive concept, and corresponding to any of the methods in the above embodiments, this disclosure also provides an automatic drilling information extraction device based on large language model reasoning. For example... Figure 6 As shown, the device includes: Module 11 is configured to acquire unstructured geological documents; The first construction module 12 is configured to construct a first structured prompt template, which is used to instruct the large language model to extract spatial feature information of the borehole entity from the input data. The first extraction module 13 is configured to use the first structured prompt template to extract the spatial feature information from the unstructured geological document through the first large language model. The spatial feature information includes at least one of the location description, depth, azimuth and inclination angle of the borehole entity. The second construction module 14 is configured to construct a second structured prompt template, which is used to instruct the large language model to extract the spatial relationship information of the borehole entity relative to the reference point from the input data. The second extraction module 15 is configured to use the second structured prompt template to extract the spatial relationship information from the unstructured geological document through the second large language model. The spatial relationship information includes at least one of a first reference point, a second reference point, and a distance. The coordinate calculation module 16 is configured to obtain the absolute three-dimensional coordinates of the borehole entity based on the spatial feature information and the spatial relationship information.

[0103] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, when implementing one or more embodiments of this disclosure, the functions of each module can be implemented in one or more software and / or hardware.

[0104] The apparatus described above is used to implement the corresponding methods in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0105] Figure 7 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0106] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure.

[0107] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this disclosure are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0108] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0109] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0110] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0111] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this disclosure, and not necessarily all the components shown in the figures.

[0112] The electronic devices described above are used to implement the corresponding methods in the foregoing embodiments and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0113] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0114] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.

[0115] Additionally, to simplify the description and discussion, and to avoid obscuring one or more embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring one or more embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which one or more embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) are set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that one or more embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0116] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0117] This disclosure includes one or more embodiments intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for automatically extracting drilling information based on large language model inference, characterized in that, The method comprises the following steps: obtaining an unstructured geological document; constructing a first structured prompt template for instructing a large language model to extract spatial feature information of a borehole entity from input data; extracting the spatial feature information from the unstructured geological document by a first large language model using the first structured prompt template, wherein the spatial feature information comprises at least one of a position description, a depth, an azimuth angle, and an inclination angle of the borehole entity; constructing a second structured prompt template for instructing a large language model to extract spatial relationship information of the borehole entity relative to a reference point from input data; extracting the spatial relationship information from the unstructured geological document by a second large language model using the second structured prompt template, wherein the spatial relationship information comprises at least one of a first reference point, a second reference point, and a distance; obtaining absolute three-dimensional coordinates of the borehole entity according to the spatial feature information and the spatial relationship information.

2. The method of claim 1, wherein, According to the spatial feature information and the spatial relationship information, the absolute three-dimensional coordinates of the borehole entity are obtained, comprising: extracting three-dimensional coordinates of the first reference point and the second reference point from an engineering survey database; obtaining a direction vector of the first reference point pointing to the second reference point according to the three-dimensional coordinates of the first reference point and the second reference point; obtaining a starting point coordinate of the borehole entity according to the coordinate of the first reference point, the direction vector, and the distance in the spatial relationship information; obtaining a three-dimensional displacement from the starting point to the end point of the borehole entity by a minimum curvature algorithm according to the azimuth angle, the inclination angle, and the depth in the spatial feature information; obtaining an end point coordinate of the borehole entity according to the starting point coordinate and the three-dimensional displacement.

3. The method of claim 1, wherein, The first large language model and the second large language model are called by a unified rule, and the randomness parameters and the output result length parameters are consistent.

4. The method of claim 1, wherein, The first large language model and the second large language model are selected from a plurality of large language models by a preset multi-model selection strategy.

5. The method of claim 4, wherein, Determining a large language model by a preset multi-model selection strategy comprises: obtaining a plurality of candidate large language models, wherein the candidate large language models are called by a unified rule, and the randomness parameters and the output result length parameters are consistent; evaluating the candidate large language models by a preset evaluation index to obtain statistical analysis results of the candidate large language models; determining a candidate large language model that meets capability verification and performance verification from the candidate large language models as a target large language model according to the statistical analysis results.

6. The method of claim 5, wherein, Evaluating the candidate large language models by a preset evaluation index to obtain statistical analysis results of the candidate large language models comprises: obtaining a test unstructured geological document and a corresponding test result; inputting the test unstructured geological document into the candidate large language models to obtain output results of each candidate large language model; comparing the output results with the test result according to a preset evaluation index to obtain an evaluation index value of each candidate large language model; and According to the evaluation index value, a statistical analysis result of each of the candidate large language models is obtained.

7. The method of claim 5, wherein, According to the statistical analysis result, a candidate large language model that meets the capability verification and the performance verification is determined as a target large language model, including: Determining a core evaluation index in the evaluation index; Determining a candidate large language model with a core evaluation index value greater than a preset threshold as a candidate large language model; Calculating a comprehensive score of each of the candidate large language models; Taking the candidate large language model with the highest comprehensive score as the target large language model.

8. A device for automatically extracting drilling information based on large language model inference, characterized in that, Including: An acquisition module configured to acquire an unstructured geological document; A first construction module configured to construct a first structured prompt template, the first structured prompt template being used to instruct a large language model to extract spatial feature information of a borehole entity from input data; A first extraction module configured to extract the spatial feature information from the unstructured geological document by a first large language model using the first structured prompt template, the spatial feature information including at least one of a position description, a depth, an azimuth angle, and an inclination angle of the borehole entity; A second construction module configured to construct a second structured prompt template, the second structured prompt template being used to instruct a large language model to extract spatial relationship information of the borehole entity relative to a reference point from input data; A second extraction module configured to extract the spatial relationship information from the unstructured geological document by a second large language model using the second structured prompt template, the spatial relationship information including at least one of a first reference point, a second reference point, and a distance; A coordinate calculation module configured to obtain an absolute three-dimensional coordinate of the borehole entity according to the spatial feature information and the spatial relationship information.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and run by the processor, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions for causing the computer to execute the method of any one of claims 1 to 7.