An Automatic Identification and Extraction Method for All-Element Information of Scanned Borehole Histogram

Through deep learning algorithms and pattern recognition technology, the automatic identification and extraction of all element information of the drilling histogram is realized, solving the problem of inefficient information extraction in the existing technology, and achieving the accuracy and completeness of information.

CN119600636BActive Publication Date: 2025-05-27CHINA AERO GEOPHYSICAL SURVEY & REMOTE SENSING CENT FOR LAND & RESOURCES
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411641320.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-05-27
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively extract the full element information in the drilling bar chart, especially water level information, sampling records and standard penetration information, and it is impossible to realize automated identification, resulting in inefficiency.

Method used

Deep learning algorithm combined with pattern recognition technology is adopted to realize automatic identification and extraction of all element information of the drilling bar chart through initial parameter configuration, text sample production and model training, special symbol sample production and full element information extraction and processing steps, and the recognition results are stored as structured data in XML format.

Benefits of technology

It realizes one-time batch extraction of all element information of the drilling histogram, improves the accuracy of identification of text and special symbols, establishes positional relationships between the surface elements, and ensures the integrity and shareability of information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600636B_ABST
    Figure CN119600636B_ABST
Patent Text Reader

Abstract

The present invention provides a method for automatically identifying and extracting all-element information of a scanned drilling columnar chart, which includes: (1) initializing parameter configuration; (2) making text samples and training the model, batch generating corresponding text samples according to the font information set in the initialization parameters, and training and optimizing the OCR text recognition model; (3) making special symbol samples; (4) extracting and processing all-element information of the drilling columnar chart; (5) formulating a structured storage standard for the extraction results of all-element information of the drilling columnar chart and saving it in the XML file format. The present invention has a reasonable concept, realizes the one-time batch extraction of all-element information of the drilling columnar chart, and the deep learning algorithm adopted can effectively improve the accuracy of information such as text and special symbols, establish the positional relationship between the drawing elements, and ensure that the complete information of the drilling columnar chart can be comprehensively recorded in the XML markup text without losing the drawing information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information recognition, and in particular to a method for automatically recognizing and extracting all-element information of a scanned borehole column chart. Background Art

[0002] The borehole column chart graphically represents the distribution of soil, rock, and strata at different depths below the surface, their composition, engineering mechanical parameters, groundwater level and other information. It is widely used in the fields of mineral resource investigation, geological disaster prevention, engineering geological survey, environmental geological research, etc. Figure 1 It is usually drawn through CAD drawing software or professional customized software, and output into picture format and widely used in various industries. In recent years, the secondary development and utilization value of borehole column charts has gradually been explored. It is an important data source for establishing underground three-dimensional geological models. Massive scattered drilling data can be connected into lines and surfaces through interpolation and fitting, and then geological bodies are constructed. However, hundreds of thousands of borehole column charts in picture format cannot be used directly. It is necessary to digitize and standardize the full-factor information such as numbers, text, and graphics in the picture before it can be used for analysis and processing. Manual digitization work is time-consuming and labor-intensive, and the efficiency is low. It is necessary to realize an automated method for identifying and extracting full-factor information of borehole columnar pictures.

[0003] In view of this, an efficient method for automatic extraction of drilling histogram information is proposed in Chinese patent CN201910876589, and information extraction is completed according to the process of image preprocessing, rectangular cell segmentation, and training character recognition text. A method for fast extraction of drilling histogram information is proposed in Chinese patent CN202210265364, which first extracts the drilling histogram table, then extracts the drilling information from the table file of the drilling histogram, and finally stores the drilling information in the database. In Chinese patent CN202310118513, an automatic recognition of the drawing structure information based on the drilling columnar engineering file is realized, and then the drilling data is extracted and stored in a standardized manner.

