Table information extraction method and system for subject matter attribute detail table and medium

By extracting the table information of the auction subject attribute details table, using the BERT model and cell classification model, combined with the path query technology, the problem of insufficient accuracy and universality of the auction table information extraction is solved, and efficient and accurate Data extraction, suitable for auction forms with complex structures.

CN119271815AActive Publication Date: 2025-01-07HEFEI DAZHIHUI CAIHUI DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411283115.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-01-07
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

In the auction field, the table information extraction of the attribute details table of the auction subject matter is insufficient in accuracy and universality. The traditional manual extraction method is time-consuming and difficult to ensure the accuracy and completeness of the data. The general information extraction algorithm is difficult to adapt to different formats and contents. form.

Method used

A method is adopted, including obtaining HTML documents for preprocessing, extracting feature matrix in text strings, using trained cell classification models for category discrimination, and obtaining data information in the table through path query, and using BERT model for text Coding and feature extraction, combining convolutional neural networks and global pointer networks, cell category discrimination, and the generalization ability of the model is enhanced through adversarial training.

Benefits of technology

It improves the accuracy and completeness of information extraction, can handle tables with complex structures, enhances the universality of extraction, reduces the workload of manual feature engineering, and improves the efficiency and accuracy of data extraction of auction tables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271815A_ABST
    Figure CN119271815A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing and information extraction, and discloses a table information extraction method and system for a subject matter attribute detail table and a medium. The method comprises the steps of obtaining an HTML document of a target table, and preprocessing the HTML document to obtain a text character string of the target table; extracting a plurality of features in the text character string to construct a feature matrix; the multiple features comprise text features, position features and label features; inputting the feature matrix into a trained cell classification model, and outputting all cell category discrimination results of the target table; and performing path query in all the cells of the target table based on the cell category judgment result, thereby obtaining all data information capable of forming groups in the target table. According to the method, the accuracy and universality of table information extraction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing and information extraction, and in particular to a method, system and medium for extracting table information from a table of object attribute details. Background Art

[0002] With the rapid development of e-commerce and Internet technology, auctions have become increasingly popular as an important way of commodity trading, and its transaction data has emerged in large quantities on the Internet platform. In the auction field, the auction object attribute details table usually contains a large amount of key content such as commodity information, price data, bidder information, etc. The traditional manual extraction method is not only time-consuming and labor-intensive, but also difficult to ensure the accuracy and completeness of the data. Therefore, developing an efficient and accurate auction table information extraction technology is of great significance to improving the efficiency and accuracy of auction activities.

[0003] Although information extraction technology has made some progress, there are still some problems and challenges in extracting auction table information. For example, the format and content of the table often vary from auction to auction, which makes it difficult for general information extraction algorithms to adapt to all situations. For the table of subject matter attribute details on different platforms, the naming of proper nouns is relatively different, and it is often difficult to distinguish them through simple and unified rules, which limits the accuracy and universality of table information extraction, so it is urgent to solve it. Summary of the invention

[0004] In order to solve the technical problem in the prior art that the accuracy and versatility of table information extraction need to be improved, the present invention provides a method, system and medium for extracting table information for a target object attribute details table.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] The present invention discloses a method for extracting table information from a table of subject matter attributes, comprising:

[0007] Obtaining the HTML document of the target table, and preprocessing the HTML document to obtain the text string of the target table;

[0008] Extracting multiple features from the text string to construct a feature matrix; the multiple features include text features, position features, and label features;

[0009] Input the feature matrix into a trained cell classification model, and output all cell classification results of the target table;

[0010] Based on the cell category discrimination result, a path query is performed in all cells of the target table to obtain all data information that can form a group in the target table.

[0011] As a further improvement of the above solution, before constructing the feature matrix, the table information extraction method further includes:

[0012] Split the text string into several tokens to form a token sequence;

[0013] Using a predefined vocabulary, map each token in the token sequence to a unique identifier;

[0014] Fill the token sequence to the maximum fixed length;

