WO2022105297A1 - 表格结构的还原方法、系统、计算机设备及存储介质 - Google Patents

表格结构的还原方法、系统、计算机设备及存储介质 Download PDF

Info

Publication number
WO2022105297A1
WO2022105297A1 PCT/CN2021/109491 CN2021109491W WO2022105297A1 WO 2022105297 A1 WO2022105297 A1 WO 2022105297A1 CN 2021109491 W CN2021109491 W CN 2021109491W WO 2022105297 A1 WO2022105297 A1 WO 2022105297A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
recognition model
training
nodes
preset
Prior art date
Application number
PCT/CN2021/109491
Other languages
English (en)
French (fr)
Inventor
王文浩
徐国强
Original Assignee
深圳壹账通智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2022105297A1 publication Critical patent/WO2022105297A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/412Layout analysis of documents structured with printed lines or input boxes, e.g. business forms or tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present application relates to the technical field of artificial intelligence, and in particular, to a method, system, computer device, and computer storage medium for restoring a table structure.
  • Tables are simple and standardized as a form of structured data. Because of the clear structure of tabular data, users can quickly understand it, so financial data, statistical data and other digital information are usually presented in tabular form, especially tabular data is the key information in financial data. More and more attention is paid by financial personnel. Although table data extraction is a common processing operation in various fields, manually extracting data information from tables is usually a tedious and time-consuming process. Therefore, various fields need an extraction method that can automate the completion of tabular data to replace manual operations.
  • An embodiment of the present application provides a method for restoring a table structure, and the method for restoring a table structure includes:
  • Post-processing is performed on the node relationship to restore the table structure of the to-be-identified table.
  • the present application also provides a table-structured restoration system, wherein the table-structured restoration system includes:
  • the building module is used to construct the node feature of each table node in the table to be identified
  • the identification module is used to call a preset table identification model, so that the table identification model can output the node relationship between the table nodes according to the node characteristics, wherein the table identification model is based on graph convolution in advance network training;
  • a restoration module configured to perform post-processing on the node relationship to restore the table structure of the to-be-identified table.
  • the present application also provides a computer device, the computer device comprising: a memory, a processor, a communication bus, and a restoration program of a table structure stored on the memory,
  • the communication bus is used to realize the communication connection between the processor and the memory
  • the processor is used for executing the restoration program of the table structure, so as to realize the following steps:
  • Post-processing is performed on the node relationship to restore the table structure of the to-be-identified table.
  • the present application also provides a computer storage medium, the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors for:
  • Post-processing is performed on the node relationship to restore the table structure of the to-be-identified table.
  • FIG. 1 is a schematic structural diagram of a computer equipment hardware operating environment involved in a method according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of an embodiment of a method for restoring a table structure of the application
  • FIG. 3 is a schematic diagram of an application scenario involved in an embodiment of a method for restoring a table structure of the application
  • FIG. 4 is a schematic diagram of functional modules of the restoration system of the table structure of the present application.
  • the main solutions of the embodiments of the present application are: by constructing the node features of each table node in the table to be recognized; calling a preset table recognition model, so that the table recognition model can output the mutual relationship between the table nodes according to the node features.
  • tables are a form of structured data, they are both simple and standardized. Because of the clear structure of tabular data, users can quickly understand it, so financial data, statistical data and other digital information are usually presented in tabular form, especially tabular data is the key information in financial data. More and more attention is paid by financial personnel.
  • table data extraction is a common processing operation in various fields, manually extracting data information from tables is usually a tedious and time-consuming process. Therefore, various fields need an extraction method that can automate the completion of tabular data to replace manual operations.
  • the solution provided by this application in the process of restoring the table data table structure, takes the table data as the table to be identified and constructs the node characteristics of each table node in the table to be identified, and then calls the pre-based graph convolution network
  • the table recognition model obtained by training takes the respective node features of each table node as input, for the table recognition model to predict and output the node relationship between each table node in the table to be recognized according to the node feature, and finally, for the table recognition model.
  • the node relationship between each table node is post-processed to restore the table structure of the table to be identified.
  • the present application realizes that the table recognition model trained based on the graph convolution network predicts and outputs the node relationship according to the node characteristics of the table to be recognized, and then performs post-processing operations on the node relationship to restore the table structure of the table to be recognized. Therefore, the table structure can be automatically recognized and restored without the need for high quality images of table data, the dependence of the identification and restoration of the table structure on the image quality is relieved, and the recognition accuracy of the table structure and the table restoration efficiency are improved.
  • FIG. 1 is a schematic diagram of a device structure of a hardware operating environment of a computer device involved in an embodiment of the present application.
  • the computer device in the embodiment of the present application may be terminal devices such as a PC, a smart phone, a tablet computer, and a portable computer.
  • the computer device may include: a processor 1001 , such as a CPU, a communication bus 1002 , a user interface 1003 , a network interface 1004 , and a memory 1005 .
  • the communication bus 1002 is used to realize the connection and communication between these components.
  • the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may include a standard wired interface and a wireless interface (eg, a WI-FI interface).
  • the memory 1005 may be high-speed RAM memory, or may be non-volatile memory, such as disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .
  • the computer device may further include a camera, an RF (Radio Frequency, radio frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like.
  • sensors such as light sensors, motion sensors and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and/or the backlight when the device is moved to the ear .
  • the gravitational acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the posture of the device (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. Repeat.
  • the device structure shown in FIG. 1 does not constitute a limitation on the computer device.
  • the computer device may also include more or less components than those shown in the figure, or combine certain components. components, or a different arrangement of components.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a restoration program of a table structure.
  • the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server;
  • the user interface 1003 is mainly used to connect the client (client) and perform data communication with the client; and the processing
  • the device 1001 can be used to call the restoration program of the table structure stored in the memory 1005, and perform the following steps:
  • Post-processing is performed on the node relationship to restore the table structure of the to-be-identified table.
  • the graph convolutional network includes but is not limited to a two-layer graph convolutional network
  • the processor 1001 can be used to call the restoration program of the table structure stored in the memory 1005, and call the preset table recognition model during execution to provide Before the step of outputting the node relationship between each of the table nodes according to the node feature, the table recognition model further performs the following steps:
  • the training data includes a training sample table and a training test table
  • the processor 1001 can be used to call the restoration program of the table structure stored in the memory 1005, and also perform the following steps:
  • the to-be-confirmed table recognition model is used as the trained table recognition model.
  • the processor 1001 can be configured to call the restoration program of the table structure stored in the memory 1005, execute the construction of the second node feature of each table node in the training and test table, and input the second node feature into the After the step of testing the to-be-confirmed form recognition model and determining the test result, the following steps are also performed:
  • test result does not meet the preset model identification conditions, a new training sample table is constructed to retrain the two-layer graph convolutional network.
  • processor 1001 can be used to call the restoration program of the table structure stored in the memory 1005, and also perform the following steps:
  • An aggregation operation is performed on the cell feature set to obtain respective node features of each of the table nodes.
  • the table identification model is stored in the block chain, and the node relationship includes but is not limited to horizontal, vertical and irrelevant
  • the processor 1001 can be used to call the restoration program of the table structure stored in the memory 1005, and also execute The following steps:
  • processor 1001 can be used to call the restoration program of the table structure stored in the memory 1005, and also perform the following steps:
  • a preset maximal clique algorithm is used to perform post-processing on the node relationship to restore the table structure of the to-be-recognized table to obtain a complete table.
  • the present application provides a method for restoring a table structure.
  • FIG. 2 is a schematic flowchart of the first embodiment of the method for restoring the table structure of the application.
  • the method for restoring the table structure includes:
  • Step S100 constructing node features of each table node in the table to be identified
  • the terminal device takes the table data as the table to be recognized and sequentially constructs the respective node features of the table nodes for each table node in the table to be recognized.
  • the table to be identified is any table data received by the terminal device that needs to be identified and/or restored by the table structure, such as enterprise financial table data, enterprise personnel statistics table data, etc. It should be understood that however, based on the different design requirements of practical applications, among other feasible real-time methods, the table to be identified can of course also be other types of table data that are different from those listed here.
  • the table data type of the table to be identified is specifically limited.
  • each table node in the table to be identified may specifically be each cell in the table to be identified. It should be understood that, based on different design requirements of practical applications, in other feasible real-time methods, Of course, other elements in the table to be recognized that are different from the cells mentioned here can also be used as table nodes. Similarly, the method for restoring the table structure of the present application does not specifically limit the element type of the table node in the table to be recognized.
  • step S100 may include:
  • Step S101 establishing cell characteristics of each of the table nodes in the table to be identified
  • the cell characteristics of each table node include but are not limited to: cell coordinates, cell size, and frequency of cell text types.
  • the cell coordinates may be In the table to be recognized, the horizontal and vertical coordinates of the upper left corner of the text box position of each table node (that is, the cell), the horizontal and vertical coordinates of the lower right corner of the text box position of the cell, and the coordinates of the center position of the text box of the cell.
  • the size may specifically be the width and height of the text box of each cell in the table to be recognized, and the frequency of the text type of the cell may specifically be the frequency of the text type of each cell in the table to be recognized, and the frequency of the text type of each cell as letters.
  • the frequency, the frequency that the text type is a space, or the frequency that the text is any other type of value.
  • the terminal device For each table node in the table to be recognized, the terminal device sequentially identifies and extracts the cell coordinates, cell size, and frequency of cell text types of each table node, and then integrates the cell coordinates, cell size and frequency of each table node.
  • the frequency of the cell text type is used as the cell feature of the table node, and then the cell features of all table nodes in the to-be-recognized table are established and obtained.
  • the terminal device uses the existing mature OCR (Optical Character Recognition, Optical Character Recognition, Optical Character Recognition) technology to target the picture containing the table to be recognized, so as to identify and extract the table to be recognized, each table node (ie cell) : N_u_1, N_u_2, N_u_3...N_u_i (i is a positive integer), the horizontal and vertical coordinates of the upper left corner of the text box position of each cell: (x1, y1), the horizontal and vertical coordinates of the lower right corner of the text box position: (x2, y2), the coordinates of the center position of the text box: (center_x, center_y), the width and height of the text box: (w, h), and the frequency that the text type in the cell is a number: num, the text type in the cell is a letter Frequency: char, the frequency of the text type in the cell as space: space or the frequency of the text in the cell as other types of values: other, then, the terminal device
  • Step S102 respectively extracting cell features of the respective table nodes adjacent to each of the table nodes to form a cell feature set
  • the terminal device After establishing and obtaining the respective cell features of all table nodes in the table to be identified, the terminal device extracts the respective cell features of each adjacent table node of the table node for each table node in turn, and combines the respective cell features. into a cell feature set.
  • the terminal device uses the existing mature KNN (K-Nearest Neighbor, the nearest neighbor node algorithm) technology, sequentially for each table node (ie cell) N_u_i (closest to cell N_u_i) other adjacent table nodes (adjacent cells, usually 3, 6 or 9), and then, the terminal device Take the respective cell features f(N_u_1), f(N_u_2), ..., f(N_u_9) of 3, 6 or 9 adjacent table nodes (adjacent cells) near the table node (ie cell) N_u_i as a Cell feature set.
  • KNN K-Nearest Neighbor, the nearest neighbor node algorithm
  • Step S103 performing an aggregation operation on the cell feature set to obtain respective node features of each of the table nodes.
  • the terminal device performs an aggregation operation on the cell feature set corresponding to each table node, and uses the result of the aggregation operation as the node feature of the table node, thereby constructing and obtaining the respective node features of all table nodes in the table to be identified.
  • the terminal device performs aggregation operations on the cell feature sets f(N_u_1), f(N_u_2), ..., f(N_u_9) corresponding to each table node (ie, cell) N_u_i in the table to be identified, respectively,
  • the node feature f(N) of the table node (ie, cell) N_u_i is obtained.
  • the specific operation process is:
  • f(N) Aggregate(f(N_u_1), f(N_u_2), ..., f(N_u_9), f(N));
  • N_u Neighbor(N).
  • Aggregate is an existing mature aggregation operation operation, and Aggregate generally refers to: summation or averaging.
  • Step S200 calling a preset table recognition model for the table recognition model to output the node relationship between each of the table nodes according to the node characteristics, wherein the table recognition model is pre-trained based on a graph convolution network get;
  • the terminal device After the terminal device constructs and obtains the respective node features of each table node in the table to be identified, the terminal device invokes the table recognition model that has been trained in advance based on the graph convolution network, and inputs the respective node features of each table node into the table recognition model. , so that the table recognition model performs training calculation based on the node feature, so as to predict the node relationship between each table node in the table to be recognized, and output the predicted node relationship.
  • the table recognition model invoked by the terminal device may be a table recognition model that is pre-trained by the terminal device based on the graph convolution network, and the table recognition model is stored in the pre-created block. A node in the chain for subsequent calls.
  • step S200 may include:
  • Step S201 extracting the table recognition model from the blockchain
  • Step S202 Input the respective node features of each of the table nodes in the table to be recognized into the table recognition model, so that after the table recognition model performs training calculations based on the node features, output each of the tables Nodes A horizontal, vertical or unrelated node relationship between two table nodes.
  • the table recognition model may be specifically obtained by pre-training based on a two-layer graph convolutional network stacked with two identical (GCNLNReLUGCNLN) structures: GCNLNReLUGCNLN.
  • the terminal device stores the From the blockchain node of the table recognition model trained by the graph convolutional network, the table recognition model is extracted. Then, the terminal device inputs the node feature f(N) of each table node (ie, cell) N_u_i constructed to the
  • the extracted stack has two table recognition models with the same (GCNLNReLUGCNLN) structure, so that the stack has two identical (GCNLNReLUGCNLN) structures.
  • the first node feature f(N) is calculated by the first (GCNLNReLUGCNLN) structure. feature, and directly add the node feature f(N) through the input feature of the second (GCNLNReLUGCNLN) structure to form a residual connection, so as to connect any two table nodes (ie cells) N_u_i node feature f(N ) is merged to predict the horizontal, vertical or irrelevant node relationship of the edge between two table nodes (ie cells) N_u_i, and output the label "0" corresponding to the "horizontal” node relationship, and the corresponding "vertical” node relationship.
  • the label "1" or the label "2" corresponding to the "irrelevant” node relationship.
  • the table recognition model trained in advance based on the graph convolution network into a node of the blockchain, not only the stability of the table recognition model can be ensured, but also the terminal equipment can ensure that the table is extracted when the table is extracted.
  • the responsiveness and accuracy of the recognition model further improves the efficiency of table structure recognition and restoration of the table to be recognized by training the table recognition model based on the graph convolution network.
  • Step S300 performing post-processing on the node relationship to restore the table structure of the table to be identified.
  • the terminal device After the terminal device predicts and outputs the node relationship between each table node in the to-be-recognized table according to the node characteristics of each table node in the table to be recognized based on the table recognition model obtained by invoking the pre-training, the terminal device further targets the table.
  • the node relationship is post-processed to form a complete table based on the node relationship between the two table nodes in the table to be identified.
  • step S300 may include:
  • Step S301 using a preset maximal clique algorithm to perform post-processing on the node relationship to restore the table structure of the to-be-identified table to obtain a complete table.
  • the maximal clique algorithm may be a mature maximal clique algorithm in graph theory. It should be understood that, based on different design requirements of practical applications, in other feasible real-time methods, the terminal of course, the device can also use other maximal clique algorithms different from this embodiment to perform post-processing operations on the node relationships between the table nodes in the table to be identified.
  • the restoration method of the table structure in this application is not designed for terminals. The algorithm and the like used when the node relationship performs post-processing operations are specifically limited.
  • the terminal device predicts two table nodes (ie cells) N_u_i by combining the node features f(N) of any two table nodes (ie cells) N_u_i in the table to be identified based on the table recognition model The horizontal, vertical or irrelevant node relationship between the edges, and output the label "0" corresponding to the "horizontal” node relationship, the label "1” corresponding to the "vertical” node relationship, or the label corresponding to the "irrelevant” node relationship” 2", so that after determining the node relationship between all table nodes (ie cells) N_u_i in the table to be identified, the terminal device further uses the mature maximal clique algorithm in graph theory, according to all the tables in the table to be identified.
  • the node relationship between nodes (ie cells) N_u_i calculate the row maxima and column maxima between all table nodes (ie cells) N_u_i, and then according to the position information of each group of maxima in the table , sort the maximal clique to restore the original logical structure of the table.
  • the table data is used as the table to be recognized, and for each table node in the to-be-recognized table, the respective node features of each table node are sequentially constructed; After the terminal device constructs and obtains the respective node features of each table node in the table to be identified, the terminal device invokes the table recognition model that has been trained in advance based on the graph convolution network, and inputs the respective node features of each table node into the table recognition model.
  • the table recognition model is trained and calculated based on the node characteristics, so as to predict the node relationship between each table node in the table to be recognized, and output the predicted node relationship;
  • the table recognition model according to the node characteristics of each table node in the table to be recognized, after training to predict and output the node relationship between each table node in the table to be recognized, the terminal device further performs post-processing on the node relationship so as to be based on the The node relationship between the two mutual table nodes in the table to be identified is arranged to form a complete table.
  • the present application realizes that, in the process of restoring the table structure of table data, the table recognition model based on graph convolution network training predicts and outputs the node relationship according to the node characteristics of the table to be recognized, and then performs post-processing operations on the node relationship to thereby Restore the table structure of the table to be recognized. Therefore, the table structure can be automatically recognized and restored without the need for high quality images of table data, the dependence of the recognition and restoration of the table structure on the image quality is relieved, and the recognition accuracy of the table structure and the table restoration efficiency are improved.
  • the method for restoring the table structure of the present application may further include:
  • Step S400 constructing training data and using the training data to train a two-layer graph convolutional network to obtain a preset table recognition model.
  • the terminal device is pre-built based on the training data for training the graph convolution network, and then uses the training data to train the two-layer graph convolution network, so that the two-layer graph convolution network is trained to be used for the table to be identified.
  • a table recognition model that predicts and recognizes the node relationship between two table nodes.
  • the training data used for training the graph convolutional network includes but is not limited to: a training sample table and a training test table.
  • step S400 may include:
  • Step S401 obtaining public table data and preprocessing the public table data to construct the training sample table and the training test table;
  • the terminal device obtains normally shared public table data from any big data platform, and then preprocesses the public table data, thereby constructing a training sample table and a training test table for training the graph convolutional network.
  • the public table data may specifically be the public data set SciTSR shared and released on any big data platform at present, and the public data set includes any type of table data.
  • the terminal device obtains the public data set SciTSR shared and released by the big data platform from any big data platform, and then the terminal device extracts 15,000 arbitrary types of table data from the public data set SciTSR (that is, 15,000 Tables), and take 12,000 table data in the 15,000 table data as training sample tables, and take another 3,000 table data in the 15,000 table data as training and test tables.
  • 15,000 arbitrary types of table data from the public data set SciTSR (that is, 15,000 Tables)
  • the terminal device extracts 15,000 arbitrary types of table data from the public data set SciTSR (that is, 15,000 Tables), and take 12,000 table data in the 15,000 table data as training sample tables, and take another 3,000 table data in the 15,000 table data as training and test tables.
  • Step S402 constructing the first node feature of each table node in the training sample table, and inputting the first node feature into a two-layer graph convolutional network for training to obtain a table recognition model to be confirmed;
  • the terminal device constructs the first node feature of all the table nodes in the table, and constructs the label of the node relationship between all the table nodes, and then the terminal device will
  • the first node features of all table nodes in each table, together with the labels of the node relationships between all table nodes, are input into the two-layer graph convolutional network for training until the training is completed.
  • a two-layer graph convolutional network is used as a recognition model for the to-be-confirmed table.
  • the terminal device constructs the first node feature of all table nodes in the table for each table in the training sample table obtained by constructing it, and the above-mentioned terminal device constructs the table to be identified.
  • the process of node features of each table node in the table is the same. Therefore, the first node feature of all table nodes in the table is constructed for each table in the training sample table constructed by the terminal device will not be repeated here.
  • the terminal device After constructing and obtaining the first node features of all table nodes in each of the 12,000 training sample tables, the terminal device defines the label corresponding to the "horizontal" node relationship between two table nodes in each table as The label corresponding to the node relationship of "0" and “vertical” is “1", and the label corresponding to the node relationship of "irrelevant” is "2"; then, the terminal device will construct the 12,000 training sample tables of all table nodes.
  • the first node feature along with the labels "0", "1” and “2", is input into a two-layer graph convolutional network stacked with two identical (GCNLNReLUGCNLN) structures: GCNLNReLUGCNLN, thereby convolutional by the two-layer graph Network: GCNLNReLUGCNLN, the output features of the node features calculated by the first (GCNLNReLUGCNLN) structure are directly added to the input features of the second (GCNLNReLUGCNLN) structure to form a residual connection to combine the features of any two cells.
  • GCNLNReLUGCNLN two identical
  • Step S403 constructing the second node feature of each table node in the training and testing table, and inputting the second node feature into the to-be-confirmed table recognition model to test and determine the test for the to-be-confirmed table recognition model result;
  • the terminal device also constructs the second node features of all the table nodes in the table for each table in the constructed training and test tables, and then the terminal device uses the second node features of all the table nodes in each table, Input to the to-be-confirmed table recognition model obtained after training on the two-layer graph convolutional network, for the to-be-confirmed table recognition model to perform training calculations based on the first node feature, so as to target each table node in the training test table against each other. Predict the node relationship between the two nodes, and output a label that identifies the node relationship. Finally, the terminal device compares the label output by the recognition model of the table to be confirmed with the real node relationship between each table node in the training and test table to determine Test Results.
  • the terminal device constructs the second node feature of all table nodes in the table for each table in the training and test tables obtained by construction, and the above-mentioned terminal device constructs the to-be-recognized table.
  • the process of node features of each table node in the table is the same. Therefore, the second node feature of all table nodes in the table is not repeated here for each table in the training and test table constructed by the terminal device.
  • Step S404 if the test result complies with the preset model identification conditions, the to-be-confirmed form identification model is used as the trained form identification model.
  • the test result may specifically be that the terminal device compares the actual node relationship between each table node in the training test table based on the label output by the identification model of the table to be confirmed, so that The obtained table recognition model to be confirmed predicts the accuracy of the node relationship between all table nodes in the training test table.
  • the model identification condition may specifically be that the identification table identification model preset by the terminal device accurately predicts the lowest prediction accuracy of the node relationship between two table nodes in the table to be identified.
  • the terminal device determines that the table recognition model to be confirmed is for the training test table
  • the test results of the node relationship between the table nodes are predicted to meet the model recognition conditions (the table recognition model to be confirmed is carried out for the node relationship between all table nodes in the training test table).
  • the prediction accuracy rate is greater than or equal to the identification table recognition model preset by the terminal device to accurately predict the minimum prediction accuracy rate of the node relationship between the two table nodes in the table to be recognized
  • the terminal device can identify the table to be confirmed.
  • the recognition model is used as a table recognition model for predicting and recognizing the node relationship between two table nodes in the table to be recognized.
  • the second node feature of each table node in the training and testing table is constructed, and the second node feature is input into the to-be-confirmed table recognition model.
  • the method for restoring the table structure of the present application may also include:
  • Step S405 if the test result does not meet the preset model identification conditions, construct a new training sample table to retrain the two-layer graph convolutional network.
  • the terminal device determines that the table recognition model to be confirmed is for the training test table, the test results predicted by the node relationship between the table nodes do not meet the model recognition conditions (the table recognition model to be confirmed is for the node relationship between all table nodes in the training test table).
  • the terminal device When the accuracy rate of prediction is less than the minimum prediction accuracy rate of the node relationship between the two table nodes in the table to be recognized, the terminal device will re-acquire the public table data to Construct a new training sample table and a new training test table, and construct the first node feature of each table node in the new training sample table, so as to retrain the two-layer graph convolutional network to obtain a new table recognition model to be confirmed, The second node feature of each table node in the new training test table is then constructed to test against the new table recognition model to be confirmed, and the cycle is repeated until the test result of the test against the table recognition model to be confirmed meets the model recognition conditions.
  • the process of re-training the two-layer graph convolutional network by the terminal device is substantially the same as the above-mentioned process of constructing training data and using the training data to train the two-layer graph convolutional network. Therefore, , the process of retraining the two-layer graph convolutional network by the terminal device will not be repeated here.
  • the terminal device is pre-built based on the training data for training the graph convolutional network, and then the training data is used to train the two-layer graph convolutional network, so that the two-layer graph convolutional network is trained as a A table recognition model for predicting and recognizing the node relationship between two table nodes in the table to be recognized.
  • the table recognition model trained based on the graph convolutional network predicts and outputs the node relationship according to the node characteristics of the table to be recognized, and then performs post-processing operations on the node relationship to restore the table structure of the table to be recognized. Therefore, the table structure can be automatically recognized and restored without the need for high quality images of table data, the dependence of the identification and restoration of the table structure on the image quality is relieved, and the recognition accuracy of the table structure and the table restoration efficiency are improved.
  • FIG. 4 is a schematic diagram of the functional modules of the table-structured restoration system of the application.
  • the table-structured restoration system includes:
  • the building module 101 is used to build the node feature of each table node in the table to be identified;
  • the identification module 102 is configured to call a preset table identification model, so that the table identification model can output the node relationship between the table nodes according to the node characteristics, wherein the table identification model is based on the graph volume in advance Product network training is obtained;
  • the restoration module 103 is configured to perform post-processing on the node relationship to restore the table structure of the to-be-identified table.
  • the graph convolutional network includes but is not limited to a two-layer graph convolutional network
  • the restoration system of the table structure of the present application also includes:
  • the model training module is used for constructing training data and using the training data to train a two-layer graph convolution network to obtain a preset table recognition model.
  • the training data includes a training sample table and a training test table
  • the model training module includes:
  • an acquisition unit configured to acquire public table data and preprocess the public table data to construct the training sample table and the training test table;
  • a first construction unit for constructing the first node feature of each table node in the training sample table, and inputting the first node feature into a two-layer graph convolutional network for training to obtain a table recognition model to be confirmed;
  • the second construction unit is used to construct the second node feature of each table node in the training and test table, and input the second node feature into the to-be-confirmed table recognition model, so as to perform the task for the to-be-confirmed table recognition model. test and determine test results;
  • a determining unit configured to use the to-be-confirmed table recognition model as a trained table recognition model if the test result complies with a preset model recognition condition.
  • model training module further includes:
  • the repeating training unit is configured to construct a new training sample table to retrain the two-layer graph convolutional network if the test result does not meet the preset model identification conditions.
  • the building module 101 includes:
  • a first extraction unit configured to extract the cell features of the respective adjacent table nodes of each of the table nodes to form a cell feature set
  • the aggregation unit is configured to perform an aggregation operation on the cell feature set to obtain the respective node features of each of the table nodes.
  • the table identification model is stored in the blockchain, the node relationship includes but is not limited to horizontal, vertical and irrelevant, and the identification module includes:
  • a second extraction unit configured to extract the form recognition model from the blockchain
  • the structure identification unit is used to input the respective node features of each of the table nodes in the table to be identified into the table identification model, so that after the table identification model performs training calculations based on the node features, output each node feature.
  • the table nodes have a horizontal, vertical or irrelevant node relationship between two table nodes.
  • the restoration module 103 is further configured to perform post-processing on the node relationship by using a preset maximal clique algorithm to restore the table structure of the to-be-recognized table to obtain a complete table.
  • the present application also provides a computer storage medium, the computer storage medium may be volatile or non-volatile, the computer storage medium stores one or more programs, the one or more A program may also be executed by one or more processors for:
  • Post-processing is performed on the node relationship to restore the table structure of the to-be-identified table.
  • the one or more programs can also be executed by one or more processors to call a preset table recognition model, so that the table recognition model can output the nodes between the table nodes according to the node characteristics Before relationship, also used to:
  • training data includes a training sample table and a training test table
  • the one or more programs can also be executed by one or more processors for:
  • the to-be-confirmed table recognition model is used as the trained table recognition model.
  • the one or more programs can also be executed by one or more processors to construct the second node feature of each table node in the training and test table, and input the second node feature into the to-be-confirmed table identification
  • the model after testing the to-be-confirmed form recognition model and determining the test result, is also used for:
  • test result does not meet the preset model identification conditions, a new training sample table is constructed to retrain the two-layer graph convolutional network.
  • table recognition model is stored in the block chain, and the node relationship includes but is not limited to horizontal, vertical and irrelevant, and the one or more programs can also be executed by one or more processors for:
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the terms “comprising”, “comprising” or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements, but also No other elements are expressly listed or are inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase “comprising a" does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
  • the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
  • a storage medium such as ROM/RAM, magnetic disk, CD-ROM

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

一种表格结构的还原方法,构建待识别表格中各表格节点的节点特征,调用预设的表格识别模型,以供表格识别模型根据节点特征输出各表格节点相互之间的节点关系,其中,表格识别模型预先基于图卷积网络训练得到,表格识别模型可存储在区块链中;针对节点关系进行后处理以还原待识别表格的表格结构;其中表格识别模型可存储在区块链中。本申请涉及人工智能技术领域,其可在不依赖图像质量的情况下对表格结构进行准确地还原恢复。此外,还公开了实现方法的表格结构的还原系统,计算机设备及计算机存储介质。

Description

表格结构的还原方法、系统、计算机设备及存储介质
本申请要求于2020年11月17日提交中国专利局、申请号为CN202011290469.5、名称为“表格结构的还原方法、系统、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种表格结构的还原方法、系统、计算机设备以及计算机存储介质。
背景技术
表作为结构化数据的一种形式,既简单又标准化。表数据因为结构清晰的特点使得用户可以快速理解,从而财务数据、统计数据等数字信息,通常都是以表格的形式呈现,尤其是表格数据作为财务数据中的关键信息,在财务数据处理过程中越来越受到财务人员的重视。而尽管表数据提取是各种领域中已经司空见惯的处理操作,但是基于人工手动来提取出表格中的数据信息通常是一个冗长而耗时的过程。因此,各领域需要能够自动完成表格数据的提取方法来替换手动操作。
现有产品中,大都是通过图像识别的方法进行表格结构还原,发明人意识到该方法高度依赖对表格中线条的检测识别,从而,当表格图像的背景相对复杂或表格中线条打印断断续续、模糊不清时,表格结构还原的准确率将会大打折扣。同时,对于无框线的表格,还需要通过一些其他方法估计出线条的位置,然后再进行表格结构还原。因此。现有进行表格结构还原的方法,表格结构还原效果取决于图像质量,当图像质量不高时,表格结构还原效果相对较差。
综上,现有的方法难以在不依赖图像质量的情况下对表格结构进行准确地还原恢复。
发明内容
本申请实施例提供一种表格结构的还原方法,所述表格结构的还原方法包括:
构建待识别表格中各表格节点的节点特征;
调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
本申请还提供一种表格结构的还原系统,所述表格结构的还原系统包括:
构建模块,用于构建待识别表格中各表格节点的节点特征;
识别模块,用于调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
还原模块,用于针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
本申请还提供一种计算机设备,所述计算机设备包括:存储器、处理器,通信总线以及存储在所述存储器上的表格结构的还原程序,
所述通信总线用于实现处理器与存储器间的通信连接;
所述处理器用于执行所述表格结构的还原程序,以实现以下步骤:
构建待识别表格中各表格节点的节点特征;
调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
本申请还提供一种计算机存储介质,所述计算机存储介质存储有一个或者一个以上程 序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行以用于:
构建待识别表格中各表格节点的节点特征;
调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
附图说明
图1为本申请实施例方法涉及的计算机设备硬件运行环境的结构示意图;
图2为本申请表格结构的还原方法一实施例的流程示意图;
图3为本申请表格结构的还原方法一实施例所涉及的应用场景示意图;
图4本申请表格结构的还原系统的功能模块示意图。
本申请目的的实现、功能特点及优点将整合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例的主要解决方案是:通过构建待识别表格中各表格节点的节点特征;调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
由于表作为结构化数据的一种形式,既简单又标准化。表数据因为结构清晰的特点使得用户可以快速理解,从而财务数据、统计数据等数字信息,通常都是以表格的形式呈现,尤其是表格数据作为财务数据中的关键信息,在财务数据处理过程中越来越受到财务人员的重视。而尽管表数据提取是各种领域中已经司空见惯的处理操作,但是基于人工手动来提取出表格中的数据信息通常是一个冗长而耗时的过程。因此,各领域需要能够自动完成表格数据的提取方法来替换手动操作。
现有产品中,大都是通过图像识别的方法进行表格结构还原,但该方法高度依赖对表格中线条的检测识别,从而,当表格图像的背景相对复杂或表格中线条打印断断续续、模糊不清时,表格结构还原的准确率将会大打折扣。同时,对于无框线的表格,还需要通过一些其他方法估计出线条的位置,然后再进行表格结构还原。因此。现有进行表格结构还原的方法,表格结构还原效果取决于图像质量,当图像质量不高时,表格结构还原效果相对较差。
综上,现有的方法难以在不依赖图像质量的情况下对表格结构进行准确地还原恢复。
本申请提供的解决方案,在需要还原表数据表格结构的过程中,将表数据作为待识别表格并构建该待识别表格当中,各个表格节点各自的节点特征,然后,调用预先基于图卷积网络训练得到的表格识别模型,以将该各个表格节点各自的节点特征作为输入,供表格识别模型根据该节点特征预测并输出该待识别表格中各个表格节点相互之间的节点关系,最后,针对该各个表格节点相互之间的节点关系进行后处理操作从而还原出待识别表格的表格结构。
本申请实现了,基于图卷积网络训练得到的表格识别模型根据待识别表格的节点特征预测并输出节点关系,然后针对该节点关系进行后处理操作从而还原得到待识别表格的表格结构。从而,无需表格数据的图像具有较高质量即可自动识别出表格结构并进行还原,解除了识别和还原表格结构对于图像质量的依赖,提高了表格结构的识别准确性和表格还原效率。
如图1所示,图1是本申请实施例方案涉及的计算机设备硬件运行环境的设备结构示意图。
本申请实施例计算机设备可以是PC、智能手机、平板电脑和便携计算机等终端设备。
如图1所示,该计算机设备可以包括:处理器1001,例如CPU,通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选的用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
可选地,该计算机设备还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,接近传感器可在设备移动到耳边时,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别设备姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
本领域技术人员可以理解,图1中示出的设备结构并不构成对计算机设备的限定,在其它实施方式当中,计算机设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及表格结构的还原程序。
在图1所示的计算机设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的表格结构的还原程序,并执行以下步骤:
构建待识别表格中各表格节点的节点特征;
调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
进一步地,所述图卷积网络包括但不限于两层图卷积网络,处理器1001可以用于调用存储器1005中存储的表格结构的还原程序,在执行调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系的步骤之前,还执行以下步骤:
构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型。
进一步地,所述训练数据包括训练样本表格和训练测试表格,处理器1001可以用于调用存储器1005中存储的表格结构的还原程序,还执行以下步骤:
获取公开表格数据并针对所述公开表格数据进行预处理以构建得到所述训练样本表格和所述训练测试表格;
构建所述训练样本表格中各表格节点的第一节点特征,并将所述第一节点特征输入两层图卷积网络进行训练得到待确认表格识别模型;
构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果;
若所述测试结果符合预设的模型识别条件,则将所述待确认表格识别模型作为训练完成的表格识别模型。
进一步地,处理器1001可以用于调用存储器1005中存储的表格结构的还原程序,在 执行构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果的步骤之后,还执行以下步骤:
若所述测试结果不符合预设的模型识别条件,则构建新的训练样本表格对所述两层图卷积网络重新进行训练。
进一步地,处理器1001可以用于调用存储器1005中存储的表格结构的还原程序,还执行以下步骤:
建立所述待识别表格中各所述表格节点的单元格特征;
分别提取各所述表格节点各自邻近表格节点的单元格特征形成单元格特征集;
针对所述单元格特征集进行聚合运算以得到各所述表格节点各自的节点特征。
进一步地,所述表格识别模型存储于区块链中,所述节点关系包括但不限于水平、垂直和不相关,处理器1001可以用于调用存储器1005中存储的表格结构的还原程序,还执行以下步骤:
从所述区块链中提取所述表格识别模型;
将所述待识别表格中各所述表格节点各自的所述节点特征输入所述表格识别模型,以供所述表格识别模型基于所述节点特征进行训练计算后,输出各所述表格节点相互两个表格节点之间水平、垂直或者不相关的节点关系。
进一步地,处理器1001可以用于调用存储器1005中存储的表格结构的还原程序,还执行以下步骤:
利用预设的极大团算法针对所述节点关系进行后处理以还原所述待识别表格的表格结构得到完整的表格。
本申请表格结构的还原方法所涉及计算机设备的具体实施例与下述表格结构的还原方法的各具体实施例基本相同,在此不作赘述,此外,为便于表述,后文中均以终端设备替代计算机设备进行阐述。
本申请提供一种表格结构的还原方法。
请参照图2,图2为本申请表格结构的还原方法第一实施例的流程示意图,在本实施例中,该表格结构的还原方法包括:
步骤S100,构建待识别表格中各表格节点的节点特征;
终端设备在针对表格数据进行表格结构的过程中,将表格数据作为待识别表格并针对该待识别表格中的各个表格节点,依次构建该各个表格节点各自的节点特征。
需要说明的是,在本实施例中,待识别表格为终端设备所接收到的任意需要进行表格结构识别和/或者还原的表格数据,例如企业财务表格数据、企业人事统计表格数据等,应当理解的是,基于实际应用的不同设计需要,在其他可行的实时方式当中,该待识别表格当然也可以是不同于此处所列举的其它类型表格数据,本申请表格结构的还原方法,并不针对该待识别表格的表格数据类型进行具体限定。
此外,在本实施例中,待识别表格中的各个表格节点具体可以为该待识别表格中的各个单元格,应当理解的是,基于实际应用的不同设计需要,在其他可行的实时方式当中,当然也可以使用待识别表格中不同于此处所说单元格的其它元素作为表格节点,同样的,本申请表格结构的还原方法,也不针对表格节点在待识别表格的元素类型进行具体限定。
进一步地,在一种可行的实施例中,步骤S100,可以包括:
步骤S101,建立所述待识别表格中各所述表格节点的单元格特征;
需要说明的是,在本实施例中,各个表格节点的单元格特征包括但不限于:单元格坐标、单元格尺寸以及单元格文本类型的频率,具体地,例如,该单元格坐标具体可以为待识别表格中,各个表格节点(即单元格)的文字框位置左上角的横纵坐标、单元格的文字框位置右下角的横纵坐标以及单元格的文字框中心位置的坐标,该单元格尺寸具体可以为 待识别表格中,各个单元格的文字框的宽高,该单元格文本类型的频率具体可以为待识别表格中,各个单元格中文本类型为数字的频率、文本类型为字母的频率、文本类型为空格的频率或者文本为其他类型数值的频率。
终端设备针对待识别表格中的各个表格节点,依次识别提取出各个表格节点的单元格坐标、单元格尺寸以及单元格文本类型的频率,然后整合每一个表格节点的单元格坐标、单元格尺寸以及单元格文本类型的频率作为该表格节点的单元格特征,进而建立得到该待识别表格中全部表格节点各自的单元格特征。
具体地,例如,终端设备通过现有成熟的OCR(Optical Character Recognition,光学字符识别)技术针对包含有待识别表格的图片,从而识别提取得到该待识别表格中,每个表格节点(即单元格):N_u_1、N_u_2、N_u_3...N_u_i(i为正整数),各自单元格的文字框位置左上角的横纵坐标:(x1,y1)、文字框位置右下角的横纵坐标:(x2,y2)、文字框中心位置的坐标:(center_x,center_y),文字框的宽高:(w,h),以及该单元格中文本类型为数字的频率:num、单元格中文本类型为字母的频率:char、单元格中文本类型为空格的频率:space或者单元格中文本为其他类型数值的频率:other,然后,终端设备将属于同一个表格节点(即单元格)的该(x1,y1)、(x2,y2)、(center_x,center_y),(w,h)和num、char、space、other等数据,整合在一起作为每一个表格节点(即单元格)的单元格特征:f(N_u_i)=[x1,y1,x2,y2,w,h,center_x,center_y,num,char,space,other]。
步骤S102,分别提取各所述表格节点各自邻近表格节点的单元格特征形成单元格特征集;
终端设备在建立得到待识别表格中全部表格节点各自的单元格特征之后,分别针对每一个表格节点依次提取出该表格节点的各个邻近表格节点各自的单元格特征,并将该各个单元格特征组合成单元格特征集。
具体地,例如,终端设备在整合建立得到待识别表格中每一个表格节点(即单元格)各自的单元格特征之后,终端设备通过利用现有成熟的KNN(K-NearestNeighbor,最邻近节点算法)技术,依次针对每个表格节点(即单元格)N_u_i附近(距离单元格N_u_i最近)的其他几个邻近表格节点(邻近单元格,通常为3个、6个或者9个),然后,终端设备将该表格节点(即单元格)N_u_i附近3个、6个或者9个邻近表格节点(邻近单元格)各自的单元格特征f(N_u_1)、f(N_u_2)、…、f(N_u_9)作为一个单元格特征集。
步骤S103,针对所述单元格特征集进行聚合运算以得到各所述表格节点各自的节点特征。
终端设备分别针对每一个表格节点对应的单元格特征集进行聚合运算,并将聚合运算的结果作为该表格节点的节点特征,从而,即构建得到该待识别表格中全部表格节点各自的节点特征。
具体地,例如,终端设备分别针对待识别表格中的每一个表格节点(即单元格)N_u_i对应的单元格特征集f(N_u_1)、f(N_u_2)、…、f(N_u_9)进行聚合运算,从而得到该表格节点(即单元格)N_u_i的节点特征f(N)。具体运算过程为:
f(N)=Aggregate(f(N_u_1),f(N_u_2),…,f(N_u_9),f(N));
N_u=Neighbor(N)。
需要说明的是,在本实施例中,Aggregate为现有成熟的一种聚合运算操作,Aggregate通常指:求和或者求平均。
步骤S200,调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
终端设备在构建得到待识别表格中各个表格节点各自节点特征之后,终端设备调用预先已经基于图卷积网络训练得到的表格识别模型,并将该各个表格节点各自节点特征输入 至该表格识别模型当中,从而令该表格识别模型基于该节点特征进行训练计算,以针对待识别表格中各个表格节点相互之间的节点关系进行预测,并输出预测得到的该节点关系。
需要说明的是,在本实施例中,终端设备所调用的表格识别模型可以为终端设备预先基于图卷积网络训练得到的表格识别模型之后,将该表格识别模型存储在预先创建好的区块链的某一个节点当中以供后续调用。
进一步地,在一种可行的实施例中,步骤S200,可以包括:
步骤S201,从所述区块链中提取所述表格识别模型;
步骤S202,将所述待识别表格中各所述表格节点各自的所述节点特征输入所述表格识别模型,以供所述表格识别模型基于所述节点特征进行训练计算后,输出各所述表格节点相互两个表格节点之间水平、垂直或者不相关的节点关系。
需要说明的是,在本实施例中,表格识别模型具体可以是预先基于堆叠有两个相同(GCNLNReLUGCNLN)结构的两层图卷积网络:GCNLNReLUGCNLN训练得到。
具体地,例如,请参照如图3所示的应用场景,终端设备在构建出待识别表格中每一个表格节点(即单元格)N_u_i的节点特征f(N)之后,终端设备从预先存储基于图卷积网络训练的表格识别模型的区块链节点中,提取出该表格识别模型,然后,终端设备将构建的每一个表格节点(即单元格)N_u_i的节点特征f(N),输入到提取的堆叠有两个相同(GCNLNReLUGCNLN)结构的表格识别模型当中,从而由该堆叠有两个相同(GCNLNReLUGCNLN)结构的先将节点特征f(N)经过第一个(GCNLNReLUGCNLN)结构计算后的输出特征,与将节点特征f(N)经过第二个(GCNLNReLUGCNLN)结构的输入特征直接相加形成一个残差连接,从而以将任意两个表格节点(即单元格)N_u_i的节点特征f(N)进行合并来预测两个表格节点(即单元格)N_u_i之间边的水平、垂直或者不相关的节点关系,并输出“水平”节点关系对应的标签“0”、“垂直”节点关系对应的标签“1”或者“不相关”节点关系对应的标签“2”。
在本实施例中,通过将预先基于图卷积网络训练得到的表格识别模型一区块链的节点中,如此,不仅能够确保该表格识别模型的稳定性,还能够确保终端设备在提取该表格识别模型时的响应积极性和准确性,进一步提升了基于图卷积网络训练表格识别模型针对待识别表格进行表格结构识别和还原的效率。
步骤S300,针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
终端设备在基于调用预先训练得到的表格识别模型,根据待识别表格中各个表格节点的节点特征,训练预测并输出该待识别表格中各个表格节点相互之间的节点关系之后,终端设备进一步针对该节点关系进行后处理从而基于该待识别表格中相互两个表格节点之间的节点关系,整理形成一个完整的表格。
进一步地,在一种可行的实施例中,步骤S300,可以包括:
步骤S301,利用预设的极大团算法针对所述节点关系进行后处理以还原所述待识别表格的表格结构得到完整的表格。
需要说明的是,在本实施例中,极大团算法具体可以为图论中成熟的极大团算法,应当理解的是,基于实际应用的不同设计需要,在其它可行的实时方式当中,终端设备当然也可以采用其它不同于本实施例中的极大团算法来针对待识别表格中各个表格节点之间的节点关系进行后处理操作,本申请表格结构的还原方法,并不针对终端设针对节点关系进行后处理操作时所使用的算法等进行具体地限定。
具体地,例如,终端设备在基于表格识别模型根据待识别表格中任意两个表格节点(即单元格)N_u_i的节点特征f(N)进行合并来预测得到两个表格节点(即单元格)N_u_i之间边的水平、垂直或者不相关的节点关系,并输出“水平”节点关系对应的标签“0”、“垂直”节点关系对应的标签“1”或者“不相关”节点关系对应的标签“2”,从而确定出该待识别表格中全部表格节点(即单元格)N_u_i相互之间的节点关系之后,终端设备进一 步利用图论中成熟的极大团算法,根据该待识别表格中全部表格节点(即单元格)N_u_i相互之间的节点关系,计算出全部表格节点(即单元格)N_u_i间的行极大团与列极大团,再根据每组极大团在表格中的位置信息,对极大团排序,从而还原出表格原逻辑结构。
在本实施例中,通过终端设备在针对表格数据进行表格结构的过程中,将表格数据作为待识别表格并针对该待识别表格中的各个表格节点,依次构建该各个表格节点各自的节点特征;终端设备在构建得到待识别表格中各个表格节点各自节点特征之后,终端设备调用预先已经基于图卷积网络训练得到的表格识别模型,并将该各个表格节点各自节点特征输入至该表格识别模型当中,从而令该表格识别模型基于该节点特征进行训练计算,以针对待识别表格中各个表格节点相互之间的节点关系进行预测,并输出预测得到的该节点关系;终端设备在基于调用预先训练得到的表格识别模型,根据待识别表格中各个表格节点的节点特征,训练预测并输出该待识别表格中各个表格节点相互之间的节点关系之后,终端设备进一步针对该节点关系进行后处理从而基于该待识别表格中相互两个表格节点之间的节点关系,整理形成一个完整的表格。
本申请实现了,在需要还原表数据表格结构的过程中,基于图卷积网络训练得到的表格识别模型根据待识别表格的节点特征预测并输出节点关系,然后针对该节点关系进行后处理操作从而还原得到待识别表格的表格结构。从而,无需表格数据的图像具有较高质量即可自动识别出表格结构并进行还原,解除了识别和还原表格结构对于图像质量的依赖,提高了表格结构的识别准确性和表格还原效率。
进一步地,基于上述本申请表格结构的还原方法的第一实施例,提出本申请表格结构的还原方法的第二实施例,在本申请表格结构的还原方法的第二实施例中,在上述步骤S200,调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系之前,本申请表格结构的还原方法还可以包括:
步骤S400,构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型。
终端设备预先基于构建用于针对图卷积网络进行训练的训练数据,然后利用该训练数据来训练两层图卷积网络,从而将该两层图卷积网络训练成为用于针对待识别表格中相互两个表格节点之间节点关系进行预测识别的表格识别模型。
进一步地,在本实施例中,用于针对图卷积网络进行训练的训练数据包括但不限于:训练样本表格和训练测试表格,在一种可行的实施例中,步骤S400,可以包括:
步骤S401,获取公开表格数据并针对所述公开表格数据进行预处理以构建得到所述训练样本表格和所述训练测试表格;
终端设备从任意大数据平台中获取可正常共享的公开表格数据,然后针对该公开表格数据进行预处理,从而构建得到用于针对图卷积网络进行训练的训练样本表和训练测试表格。
需要说明的是,在本实施例中,公开表格数据具体可以为时下任意大数据平台上共享发布出来的公开数据集SciTSR,该公开数据集中包含有任意类型的表格数据。
具体地,例如,终端设备从任意大数据平台上,获取该大数据平台共享发布出来的公开数据集SciTSR,然后,终端设备从该公开数据集SciTSR提取出15000个任意类型的表格数据(即15000个表格),并将该15000个表格数据中的12000个表格数据作为训练样本表格,而将,并将该15000个表格数据中的另外的3000个表格数据作为训练测试表格。
步骤S402,构建所述训练样本表格中各表格节点的第一节点特征,并将所述第一节点特征输入两层图卷积网络进行训练得到待确认表格识别模型;
终端设备针对构建得出的训练样本表格当中的每一个表格,均构建该表格中全部表格节点的第一节点特征,以及,构建该全部表格节点相互之间节点关系的标签,然后,终端设备将该每一个表格中全部表格节点的第一节点特征,和该全部表格节点相互之间节点关 系的标签一起输入至两层图卷积网络进行训练直至训练完毕,最后,终端设备将该训练完的两层图卷积网络作为待确认表格识别模型。
需要说明的是,在本实施例中,终端设备针对构建得出的训练样本表格当中的每一个表格,均构建该表格中全部表格节点第一节点特征的过程,与上述终端设备构建待识别表格中各个表格节点的节点特征的过程相同,因此,此处不再针对终端设备针对构建得出的训练样本表格当中的每一个表格,均构建该表格中全部表格节点的第一节点特征进行赘述。
具体地,例如,终端设备在构建得到12000个训练样本表格各自全部表格节点的第一节点特征之后,定义该每一个表格中相互两个表格节点之间的“水平”的节点关系对应的标签为“0”、“垂直”的节点关系对应标签的为“1”以及“不相关”的节点关系对应的标签为“2”;然后,终端设备将构建的12000个训练样本表格各自全部表格节点的第一节点特征,连同该标签“0”、“1”和“2”一起输入到堆叠有两个相同(GCNLNReLUGCNLN)结构的两层图卷积网络:GCNLNReLUGCNLN中,从而由该两层图卷积网络:GCNLNReLUGCNLN,将节点特征经过第一个(GCNLNReLUGCNLN)结构计算后的输出特征,与第二个(GCNLNReLUGCNLN)结构的输入特征直接相加形成一个残差连接,以将任意两单元格的特征进行合并来预测两个单元格之间边的关系(水平/垂直/无关系)并输出对应的标签“0”、“1”和“2”,最后,该两层图卷积网络:GCNLNReLUGCNLN通过不断最小化预测关系与实际标注关系间的损失函数,来更新单元格特征进行训练,从而得到待确认表格识别模型。
步骤S403,构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果;
终端设备针对构建得出的训练测试表格当中的每一个表格,同样均构建该表格中全部表格节点的第二节点特征,然后,终端设备将该每一个表格中全部表格节点的第二节点特征,输入至针对两层图卷积网络进行训练后得到的待确认表格识别模型当中,以供该待确认表格识别模型基于该第一节点特征进行训练计算,以针对训练测试表格中各个表格节点相互之间的节点关系进行预测,并输出标识该节点关系的标签,最后,终端设备基于待确认表格识别模型输出的该标签与该训练测试表格中各个表格节点相互之间真实的节点关系进行对比从而确定测试结果。
需要说明的是,在本实施例中,终端设备针对构建得出的训练测试表格当中的每一个表格,均构建该表格中全部表格节点第二节点特征的过程,与上述终端设备构建待识别表格中各个表格节点的节点特征的过程相同,因此,此处不再针对终端设备针对构建得出的训练测试表格当中的每一个表格,均构建该表格中全部表格节点的第二节点特征进行赘述。
步骤S404,若所述测试结果符合预设的模型识别条件,则将所述待确认表格识别模型作为训练完成的表格识别模型。
需要说明的是,在本实施例中,测试结果具体可以为终端设备基于将待确认表格识别模型输出的该标签,与该训练测试表格中各个表格节点相互之间真实的节点关系进行对比,从而得到的待确认表格识别模型针对训练测试表格全部表格节点之间节点关系进行预测的准确率。此外,模型识别条件具体可以为,终端设备预先设定的标识表格识别模型准确预测得到待识别表格中两个表格节点之间节点关系的最低预测准确率。
终端设备在确定出待确认表格识别模型针对训练测试表格中,各表格节点之间节点关系进行预测的测试结果符合模型识别条件(待确认表格识别模型针对训练测试表格全部表格节点之间节点关系进行预测的准确率,大于或者等于终端设备预先设定的标识表格识别模型准确预测得到待识别表格中两个表格节点之间节点关系的最低预测准确率)时,终端设备即可将该待确认表格识别模型,作为用于针对待识别表格中相互两个表格节点之间节点关系进行预测识别的表格识别模型。
进一步地,在另一种可行的实施例中,在上述步骤S403,构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果之后,本申请表格结构的还原方法,还可以包括:
步骤S405,若所述测试结果不符合预设的模型识别条件,则构建新的训练样本表格对所述两层图卷积网络重新进行训练。
终端设备在确定出待确认表格识别模型针对训练测试表格中,各表格节点之间节点关系进行预测的测试结果不符合模型识别条件(待确认表格识别模型针对训练测试表格全部表格节点之间节点关系进行预测的准确率,小于终端设备预先设定的标识表格识别模型准确预测得到待识别表格中两个表格节点之间节点关系的最低预测准确率)时,终端设备即重新获取获取公开表格数据来构建新的训练样本表格以及新的训练测试表格,并构建新的训练样本表格中各表格节点的第一节点特征,以重新对两层图卷积网络进行训练得到新的待确认表格识别模型,再构建新的训练测试表格中各表格节点的第二节点特征,以针对新的待确认表格识别模型进行测试,如此循环直至针对待确认表格识别模型进行测试的测试结果符合模型识别条件。
需要说明是,在本实施例中,终端设备重新针对两层图卷积网络进行训练的过程,实质上与上述构建训练数据并利用训练数据针对两层图卷积网络进行训练的过程相同,因此,此处不再针对终端设备重新针对两层图卷积网络进行训练的过程进行赘述。
在本实施例中,通过终端设备预先基于构建用于针对图卷积网络进行训练的训练数据,然后利用该训练数据来训练两层图卷积网络,从而将该两层图卷积网络训练成为用于针对待识别表格中相互两个表格节点之间节点关系进行预测识别的表格识别模型。从而实现了,基于图卷积网络训练得到的表格识别模型根据待识别表格的节点特征预测并输出节点关系,然后针对该节点关系进行后处理操作从而还原得到待识别表格的表格结构。从而,无需表格数据的图像具有较高质量即可自动识别出表格结构并进行还原,解除了识别和还原表格结构对于图像质量的依赖,提高了表格结构的识别准确性和表格还原效率。
此外,本申请还提供了表格结构的还原系统,请参照图4,图4为本申请表格结构的还原系统的功能模块示意图,该表格结构的还原系统包括:
构建模块101,用于构建待识别表格中各表格节点的节点特征;
识别模块102,用于调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
还原模块103,用于针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
可选地,所述图卷积网络包括但不限于两层图卷积网络,本申请表格结构的还原系统,还包括:
模型训练模块,用于构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型。
可选地,所述训练数据包括训练样本表格和训练测试表格,所述模型训练模块,包括:
获取单元,用于获取公开表格数据并针对所述公开表格数据进行预处理以构建得到所述训练样本表格和所述训练测试表格;
第一构建单元,用于构建所述训练样本表格中各表格节点的第一节点特征,并将所述第一节点特征输入两层图卷积网络进行训练得到待确认表格识别模型;
第二构建单元,用于构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果;
确定单元,用于若所述测试结果符合预设的模型识别条件,则将所述待确认表格识别 模型作为训练完成的表格识别模型。
可选地,所述模型训练模块,还包括:
重复训练单元,用于若所述测试结果不符合预设的模型识别条件,则构建新的训练样本表格对所述两层图卷积网络重新进行训练。
可选地,所述构建模块101,包括:
建立单元,用于建立所述待识别表格中各所述表格节点的单元格特征;
第一提取单元,用于分别提取各所述表格节点各自邻近表格节点的单元格特征形成单元格特征集;
聚合单元,用于针对所述单元格特征集进行聚合运算以得到各所述表格节点各自的节点特征。
可选地,所述表格识别模型存储于区块链中,所述节点关系包括但不限于水平、垂直和不相关,所述识别模块,包括:
第二提取单元,用于从所述区块链中提取所述表格识别模型;
结构识别单元,用于将所述待识别表格中各所述表格节点各自的所述节点特征输入所述表格识别模型,以供所述表格识别模型基于所述节点特征进行训练计算后,输出各所述表格节点相互两个表格节点之间水平、垂直或者不相关的节点关系。
可选地,所述还原模块103,还用于利用预设的极大团算法针对所述节点关系进行后处理以还原所述待识别表格的表格结构得到完整的表格。
本申请表格结构的还原系统的具体实施方式与上述表格结构的还原方法各实施例基本相同,在此不再赘述。
此外,本申请还提供了一种计算机存储介质,所述计算机存储介质可以是易失性的,也可以是非易失性的,该计算机存储介质存储有一个或者一个以上程序,该一个或者一个以上程序还可被一个或者一个以上的处理器执行以用于:
构建待识别表格中各表格节点的节点特征;
调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
此外,该一个或者一个以上程序还可被一个或者一个以上的处理器执行调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系之前,还用于:
构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型。
此外,所述训练数据包括训练样本表格和训练测试表格,该一个或者一个以上程序还可被一个或者一个以上的处理器执行还用于:
获取公开表格数据并针对所述公开表格数据进行预处理以构建得到所述训练样本表格和所述训练测试表格;
构建所述训练样本表格中各表格节点的第一节点特征,并将所述第一节点特征输入两层图卷积网络进行训练得到待确认表格识别模型;
构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果;
若所述测试结果符合预设的模型识别条件,则将所述待确认表格识别模型作为训练完成的表格识别模型。
此外,该一个或者一个以上程序还可被一个或者一个以上的处理器执行构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果之后,还用于:
若所述测试结果不符合预设的模型识别条件,则构建新的训练样本表格对所述两层图卷积网络重新进行训练。
此外,所述表格识别模型存储于区块链中,所述节点关系包括但不限于水平、垂直和不相关,该一个或者一个以上程序还可被一个或者一个以上的处理器执行还用于:
从所述区块链中提取所述表格识别模型;
将所述待识别表格中各所述表格节点各自的所述节点特征输入所述表格识别模型,以供所述表格识别模型基于所述节点特征进行训练计算后,输出各所述表格节点相互两个表格节点之间水平、垂直或者不相关的节点关系。
本申请计算机存储介质的具体实施方式与上述表格结构的还原方法各实施例基本相同,在此不再赘述。
需要说明的是,本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。此外,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的可选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种表格结构的还原方法,其中,所述表格结构的还原方法包括:
    构建待识别表格中各表格节点的节点特征;
    调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
    针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
  2. 如权利要求1所述的表格结构的还原方法,其中,所述图卷积网络包括但不限于两层图卷积网络,在所述调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系的步骤之前,所述方法还包括:
    构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型。
  3. 如权利要求2所述的表格结构的还原方法,其中,所述训练数据包括训练样本表格和训练测试表格,
    所述构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型的步骤,包括:
    获取公开表格数据并针对所述公开表格数据进行预处理以构建得到所述训练样本表格和所述训练测试表格;
    构建所述训练样本表格中各表格节点的第一节点特征,并将所述第一节点特征输入两层图卷积网络进行训练得到待确认表格识别模型;
    构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果;
    若所述测试结果符合预设的模型识别条件,则将所述待确认表格识别模型作为训练完成的表格识别模型。
  4. 如权利要求3所述的表格结构的还原方法,其中,在所述构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果的步骤之后,还包括:
    若所述测试结果不符合预设的模型识别条件,则构建新的训练样本表格对所述两层图卷积网络重新进行训练。
  5. 如权利要求1所述的表格结构的还原方法,其中,所述构建待识别表格中各表格节点的节点特征的步骤,包括:
    建立所述待识别表格中各所述表格节点的单元格特征;
    分别提取各所述表格节点各自邻近表格节点的单元格特征形成单元格特征集;
    针对所述单元格特征集进行聚合运算以得到各所述表格节点各自的节点特征。
  6. 如权利要求1所述的表格结构的还原方法,其中,所述表格识别模型存储于区块链中,所述节点关系包括但不限于水平、垂直和不相关,
    所述调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系的步骤,包括:
    从所述区块链中提取所述表格识别模型;
    将所述待识别表格中各所述表格节点各自的所述节点特征输入所述表格识别模型,以供所述表格识别模型基于所述节点特征进行训练计算后,输出各所述表格节点相互两个表格节点之间水平、垂直或者不相关的节点关系。
  7. 如权利要求1所述的表格结构的还原方法,其中,所述针对所述节点关系进行后处理以还原所述待识别表格的表格结构的步骤,包括:
    利用预设的极大团算法针对所述节点关系进行后处理以还原所述待识别表格的表格 结构得到完整的表格。
  8. 一种表格结构的还原系统,其中,所述表格结构的还原系统包括:
    构建模块,用于构建待识别表格中各表格节点的节点特征;
    识别模块,用于调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
    还原模块,用于针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
  9. 一种计算机设备,其中,所述计算机设备包括:存储器、处理器,通信总线以及存储在所述存储器上的表格结构的还原程序,
    所述通信总线用于实现处理器与存储器间的通信连接;
    所述处理器用于执行所述基于互联网的表格结构的还原程序,以实现如下步骤:
    构建待识别表格中各表格节点的节点特征;
    调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
    针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
  10. 如权利要求9所述的计算机设备,其中,所述图卷积网络包括但不限于两层图卷积网络,在所述调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系的步骤之前,所述处理器执行所述基于互联网的表格结构的还原程序时还实现如下步骤:
    构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型。
  11. 如权利要求10所述的计算机设备,其中,所述训练数据包括训练样本表格和训练测试表格,
    所述构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型的步骤,包括:
    获取公开表格数据并针对所述公开表格数据进行预处理以构建得到所述训练样本表格和所述训练测试表格;
    构建所述训练样本表格中各表格节点的第一节点特征,并将所述第一节点特征输入两层图卷积网络进行训练得到待确认表格识别模型;
    构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果;
    若所述测试结果符合预设的模型识别条件,则将所述待确认表格识别模型作为训练完成的表格识别模型。
  12. 如权利要求11所述的计算机设备,其中,在所述构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果的步骤之后,所述处理器执行所述基于互联网的表格结构的还原程序时还实现如下步骤:
    若所述测试结果不符合预设的模型识别条件,则构建新的训练样本表格对所述两层图卷积网络重新进行训练。
  13. 如权利要求9所述的计算机设备,其中,所述构建待识别表格中各表格节点的节点特征的步骤,包括:
    建立所述待识别表格中各所述表格节点的单元格特征;
    分别提取各所述表格节点各自邻近表格节点的单元格特征形成单元格特征集;
    针对所述单元格特征集进行聚合运算以得到各所述表格节点各自的节点特征。
  14. 如权利要求9所述的计算机设备,其中,所述表格识别模型存储于区块链中,所 述节点关系包括但不限于水平、垂直和不相关,
    所述调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系的步骤,包括:
    从所述区块链中提取所述表格识别模型;
    将所述待识别表格中各所述表格节点各自的所述节点特征输入所述表格识别模型,以供所述表格识别模型基于所述节点特征进行训练计算后,输出各所述表格节点相互两个表格节点之间水平、垂直或者不相关的节点关系。
  15. 如权利要求9所述的计算机设备,其中,所述针对所述节点关系进行后处理以还原所述待识别表格的表格结构的步骤,包括:
    利用预设的极大团算法针对所述节点关系进行后处理以还原所述待识别表格的表格结构得到完整的表格。
  16. 一种计算机存储介质,其中,所述计算机存储介质上存储有表格结构的还原程序,所述表格结构的还原程序被处理器执行时实现如下步骤:
    构建待识别表格中各表格节点的节点特征;
    调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系,其中,所述表格识别模型预先基于图卷积网络训练得到;
    针对所述节点关系进行后处理以还原所述待识别表格的表格结构。
  17. 如权利要求16所述的计算机存储介质,其中,所述图卷积网络包括但不限于两层图卷积网络,在所述调用预设的表格识别模型,以供所述表格识别模型根据所述节点特征输出各所述表格节点相互之间的节点关系的步骤之前,所述表格结构的还原程序被处理器执行时还实现如下步骤:
    构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型。
  18. 如权利要求17所述的计算机存储介质,其中,所述训练数据包括训练样本表格和训练测试表格,
    所述构建训练数据并利用所述训练数据针对两层图卷积网络进行训练以得到预设的表格识别模型的步骤,包括:
    获取公开表格数据并针对所述公开表格数据进行预处理以构建得到所述训练样本表格和所述训练测试表格;
    构建所述训练样本表格中各表格节点的第一节点特征,并将所述第一节点特征输入两层图卷积网络进行训练得到待确认表格识别模型;
    构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果;
    若所述测试结果符合预设的模型识别条件,则将所述待确认表格识别模型作为训练完成的表格识别模型。
  19. 如权利要求18所述的计算机存储介质,其中,在所述构建所述训练测试表格中各表格节点的第二节点特征,并将所述第二节点特征输入所述待确认表格识别模型,以针对所述待确认表格识别模型进行测试并确定测试结果的步骤之后,所述表格结构的还原程序被处理器执行时还实现如下步骤:
    若所述测试结果不符合预设的模型识别条件,则构建新的训练样本表格对所述两层图卷积网络重新进行训练。
  20. 如权利要求16所述的计算机存储介质,其中,所述构建待识别表格中各表格节点的节点特征的步骤,包括:
    建立所述待识别表格中各所述表格节点的单元格特征;
    分别提取各所述表格节点各自邻近表格节点的单元格特征形成单元格特征集;
    针对所述单元格特征集进行聚合运算以得到各所述表格节点各自的节点特征。
PCT/CN2021/109491 2020-11-17 2021-07-30 表格结构的还原方法、系统、计算机设备及存储介质 WO2022105297A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011290469.5 2020-11-17
CN202011290469.5A CN112381010A (zh) 2020-11-17 2020-11-17 表格结构的还原方法、系统、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022105297A1 true WO2022105297A1 (zh) 2022-05-27

Family

ID=74585025

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/109491 WO2022105297A1 (zh) 2020-11-17 2021-07-30 表格结构的还原方法、系统、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN112381010A (zh)
WO (1) WO2022105297A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116824611A (zh) * 2023-08-28 2023-09-29 星汉智能科技股份有限公司 表格结构识别方法、电子设备、计算机可读存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381010A (zh) * 2020-11-17 2021-02-19 深圳壹账通智能科技有限公司 表格结构的还原方法、系统、计算机设备及存储介质
CN112949443B (zh) * 2021-02-24 2023-07-25 平安科技(深圳)有限公司 表格结构识别方法、装置、电子设备及存储介质
CN114495140B (zh) * 2022-04-14 2022-07-12 安徽数智建造研究院有限公司 表格的信息提取方法、系统、设备、介质及程序产品

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344823A (zh) * 2018-09-11 2019-02-15 福建天晴在线互动科技有限公司 基于区块链机制的ocr深度学习方法、存储介质
US20190361972A1 (en) * 2018-05-24 2019-11-28 PAI TECH Company Limited Method, apparatus, device for table extraction based on a richly formatted document and medium
CN111640130A (zh) * 2020-05-29 2020-09-08 深圳壹账通智能科技有限公司 表格还原方法及装置
CN111860257A (zh) * 2020-07-10 2020-10-30 上海交通大学 融合多种文本特征及几何信息的表格识别方法及系统
CN112381010A (zh) * 2020-11-17 2021-02-19 深圳壹账通智能科技有限公司 表格结构的还原方法、系统、计算机设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190361972A1 (en) * 2018-05-24 2019-11-28 PAI TECH Company Limited Method, apparatus, device for table extraction based on a richly formatted document and medium
CN109344823A (zh) * 2018-09-11 2019-02-15 福建天晴在线互动科技有限公司 基于区块链机制的ocr深度学习方法、存储介质
CN111640130A (zh) * 2020-05-29 2020-09-08 深圳壹账通智能科技有限公司 表格还原方法及装置
CN111860257A (zh) * 2020-07-10 2020-10-30 上海交通大学 融合多种文本特征及几何信息的表格识别方法及系统
CN112381010A (zh) * 2020-11-17 2021-02-19 深圳壹账通智能科技有限公司 表格结构的还原方法、系统、计算机设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116824611A (zh) * 2023-08-28 2023-09-29 星汉智能科技股份有限公司 表格结构识别方法、电子设备、计算机可读存储介质
CN116824611B (zh) * 2023-08-28 2024-04-05 星汉智能科技股份有限公司 表格结构识别方法、电子设备、计算机可读存储介质

Also Published As

Publication number Publication date
CN112381010A (zh) 2021-02-19

Similar Documents

Publication Publication Date Title
WO2022105297A1 (zh) 表格结构的还原方法、系统、计算机设备及存储介质
US20220188840A1 (en) Target account detection method and apparatus, electronic device, and storage medium
WO2019105163A1 (zh) 目标人物的搜索方法和装置、设备、程序产品和介质
WO2021143267A1 (zh) 基于图像检测的细粒度分类模型处理方法、及其相关设备
WO2021120677A1 (zh) 一种仓储模型训练方法、装置、计算机设备及存储介质
WO2020248841A1 (zh) 图像的au检测方法、装置、电子设备及存储介质
WO2022142009A1 (zh) 一种模糊图像修正的方法、装置、计算机设备及存储介质
WO2022037541A1 (zh) 图像处理模型训练方法、装置、设备及存储介质
JP2022512065A (ja) 画像分類モデルの訓練方法、画像処理方法及び装置
CN110287316A (zh) 一种告警分类方法、装置、电子设备及存储介质
US11748452B2 (en) Method for data processing by performing different non-linear combination processing
WO2022156084A1 (zh) 基于人脸和交互文本的目标对象行为预测方法及相关设备
CN108205570A (zh) 一种数据检测方法和装置
CN112395979A (zh) 基于图像的健康状态识别方法、装置、设备及存储介质
CN111695517A (zh) 图像的表格提取方法、装置、电子设备及存储介质
CN111813910A (zh) 客服问题的更新方法、系统、终端设备及计算机存储介质
CN111984803B (zh) 多媒体资源处理方法、装置、计算机设备及存储介质
CN111881740B (zh) 人脸识别方法、装置、电子设备及介质
US20240135698A1 (en) Image classification method, model training method, device, storage medium, and computer program
CN112434188A (zh) 一种异构数据库的数据集成方法、装置及存储介质
CN115439192A (zh) 医疗商品信息的推送方法及装置、存储介质、计算机设备
WO2024120446A1 (zh) 特效道具、特效图的生成方法、装置、设备及存储介质
WO2019062404A1 (zh) 应用程序的处理方法、装置、存储介质及电子设备
CN113344994A (zh) 图像配准方法、装置、电子设备及存储介质
CN110392115B (zh) 区块链节点管理方法、装置和可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21893449

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.08.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21893449

Country of ref document: EP

Kind code of ref document: A1