[0004] The styles, structures and fonts of borehole bar charts formed in different industries and different eras are not the same, and it is impossible to solve all information extraction problems through a recognition algorithm. The method proposed in Chinese patent CN201910876589 can effectively determine cell boundaries and recognize text information, but does not involve how to extract water level information, sampling records, standard penetration and other information in the borehole bar chart; the method proposed in Chinese patent CN202210265364 focuses on the classification acquisition and storage of information after the second step of table file extraction, but the core process of how to generate table files and text information from pictures is not elaborated in detail; the method proposed in Chinese patent CN202310118513 identifies the source of engineering files in layered vector format, which cannot solve the information extraction needs in raster images.

[0005] To sum up, it is necessary to make further innovations on existing technologies. Summary of the invention

[0006] In response to the technical problems existing in the above-mentioned background technology, the present invention proposes a method for automatically identifying and extracting all-factor information of scanned drill column charts. The method has a reasonable concept and realizes a one-time batch extraction of all-factor information of drill column charts. The deep learning algorithm adopted can effectively improve the accuracy of information such as text and special symbols, establish the positional relationship between drawing elements, and ensure that the complete information of the drill column chart can be comprehensively recorded in the XML markup text without losing the drawing information.

[0007] In order to solve the above technical problems, the present invention provides a method for automatically identifying and extracting all-factor information of a scanned borehole histogram, which mainly includes the following steps:

[0008] (1) Initialization parameter configuration

[0009] For different types of drilling histograms, initialization parameters need to be set, including font parameters, content parameters and scale parameters. The required parameters will be read from the initialization parameters during the subsequent automated processing. The parameters can be saved as configuration files for repeated use in batch processing.

[0010] (2) Text sample production and model training

[0011] Based on the font parameters in the initialization parameters set in step (1), the text sample generation model TRDG is used to batch generate text sample data according to the geological term dictionary, each set of text sample data includes a label file and an image file, and the text recognition module in the open source PP-OCRv4 model is retrained and optimized using the text sample data to obtain a new model with higher text recognition accuracy for borehole column charts;

[0012] (3) Special symbol sample production

[0013] All other drawing contents except text information in the drilling column chart are classified as special symbols. The special symbols are identified and extracted by pattern recognition. The circumscribed rectangle of the geometric boundary of the special symbol is used as the cropping frame to crop the drilling column chart to form a sample image. The number of sample images can be determined according to the characteristics of the symbol elements and the quality of the topographic map. For images with high consistency, one sample image of each type can be selected. Then, the image samples of the RGB three channels are grayed, and a grayscale image matrix is ​​established for information extraction and processing in the following step (4).

[0014] (4) Extract and process all-factor information of the borehole histogram;

[0015] (5) Establish a structured storage standard for the extraction results of all-element information of the borehole column chart and save it in XML file format.

[0016] The method for automatically identifying and extracting all-element information of a scanned drilling column chart, wherein: the initialization parameters in the step (1) include font type, drilling type, ruler type, total number of columns and ruler step length; the information contained in the drilling type in the chart includes position, column number, font type and ruler information; the ratio of depth to pixel value and the pixel size of different special symbols in the ruler information are recorded separately.

[0017] The method for automatically identifying and extracting all-factor information of a scanned borehole histogram, wherein the specific process of optimizing the text detection model and the text recognition model in the open source PP-OCRv4 model using the text sample data in step (2) is as follows: first, the text samples generated in batches are divided into a training set and a verification set, the network parameters in the PP-OCRv4 detection module are fixed, and then, the training set is used as the input data source, the learning rate, batch size, number of iterations, optimizer, data enhancement and other parameters are set, and the network parameters in the recognition module are trained, and finally, the verification set is used as the input data source to evaluate the model, and the cross entropy loss and accuracy are used as the evaluation basis;

[0018] Among them, the formula of the cross entropy loss is as follows:

[0019]

[0020] Among them, p(x) is the target distribution, q(x) is the predicted matching distribution, and the goal is to reduce the optimization error through the calculation of cross entropy loss, that is, to reduce the empirical risk of the model under the joint action of the loss function and the optimization algorithm.

[0021] The accuracy rate is the ratio of the number of samples correctly classified by the calculation model to the total number of samples, which is used to measure the effectiveness of the model. The goal is to measure the effectiveness of the model.