[0015] Create an attention mask for the padded token sequence to distinguish between actual tokens and padded tokens.

[0016] As a further improvement of the above solution, the extracting multiple features from the text string includes:

[0017] The text string is encoded using the BERT model, and a first text feature, a second text feature, and a third text feature are extracted, and the text features are used as inputs of a convolutional neural network and a global pointer network; wherein the first text feature is used to represent a numerical sequence of text content; the second text feature is used to indicate an actual token in a token sequence; and the third text feature is used to indicate a token in a token sequence corresponding to a row start cell and a column start cell;

[0018] Extract the index position of the token corresponding to the non-filled cell in the target table in the token sequence to form a position feature;

[0019] One or more labels belonging to each cell are extracted to form label features; wherein the labels are divided into indicator name labels or value labels, and the indicator name labels are provided with at least one level.

[0020] As a further improvement of the above solution, the training method of the cell classification model includes:

[0021] Initialize the pre-trained BERT model;

[0022] Cell category discrimination is performed based on convolutional neural networks and global pointer networks; the convolutional neural network is used to capture local features and patterns; the global pointer network is used to determine the global relationship between different elements in the table;

[0023] Select the Adam optimizer to update the parameters of the cell classification model;

[0024] Train the cell classification model using the training dataset and periodically evaluate the model performance on the validation dataset to monitor overfitting;

[0025] Adjusting hyperparameters based on the performance of the cell classification model on the validation set; the hyperparameters include learning rate, batch size, and number of layers;

[0026] Adopt PGD’s iterative perturbation to add adversarial training;

[0027] The final performance of the cell classification model is evaluated on an independent test data set using preset indicators, and a trained cell classification model is obtained after the evaluation is qualified; the preset indicators include accuracy, recall rate and F1 score.

[0028] As a further improvement of the above solution, the category discrimination result of each cell includes four parameters, namely: label category, cell row, cell column, and label confidence.

[0029] As a further improvement of the above solution, the path query is performed in all cells of the target table based on the cell category discrimination result, so as to obtain all data information that can form a group in the target table, including:

[0030] S41. Locate any initial cell having a first-level indicator name label, and search for the next cell to the right of the initial cell;

[0031] S42. If the next cell is a cell with a value label, the initial cell and the cell with the value label form a group, and the data information of the group is obtained horizontally;

[0032] S43. If the next cell is a cell with a secondary indicator name label, continue to search to the right and satisfy the decreasing level of the indicator name labels between cells until a cell with a value label appears. The cells with decreasing levels of indicator name labels and cells with value labels form a group, and the data information of the group is obtained horizontally;

[0033] S44. If the next cell is still a cell with a first-level indicator name label, it is determined that the current path query to the right of the initial cell fails, and then step S45 is executed;

[0034] S45. Searching for the next cell below the initial cell, and referring to steps S42 to S43, determining whether the cells along the vertical direction can form a group, if so, obtaining the data information of the group in the vertical direction;

[0035] S46. Referring to steps S41 to S45, traverse all cells in the target table with first-level indicator name labels to obtain all data information in the target table that can form a group.

[0036] As a further improvement of the above solution, the preprocessing of the HTML document to obtain the text string of the target table includes:

[0037] Eliminate garbled characters in HTML documents and convert punctuation marks uniformly;

[0038] Use regular expression method to get the text string of the complete target table;

[0039] Remove unnecessary tags from HTML documents;

[0040] Fill the blank cells in the target table to form filled cells and non-filled cells.

[0041] The present invention also discloses a table information extraction system for a target object attribute details table, comprising: a data acquisition module and a data processing module.

[0042] The data acquisition module is used to obtain the HTML document of the target table and pre-process the HTML document to obtain the text string of the target table.

[0043] The data processing module is used to extract multiple features from the text string to construct a feature matrix; the multiple features include text features, position features and label features; the data processing module is also used to input the feature matrix into a trained cell classification model and output all cell category discrimination results of the target table; the data processing module is also used to perform path query in all cells of the target table based on the cell category discrimination results, so as to obtain all data information that can form a group in the target table.