[0022] The method for automatically identifying and extracting all-element information of scanned borehole column charts, wherein: the PP-OCRv4 model optimized in step (2) can be exported, deployed, and reused separately in the form of a file, and is suitable for large-scale borehole column chart text recognition and extraction application scenarios.

[0023] The method for automatically identifying and extracting all-factor information of a scanned drilling column chart, wherein: the parameters set in the step (2) include learning rate, batch size, number of iterations, optimizer and data enhancement.

[0024] The method for automatically identifying and extracting all-element information of the scanned drilling column chart, wherein the specific process of graying the sample image in step (3) is as follows:

[0025] Traverse each pixel of the image, record the R, G, and B color component values ​​corresponding to the pixel with row number i and column number j as R(i, j), G(i, j), and B(i, j), respectively, then calculate the gray value formula as:

[0026] Gray value = 0.299 × R (i, j) + 0.587 × G (i, j) + 0.114 × B (i, j);

[0027] The grayscale value usually ranges from 0 to 255, representing different grayscale levels. After traversing all the pixels, a grayscale image that can be quickly read, calculated, and processed by a computer program is constructed based on the calculated grayscale value.

[0028] The method for automatically identifying and extracting all-element information of a scanned borehole column chart, wherein: the special symbol samples in step (3) include borehole water level, sampling record, standard penetration and scale information.

[0029] The method for automatically identifying and extracting all-factor information of a scanned borehole column chart, wherein: the all-factor information in step (4) mainly includes four types: grid, text, ruler and special symbols.

[0030] The method for automatically identifying and extracting all-element information of the scanned borehole histogram, wherein the specific process of step (4) is as follows:

[0031] (4.1) Preprocessing

[0032] The text information and special symbol element information in the drilling histogram are independent of color. By graying the sample image, the drilling histogram is converted into a grayscale image, thereby improving the data processing and calculation efficiency of the following steps 4.2)-4.4);

[0033] (4.2) Grid extraction

[0034] The Canny edge detection algorithm is used to extract the horizontal and vertical lines in the drilling column chart. All the extracted horizontal lines are recorded as row in order from top to bottom. 1 ,row 2 ,……,row n , all the extracted vertical lines are recorded with their horizontal coordinates as col in order from left to right 1 ,col 2 ,……,col m ;

[0035] (4.3) Text Recognition

[0036] Input the text recognition model trained in step (2) above into the deep learning recognition model to complete the recognition of all text information, save the recognized text, digital content and coordinate position, and the coordinate position calculation order is the same as the grid in step (4.2) above, starting from the upper left corner as point (0, 0);

[0037] (4.4) Special symbol recognition

[0038] The bubble method is designed to find candidate points. The special symbol samples established in the above step (3) are used for traversal matching. Starting from the upper left corner as point (0, 0), from left to right and from top to bottom, the elements are row by row and column by column with the surface content in the drilling column chart (the specific size is consistent with the size of the special symbol sample). If the similarity meets the set threshold condition, it is considered a match. At this time, the pixel coordinates of the upper left corner and the lower right corner of the recognition result are recorded;

[0039] (4.5) Relative position determination

[0040] Carry out three types of relative position judgment, including judging the relative position of text and text, judging the relative position of text and special symbols, and judging the relative position of special symbols and special symbols; record the coordinates of the center point of the text or special symbol as x i ,y i , when the center point coordinates meet the following conditions, the text or special symbol is considered to be located in the cell of row n and column m:

[0041]

[0042] Texts in the same cell are merged in the order from left to right and from top to bottom. Texts and special symbols in the same cell are considered to be descriptions of special symbols. At the same time, the product of the ordinate of the special symbol and the scale in the scale information set in the above step (1) is the depth of the special symbol:

[0043] depth = ε·y i ;

[0044] In the above formula, ε is the ratio of depth to pixel value in the scale information, y i The vertical coordinate of the center point.

[0045] The method for automatically identifying and extracting all-element information of the scanned borehole histogram, wherein the main structure of the structured storage in step (5) is as follows:

[0046] <? xml version="1.0" encoding="UTF-8"? >

[0047] <dataset>

[0048] <id> Drill ID< / id>

[0049] <projectno> Drilling project number< / projectno>

[0050] <longitude> longitude< / longitude>

[0051] <latitude> latitude< / latitude>

[0052] <north> Northing distance< / north>

[0053] <east> Easting distance< / east>

[0054] <holepointno> Drilling number< / holepointno>

[0055] <level> Layer number< / level>

[0056] <depth> depth< / depth>

[0057] <type> Classification< / type>

[0058] ……

[0059] < / dataset> .

[0060] By adopting the above technical solution, the present invention has the following beneficial effects:

[0061] The method for automatically identifying and extracting all-factor information of scanned borehole column graphs of the present invention is reasonably conceived, and can batch identify and extract all-factor information such as text, lines, special symbols, etc. in massive borehole column images, and map the identification results to information such as borehole depth, water level, sampling record, standard penetration, rock or soil property description, test results, geological primitives, etc. according to the relative position relationship set in the template making step, and transfer them to Extensible Markup Language (XML) structured data, which greatly improves the compilation efficiency of borehole column image data and promotes data sharing and exchange.

[0062] The present invention mainly has the following characteristics or advantages:

[0063] ① A method for batch extraction of all-factor information such as text, special symbols, and grids in drilling column charts was proposed, and a method for determining the positional relationship between elements was established, paving the way for structured storage of all-factor information;

[0064] ② Comprehensively utilize deep learning technology to extract text and special symbols, effectively improve the accuracy of recognition and extraction, and greatly improve the universality of the model through model training. It has also been proved in practical applications that it has good recognition effects for handwritten fonts, printed fonts, traditional Chinese, simplified Chinese, etc.;

[0065] ③ XML standard is used to store drilling histogram information, and graphical record information is converted into program-readable text markup language information. The designed structure is reasonable to ensure that the drilling histogram information is not lost. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0067] Figure 1 This is a flow chart of the method for automatically identifying and extracting all element information of a scanned borehole histogram according to the present invention;

[0068] Figure 2 This is a sample diagram of the grayscale image matrix involved in the method for automatically identifying and extracting all-factor information of the scanned borehole histogram of the present invention. DETAILED DESCRIPTION

[0069] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0070] The present invention is further explained below in conjunction with specific implementation modes.

[0071] like Figure 1 As shown, the present embodiment provides a method for automatically identifying and extracting all-element information of a scanned borehole histogram, which mainly includes the following steps:

[0072] S100, initialization parameter configuration

[0073] The styles of drill hole bar charts compiled in different eras, different industries and units are not uniform, but the categories of drill hole information contained are roughly the same; for different categories of drill hole bar charts, it is necessary to set initialization parameters such as font parameters (such as font type), content parameters (such as drill hole type, total number of columns, etc.) and ruler parameters (such as ruler type, ruler step length, etc.). In the subsequent automated processing process, the required parameters will be read from the initialization parameters, and the parameters can be saved as configuration files for repeated use in batch processing; among them, the information contained in the chart of the aforementioned drill hole type includes position, column number, font type and ruler information; the depth to pixel value ratio and the pixel size of different special symbols in the ruler information are recorded separately.

[0074] S200, text sample production and model training

[0075] Based on the font parameters in the initialization parameters set in step (1), the text sample generation model TRDG is used to batch generate text sample data according to the geological term dictionary. Each set of text sample data includes a labeling file and an image file, wherein the labeling file provides the coordinate position and category of each character in the image. The text recognition module in the open source PP-OCRv4 model is retrained and optimized using the aforementioned generated text sample data to obtain a new model with higher accuracy for text recognition of borehole column charts. The optimized PP-OCRv4 model can be exported, deployed, and reused separately in the form of files, and is suitable for large-scale borehole column chart text recognition and extraction application scenarios.

[0076] Among them, the specific process of optimizing the text recognition module in the open source PP-OCRv4 model using text sample data is as follows:

[0077] First, the batch-generated text samples are divided into a training set and a verification set, and the network parameters in the PP-OCRv4 detection module are fixed. Then, the training set is used as the input data source, and the learning rate, batch size, number of iterations, optimizer, data enhancement and other parameters are set to train the network parameters in the recognition module. Finally, the verification set is used as the input data source to evaluate the model, and the cross entropy loss and accuracy are used as the evaluation basis.

[0078] The formula for the above cross entropy loss is as follows:

[0079]

[0080] Among them, p(x) is the target distribution, q(x) is the predicted matching distribution, and the goal is to reduce the optimization error through the calculation of cross entropy loss, that is, to reduce the empirical risk of the model under the joint action of loss function and optimization algorithm;

[0081] The above accuracy is the ratio of the number of samples correctly classified by the calculation model to the total number of samples, which is used to measure the effect of the model. The goal is to measure the effect of the model.

[0082] S300, special symbol sample production

[0083] Other drawing contents in the borehole histogram except text information, such as special symbols such as borehole water level, sampling record, standard penetration, scale information, etc. are classified as special symbols. The special symbols are identified and extracted by pattern recognition. The circumscribed rectangle of the geometric boundary of the special symbol is used as the cropping frame to crop the borehole histogram to form a sample image. The number of sample images can be determined according to the characteristics of the symbol elements and the quality of the topographic map. For images with high consistency, one sample image of each type can be selected. Then, the image samples of the three channels of R, G, and B are grayed, and a storage grayscale image matrix is ​​established for the following step S400 information extraction and processing call;

[0084] The specific process of graying the sample image is as follows: traverse each pixel of the image, record the three color component values ​​of R, G, and B corresponding to the pixel with row number i and column number j as R(i, j), G(i, j), and B(i, j), respectively, and calculate the gray value formula as follows:

[0085] Gray value = 0.299 × R (i, j) + 0.587 × G (i, j) + 0.114 × B (i, j);

[0086] The grayscale value usually ranges from 0 to 255, indicating different grayscale levels;

[0087] After traversing all the pixels, a grayscale image is constructed based on the calculated grayscale values, which can be quickly read, calculated, and processed by a computer program.

[0088] S400, extract and process all the element information of the drilling column chart, mainly including four types: grid, text, ruler and special symbols. The specific steps are as follows:

[0089] S410, Preprocessing

[0090] The text information and special symbols in the drilling histogram are not related to color. By graying the sample image, the drilling histogram is converted into a grayscale image, thereby improving the data processing and calculation efficiency of the following steps S420-S440.

[0091] S420, Grid Extraction

[0092] The Canny edge detection algorithm is used to extract the horizontal and vertical lines in the drilling column chart. All the extracted horizontal lines are recorded as row in order from top to bottom. 1 ,row 2 ,row 3 ,…row n , all the extracted vertical lines are recorded with their horizontal coordinates as col in order from left to right 1 ,col 2,col 3 ,…,col m .

[0093] S430, text recognition

[0094] Input the image into the text recognition model trained in the above step S200, complete the recognition of all text information, save the recognized text, digital content and coordinate position, and the coordinate position calculation order is the same as the grid in the above step S420, starting from the upper left corner as (0, 0).

[0095] S440, special symbol recognition

[0096] Design a bubble method to find candidate points. Use the special symbol sample established in step S300 for traversal matching, starting from the upper left corner as point (0, 0), from left to right, from top to bottom, the elements are row by row and column by column with the drawing content in the drilling column chart (the specific size is consistent with the size of the special symbol sample), and the similarity is calculated. If the similarity meets the set threshold condition, it is considered a match, and the upper left corner pixel coordinates and lower right corner pixel coordinates of the recognition result are recorded.

[0097] S450, relative position determination

[0098] Three types of relative position judgments need to be carried out, including judging the relative position of text and text, judging the relative position of text and special symbols, and judging the relative position of special symbols and special symbols. The coordinates of the center point of the text or special symbol are (x i ,y i ), when the center point coordinates meet the following conditions, the text or special symbol is considered to be located in the cell of row n and column m:

[0099]