[0044] The present invention also discloses a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the method for extracting table information from a table of object attribute details as described above are implemented.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] 1. The information extraction method of the present invention, model + path query, has better information accuracy than pure model extraction. Through path query, the logical structure of the table can be understood. For example, when there are multiple sub-indicators under an indicator name, the path query can extract a complete data set in hierarchical order. This method improves the accuracy and completeness of information extraction, can process tables with complex structures, and is particularly suitable for table data extraction tasks in the auction field, thereby improving the versatility of table information extraction.

[0047] 2. The present invention uses the BERT model to automatically encode and extract features of text strings in the table, reducing the workload of manual feature engineering and enhancing the generalization ability and robustness of the model through adversarial training. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flowchart of a method for extracting table information from a target object attribute details table in Embodiment 1 of the present invention. Figure 2 This is a structural diagram of a table information extraction system for a target object attribute details table in Example 2 of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.

[0050] Example 1

[0051] See also Figure 1 This embodiment provides a method for extracting table information from a target object attribute details table, including steps S1 to S4.

[0052] S1. Obtain the HTML document of the target table, and pre-process the HTML document to obtain the text string of the target table. The pre-processing process includes steps S11 to S14.

[0053] S11. Remove garbled characters in HTML documents and convert punctuation marks uniformly.

[0054] S12. Use the regular expression method to obtain the text string of the complete target table.

[0055] S13. Remove unnecessary tags from HTML documents, and only keep special tags such as colspan and rowspan.

[0056] S14. Fill the blank cells in the target table with the filling content "PAD", thereby forming filled cells and non-filled cells.

[0057] After preprocessing, the table information extraction method may further include the following data loading and preliminary processing steps, namely S15 to S18.

[0058] S15. Use a tokenizer to split a text string into several tokens to form a token sequence, which is the basis of natural language processing. Mathematically, this can be regarded as a mapping process, mapping the input text T to the token sequence t1, t2, ..., t n Above, n is the maximum fixed length.

[0059] S16. Use the predefined vocabulary V to map each token in the token sequence to a unique identification code. This is a mapping from a vocabulary to a set of integers, i.e., V:t→id.

[0060] S17. Sequence padding: To ensure the uniformity of the input sequence, the token sequence is padded to a maximum fixed length l; mathematically, this can be expressed as P(t) = t◇[0] l-|t| . Where ◇ represents sequence concatenation; P(t) represents the processing of each token, converting it into a numerical form that the BERT model can understand; [0] represents a padding item used to achieve the fixed sequence length required by the model.

[0061] S18. Create attention masks (i.e., attention_masks) for the padded token sequence to distinguish the actual token from the padded token, which helps the model ignore the padded part and focus on the valid information.

[0062] S2. After the data preprocessing is completed, the tabular text data is converted into a numerical feature representation that can be processed by the model, and feature extraction is performed, that is, multiple features in the text string are extracted to construct a feature matrix; the multiple features include text features, position features, and label features. Step S2 may include S21 to S23.

[0063] S21. Use the BERT model to encode the text string (i.e., the text content in the table, such as the name of the auction item, the certificate status, etc.), and extract the first text feature, the second text feature, and the third text feature. The text features are used as inputs to the convolutional neural network and the global pointer network; wherein, the first text feature is used to represent the numerical sequence of the text content; the second text feature is used to indicate the actual token in the token sequence, usually 1 represents the actual token, and 0 represents the fill token; the third text feature is used to indicate the token in the token sequence corresponding to the row start cell and the column start cell, so that the start of different rows or columns can be distinguished for the tabular data.

[0064] S22. Extract the index position of the token corresponding to the non-filled cell in the target table in the token sequence to form a position feature, which helps the model understand the relative position of the cell in the table.