[0100] Texts in the same cell are merged in the order from left to right and from top to bottom; texts and special symbols in the same cell are determined to be descriptions of special symbols, and the product of the ordinate of the special symbol and the scale in the scale information set in the above step S100 is the depth of the special symbol:

[0101] depth = ε·y i ;

[0102] In the above formula, ε is the ratio of depth to pixel value in the scale information, y i The vertical coordinate of the center point.

[0103] S500, all extracted information of the drilling column chart stored in XML standard is structured and stored, and the main structure is as follows:

[0104] <? xml version="1.0" encoding="UTF-8"? >

[0105] <dataset>

[0106] <id> Drill ID< / id>

[0107] <projectno> Drilling project number< / projectno>

[0108] <longitude> longitude< / longitude>

[0109] <latitude> latitude< / latitude>

[0110] <north> Northing distance< / north>

[0111] <east> Easting distance< / east>

[0112] <holepointno> Drilling number< / holepointno>

[0113] <l eve l> Layer number< / l eve l>

[0114] <depth> depth< / depth>

[0115] <type> Classification< / type>

[0116] …

[0117] < / dataset> .

[0118] The present invention has a reasonable conception and realizes a one-time batch extraction of all element information of a drilling histogram. The deep learning algorithm adopted can effectively improve the accuracy of information such as text and special symbols, establish the positional relationship between drawing elements, and ensure that the complete information of the drilling histogram can be comprehensively recorded in the XML markup text without losing drawing information.