[0065] S23. Extract one or more labels belonging to each cell to form label features; wherein the labels are divided into indicator name labels or value labels. In this embodiment, the indicator name labels have at least one level and at most two levels. Of course, in other embodiments, more levels can be set at most.

[0066] Each cell can have multiple labels, because there are different types of indicator values, such as rights restriction-indicator value, lot name-indicator value, other indicator values, etc. A cell may belong to both special indicator values ​​and ordinary indicator values. When there are multiple lots in a table, which is equivalent to a subtable, the cells in the first column of the subtable will be considered to have the label "serial identifier" in addition to the original label as the identifier for finding the subtable.

[0067] As shown in the original example of Table 1, in this table, "Lot Name", "Lot Owner", and "Rights Restriction Status" are all first-level indicator name labels, "Mortgage Status" is a second-level indicator name label, and "Electric Vehicle", "Zhang San", and "Mortgaged" are all value labels.

[0068] Table 1: Example of original text of table

[0069]

[0070] (1) Use BertTokenizer to encode the text content in Table 1.

[0071] The maximum fixed length of the sequence is l=32. If the number of tokens in a sequence is less than 32, a [PAD] tag needs to be added at the end of the sequence. The identification code of [PAD] is 0.

[0072] The filled input_ids (the token sequence corresponding to the identity identification code) and attention_mask (the token sequence corresponding to the attention mask) are shown as follows.

[0073] For the text "electric vehicle":

[0074] input_ids: [101, 2687, 102, 0, 0,..., 0];

[0075] attention_mask: [1, 1, 1, 0, 0,..., 0].

[0076] For the text "Zhang San":

[0077] input_ids: [101, 3214, 102, 0, 0,..., 0];

[0078] attention_mask: [1, 1, 1, 0, 0,..., 0].

[0079] For the text "Mortgage situation: Unsecured":

[0080] input_ids: [101, 1503, 102, 1704, 102, 0,..., 0];

[0081] attention_mask: [1, 1, 1, 1, 1, 0,..., 0].

[0082] In the above examples, all are filled to 32 tokens; 101 is the [CLS] token of the BERT model, used for the start of the sequence; 102 is the [SEP] token, used for the end of the sequence; 2687, 3214, 1503, and 1704 are the identity identification codes of the four words "electric vehicle", "Zhang San", "mortgage situation", and "unsecured" respectively.

[0083] (2) Construct the label matrix

[0084] The label matrix will be used to record the position of each label in the table. Since the table is 3 rows and 3 columns, the label matrix can be regarded as a two-dimensional matrix with dimensions (number of rows, number of columns). In this example, the dimension of the label matrix is (3, 3), where except for the cell corresponding to the index name 1 marked as 0, the cell corresponding to the index name 2 marked as 1, and the cell corresponding to the index value marked as 2. The label matrix example is as follows:

[0085] [0, 2, 2], that is, the first row: ["Index Name 1", "Index Value", "Index Value"]

[0086] [0,2,2], that is, the second row: ["Indicator Name 1","Indicator Value","Indicator Value"]

[0087] [0,1,2], that is, the third row: ["Indicator Name 1", "Indicator Name 2", "Indicator Value"]

[0088] (3) Build a location list

[0089] The position list records the index position of each label in the label matrix. In this example, each label corresponds to one position because each label only appears once. The position list example is as follows:

[0090] [1, 1], that is, "Indicator Name 1" is in the 1st row and 1st column

[0091] [1, 2], that is, the "index value" is in the 1st row and 2nd column

[0092] [1, 3], that is, the "index value" is in the 1st row and 3rd column

[0093] [2, 1], that is, "Indicator Name 1" is in the 2nd row and 1st column

[0094] [2, 2], that is, the "index value" is in the 2nd row and 2nd column

[0095] [2, 3], that is, the "index value" is in the 2nd row and 3rd column

[0096] [3, 1], that is, "Indicator Name 1" is in the 3rd row and 1st column

[0097] [3, 2], that is, "Indicator Name 2" is in the 3rd row and 2nd column