[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatically identifying and extracting all element information of a scanned borehole histogram, characterized in that , mainly including the following steps: (1) Initialization parameter configuration For different types of drilling histograms, initialization parameters need to be set, including font parameters, content parameters and scale parameters. The required parameters will be read from the initialization parameters during the subsequent automated processing. The parameters can be saved as configuration files for repeated use in batch processing. (2) Text sample production and model training Based on the font parameters in the initialization parameters set in step (1), the text sample generation model TRDG is used to batch generate text sample data according to the geological term dictionary, each set of text sample data includes a label file and an image file, and the text recognition module in the open source PP-OCRv4 model is retrained and optimized using the text sample data to obtain a new model with higher text recognition accuracy for borehole column charts; (3) Special symbol sample production All other drawing contents except text information in the drilling column chart are classified as special symbols. The special symbols are identified and extracted by pattern recognition. The circumscribed rectangle of the geometric boundary of the special symbol is used as the cropping frame to crop the drilling column chart to form a sample image. The number of sample images can be determined according to the characteristics of the symbol elements and the quality of the topographic map. For images with high consistency, one sample image of each type can be selected. Then, the image samples of the RGB three channels are grayed, and a grayscale image matrix is ​​established for information extraction and processing in the following step (4). (4) Extract and process all-factor information of the borehole histogram; (5) Establish a structured storage standard for the extraction results of all-element information of the borehole column chart and save it in XML file format.

2. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The initialization parameters in step (1) include font type, drilling type, ruler type, total number of columns and ruler step size; the information contained in the drilling type in the chart includes position, column number, font type and ruler information; the depth to pixel value ratio and pixel size of different special symbols in the ruler information are recorded separately.

3. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The specific process of optimizing the text detection model and the text recognition model in the open source PP-OCRv4 model using the text sample data in step (2) is as follows: first, the text samples generated in batches are divided into a training set and a verification set, and the network parameters in the PP-OCRv4 detection module are fixed. Then, the training set is used as the input data source, and the learning rate, batch size, number of iterations, optimizer, data enhancement and other parameters are set to train the network parameters in the recognition module. Finally, the verification set is used as the input data source to evaluate the model, and the cross entropy loss and accuracy are used as the evaluation basis. Among them, the formula of the cross entropy loss is as follows: Among them, p(x) is the target distribution, q(x) is the predicted matching distribution, and the goal is to reduce the optimization error through the calculation of cross entropy loss, that is, to reduce the empirical risk of the model under the joint action of loss function and optimization algorithm; The accuracy rate is the ratio of the number of samples correctly classified by the calculation model to the total number of samples, which is used to measure the effectiveness of the model. The goal is to measure the effectiveness of the model.

4. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The PP-OCRv4 model optimized in step (2) can be exported, deployed, and reused separately in the form of a file, and is suitable for the application scenario of text recognition and extraction of a large number of drilling column charts.

5. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The parameters set in step (2) include learning rate, batch size, number of iterations, optimizer and data enhancement.

6. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The specific process of graying the sample image in step (3) is as follows: Traverse each pixel of the image, record the R, G, and B color component values ​​corresponding to the pixel with row number i and column number j as R(i, j), G(i, j), and B(i, j), respectively, then calculate the gray value formula as: Gray value = 0.299 × R (i, j) + 0.587 × G (i, j) + 0.114 × B (i, j); The grayscale value usually ranges from 0 to 255, representing different grayscale levels. After traversing all the pixels, a grayscale image that can be quickly read, calculated, and processed by a computer program is constructed based on the calculated grayscale value.

7. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The special symbol samples in step (3) include borehole water level, sampling record, standard penetration and scale information.

8. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The full element information in step (4) mainly includes four types: grid, text, ruler and special symbols.

9. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The specific process of step (4) is as follows: (4.1) Preprocessing The text information and special symbol element information in the drilling histogram are independent of color. By graying the sample image, the drilling histogram is converted into a grayscale image, thereby improving the data processing and calculation efficiency of the following steps 4.2)-4.4); (4.2) Grid extraction The Canny edge detection algorithm is used to extract the horizontal and vertical lines in the drilling column chart. The vertical coordinates of all extracted horizontal lines are recorded as row1, row2, ..., row n , all the extracted vertical lines are recorded with their horizontal coordinates as col1, col2, ..., col m ; (4.3) Text Recognition Input the text recognition model trained in step (2) above into the deep learning recognition model to complete the recognition of all text information, save the recognized text, digital content and coordinate position, and the coordinate position calculation order is the same as the grid in step (4.2) above, starting from the upper left corner as point (0, 0); (4.4) Special symbol recognition The bubble method is designed to find candidate points. The special symbol samples established in the above step (3) are used for traversal matching. Starting from the upper left corner as point (0, 0), from left to right and from top to bottom, the elements are row by row and column by column with the surface content in the drilling column chart (the specific size is consistent with the size of the special symbol sample). If the similarity meets the set threshold condition, it is considered a match. At this time, the pixel coordinates of the upper left corner and the lower right corner of the recognition result are recorded; (4.5) Relative position determination Carry out three types of relative position judgment, including judging the relative position of text and text, judging the relative position of text and special symbols, and judging the relative position of special symbols and special symbols; record the coordinates of the center point of the text or special symbol as x i ,y i , when the center point coordinates meet the following conditions, the text or special symbol is considered to be located in the cell of row n and column m: Texts in the same cell are merged in the order from left to right and from top to bottom. Texts and special symbols in the same cell are considered to be descriptions of special symbols. At the same time, the product of the ordinate of the special symbol and the scale in the scale information set in the above step (1) is the depth of the special symbol: depth=ε·y i ; In the above formula, ε is the ratio of depth to pixel value in the scale information, y i The vertical coordinate of the center point.

10. The method for automatically identifying and extracting all-element information of a scanned borehole histogram according to claim 1, characterized in that: The main structure of the structured storage in step (5) is as follows: <? xml version="1.0" encoding="UTF-8"? > <dataset>< / dataset> <id> Drill ID< / id> <projectno> Drilling project number< / projectno> <longitude> longitude< / longitude> <latitude> latitude< / latitude> <north> Northing distance< / north> <east> Easting distance< / east> <holepointno> Drilling number< / holepointno> <level> Layer number< / level> <depth> depth< / depth> <type> Classification< / type> …… 。

Citation Information

Patent Citations

  • Automatic extraction method of borehole columnar section information

    CN110826393B

  • Rapid drilling histogram information extraction method

    CN114648009A

  • Drilling histogram data processing method and device, electronic equipment and storage medium

    CN116166729A

  • A method for extracting bore histogram information in batch

    CN109388683A

  • Efficient drilling histogram information automatic extraction method

    CN110826393A