[0098] [3, 3], that is, the "index value" is in the 3rd row and 3rd column

[0099] S3. Input the feature matrix into the trained cell classification model, and output the classification results of all cells in the target table. The training method of the cell classification model includes S31 to S37.

[0100] S31. Model initialization, load the pre-trained BERT model parameters θ. The BERT model can capture the complex relationship between words.

[0101] S32. Cell category discrimination is performed based on two classification algorithms: convolutional neural network and global pointer network. Among them, convolutional neural network is used to capture local features and patterns; global pointer network is used to determine the global relationship between different elements in the table.

[0102] The classification method based on convolutional neural network (CNN) captures local features and patterns, and uses convolutional neural network to process tabular data. CNN is particularly suitable for processing data with grid-like topology, such as images and tables. By using convolutional layers, the core idea is to use convolutional layers to extract local features of input data. Among them, the two-dimensional convolution can be expressed as:

[0103] (f*g)(i,j)=∑ m ∑ n f(m,n)·g(im,jn)

[0104] In the formula, f is the input data (such as a local area of ​​an image or table), g is the convolution kernel, * represents the convolution operation, i and are the indices of the output feature map. m represents the step size of the convolution kernel sliding on the input data; n represents the dimension of the convolution kernel matrix.

[0105] Determine the relationship between different elements in the table based on the Global Pointer Network. This is a model based on the attention mechanism. The Global Pointer Network captures global dependencies by calculating the attention score of each element in the input sequence to other elements.

[0106] S33. Use the Adam optimizer to update the parameters of the cell classification model according to the gradient of the loss function. The update rule is:

[0107]

[0108] Where v is the momentum term; v t represents the momentum estimate at step t; v t+1 represents the momentum estimate at step t+1, which is used to consider the exponentially weighted average of past gradients; η t is the adjusted learning rate, β1 is a hyperparameter in the Adam optimizer used to calculate the first-order moment estimate; Indicates that the parameter θ t The gradient of the loss function J at θ; J represents the loss function; θ t represents the parameter update of step t; θ t+1 represents the parameter update at step t+1; β2 represents the hyperparameter in the Adam optimizer, which is used to calculate the second-order moment estimate.

[0109] S34. Train the cell classification model using the training dataset and periodically evaluate the model performance on the validation dataset to monitor overfitting.

[0110] S35. Adjust hyperparameters according to the performance of the cell classification model on the validation set; the hyperparameters include learning rate, batch size and number of layers.

[0111] S36. Adversarial training: Enhance model robustness through adversarial training techniques such as PGD. The iterative perturbation addition of PGD can be expressed as:

[0112]

[0113] In the formula, Clip ∈ (·) represents the clipping operation, ensuring that the updated parameter θ t+1 With the original parameter θ t The difference is kept within the ∈ ball, which ensures that the amplitude of the perturbation does not exceed a certain limit value ∈; α represents the perturbation step size (or learning rate), which controls the amplitude of the perturbation in each iteration; sign represents the sign of the gradient, which is used to determine the direction of the perturbation.

[0114] For example, the feature matrix formed in Table 1 is input into the cell classification model, and the following results are obtained:

[0115] {["First-level indicator name label",0,0,0.9999999999021745],["Value label",0,1,0.99999999943139526],["Value label",0,2,0.99999999943129543],["First-level indicator name label",1,0,0.99999999999997289],["Value label",1,1,0.99999999986302166],["Value label",1,1,0.99999999986302253],["First-level indicator name label",2,0,1.0],["Second-level indicator name label",2,1,0.99999999997916862],["Value label",2,2,1.0]}.

[0116] Each cell returns four parameters as the category discrimination result of the cell. The first parameter represents the label category, the second parameter represents the row where the cell is located, the third parameter represents the column where the cell is located, and the fourth parameter represents the confidence of the label.

[0117] By introducing adversarial perturbations, the model is trained to recognize and adapt to small changes in the input data, which helps the model remain stable in the face of noise and outliers in real applications. In the context of tabular information extraction, adversarial training can help the model better handle tabular data of different formats and styles, and improve the accuracy and reliability of the extraction results. It is a method to improve the generalization ability and robustness of the model.

[0118] S37. The final performance of the cell classification model is evaluated using preset indicators on an independent test data set, and a trained cell classification model is obtained after the evaluation is qualified; the preset indicators include accuracy, recall rate and F1 score.

[0119] S4. Based on the cell category discrimination result, a path query is performed in all cells of the target table, so as to obtain all data information that can form a group in the target table.

[0120] Due to inherent thinking habits, the table will only be constructed to the right or downward. In addition, since the specific type of table has been found when constructing the corpus training model, step S4 in this embodiment may include S41 to S46.

[0121] S41. Locate any initial cell having a first-level indicator name label, and search for the next cell to the right of the initial cell;

[0122] S42. If the next cell is a cell with a value label, the initial cell and the cell with the value label form a group, and the data information of the group is obtained horizontally;

[0123] S43. If the next cell is a cell with a secondary indicator name label, continue to search to the right and satisfy the decreasing level of the indicator name labels between cells until a cell with a value label appears. The cells with decreasing levels of indicator name labels and cells with value labels form a group, and the data information of the group is obtained horizontally;

[0124] S44. If the next cell is still a cell with a first-level indicator name label, it is determined that the current path query to the right of the initial cell fails, and then step S45 is executed;

[0125] S45. Searching for the next cell below the initial cell, and referring to steps S42 to S43, determining whether the cells along the vertical direction can form a group, if so, obtaining the data information of the group in the vertical direction;

[0126] S46. Referring to steps S41 to S45, traverse all cells in the target table with first-level indicator name labels to obtain all data information in the target table that can form a group.

[0127] Example 2

[0128] This embodiment provides a table information extraction system for a target object attribute details table, including: a data collection module 101 and a data processing module 102 .

[0129] The data collection module 101 is used to obtain the HTML document of the target table and pre-process the HTML document to obtain the text string of the target table.

[0130] The data processing module 102 is used to extract multiple features from the text string to construct a feature matrix; the multiple features include text features, position features and label features; the data processing module 102 is also used to input the feature matrix into a trained cell classification model and output all cell category discrimination results of the target table; the data processing module 102 is also used to perform path query in all cells of the target table based on the cell category discrimination results, so as to obtain all data information that can form a group in the target table.

[0131] In this embodiment, the table information extraction system can implement the steps of the table information extraction method described in Example 1.

[0132] Example 3

[0133] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the method for extracting table information for the target object attribute details table in Embodiment 1 are implemented.

[0134] The computer-readable storage medium may include flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the storage medium may also include both an internal storage unit of a computer device and an external storage device thereof. In this embodiment, the memory is generally used to store an operating system and various application software installed on the computer device, etc. In addition, the memory may also be used to temporarily store various types of data that have been output or are to be output.

[0135] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for extracting table information from a table of object attribute details, characterized in that: include: Obtaining the HTML document of the target table, and preprocessing the HTML document to obtain the text string of the target table; Extracting multiple features from the text string to construct a feature matrix; The multiple features include text features, location features and label features; Input the feature matrix into a trained cell classification model, and output all cell classification results of the target table; Based on the cell category discrimination result, a path query is performed in all cells of the target table to obtain all data information that can form a group in the target table.

2. The method for extracting table information from a table of object attribute details according to claim 1, characterized in that: Before constructing the feature matrix, the table information extraction method further includes: Split the text string into several tokens to form a token sequence; Using a predefined vocabulary, map each token in the token sequence to a unique identifier; Fill the token sequence to the maximum fixed length; Create an attention mask for the padded token sequence to distinguish between actual tokens and padded tokens.

3. The method for extracting table information from a table of object attribute details according to claim 2, characterized in that: The extracting of multiple features from the text string includes: The text string is encoded using the BERT model, and a first text feature, a second text feature, and a third text feature are extracted, and the text features are used as inputs of a convolutional neural network and a global pointer network; wherein the first text feature is used to represent a numerical sequence of text content; the second text feature is used to indicate an actual token in a token sequence; and the third text feature is used to indicate a token in a token sequence corresponding to a row start cell and a column start cell; Extract the index position of the token corresponding to the non-filled cell in the target table in the token sequence to form a position feature; One or more labels belonging to each cell are extracted to form label features; wherein the labels are divided into indicator name labels or value labels, and the indicator name labels are provided with at least one level.

4. The method for extracting table information from a table of object attribute details according to claim 3, characterized in that: The training method of the cell classification model includes: Initialize the pre-trained BERT model; Cell category discrimination is performed based on convolutional neural networks and global pointer networks; the convolutional neural network is used to capture local features and patterns; the global pointer network is used to determine the global relationship between different elements in the table; Select the Adam optimizer to update the parameters of the cell classification model; Train the cell classification model using the training dataset and periodically evaluate the model performance on the validation dataset to monitor overfitting; Adjusting hyperparameters based on the performance of the cell classification model on the validation set; the hyperparameters include learning rate, batch size, and number of layers; Adopt PGD’s iterative perturbation to add adversarial training; The final performance of the cell classification model is evaluated on an independent test data set using preset indicators, and a trained cell classification model is obtained after the evaluation is qualified; the preset indicators include accuracy, recall rate and F1 score.

5. The method for extracting table information from a table of object attribute details according to claim 1, characterized in that: The category discrimination result of each cell includes four parameters, namely: label category, cell row, cell column, and label confidence.

6. The method for extracting table information from a table of object attribute details according to claim 5, characterized in that: The path query is performed in all cells of the target table based on the cell category discrimination result, so as to obtain all data information that can form a group in the target table, including: S41. Locate any initial cell having a first-level indicator name label, and search for the next cell to the right of the initial cell; S42. If the next cell is a cell with a value label, the initial cell and the cell with the value label form a group, and the data information of the group is obtained horizontally; S43. If the next cell is a cell with a secondary indicator name label, continue to search to the right and satisfy the decreasing level of the indicator name labels between cells until a cell with a value label appears. The cells with decreasing levels of indicator name labels and cells with value labels form a group, and the data information of the group is obtained horizontally; S44. If the next cell is still a cell with a first-level indicator name label, it is determined that the current path query to the right of the initial cell fails, and then step S45 is executed; S45. Searching for the next cell below the initial cell, and referring to steps S42 to S43, determining whether the cells along the vertical direction can form a group, if so, obtaining the data information of the group in the vertical direction; S46. Referring to steps S41 to S45, traverse all cells in the target table with first-level indicator name labels to obtain all data information in the target table that can form a group.

7. The method for extracting table information from a table of object attribute details according to claim 1, characterized in that: The step of preprocessing the HTML document to obtain a text string of the target table includes: Eliminate garbled characters in HTML documents and convert punctuation marks uniformly; Use regular expression method to get the text string of the complete target table; Remove unnecessary tags from HTML documents; Fill the blank cells in the target table to form filled cells and non-filled cells.

8. A table information extraction system for a table of subject matter attributes, characterized in that: include: A data acquisition module is used to obtain an HTML document of a target table and pre-process the HTML document to obtain a text string of the target table; A data processing module is used to extract multiple features from the text string to construct a feature matrix; the multiple features include text features, position features and label features; the data processing module is also used to input the feature matrix into a trained cell classification model and output all cell category discrimination results of a target table; the data processing module is also used to perform path query in all cells of the target table based on the cell category discrimination results, so as to obtain all data information that can form a group in the target table.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for extracting table information for a target object attribute details table according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Table index information extraction method based on graph attention network

    CN116795833A

  • Method and device for restoring wireless table in PDF file and storage medium

    CN117710997A