Private domain semi-structured knowledge representation method, system and related device

Through OCR and document analysis technology, heuristic rules and table category discrimination model, combined with the knowledge distillation and voting mechanism of the teacher model, the noise and complexity of table data in the power industry are solved, and the accuracy of representation of private domain semi-structured knowledge is improved. and fault tolerance, suitable for pre-training of hundreds of billion-level models in the power industry.

CN119150962APending Publication Date: 2024-12-17GLOBAL ENERGY INTERCONNECTION RES INST CO LTD +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411229090.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The private domain semi-structured knowledge of the power industry, especially tabular data, is difficult to be effectively understood by large-scale models due to noise and errors in formats and contents, and the existing methods lack support and tolerance for complex tables, resulting in the model being Poor performance during pre-training.

Method used

Use OCR or document analysis to obtain table text sequences, convert them to Markdown form, and use heuristic rules to correct coarse-grained formats, use pre-trained table category discrimination model to perform category judgment, and combine with teacher model to perform knowledge distillation, and finally pass model self-test The voting mechanism generates the most recognized form knowledge text representation.

Benefits of technology

It improves the completeness and accuracy of table knowledge representation, increases the fault tolerance and robustness of the method, improves the ability to understand complex tables, and is suitable for pre-training of private domain data in the power industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150962A_ABST
    Figure CN119150962A_ABST
Patent Text Reader

Abstract

The invention discloses a private domain semi-structured knowledge representation method and system and a related device, and belongs to the technical field of natural language processing. Obtaining a Markdown form text sequence of the table text sequence by utilizing OCR (Optical Character Recognition) or document analysis, and performing coarse-grained table format correction by utilizing a heuristic rule; performing category judgment on the format-corrected table by adopting a pre-trained table category judgment model to obtain a classification result and a category probability; according to the classification result and the category probability, performing table knowledge distillation by utilizing a teacher model to obtain a table knowledge text; and based on a voting mechanism of model self-inspection, voting the final text representation of the table knowledge which is most accepted by the teacher model from the table knowledge text. According to the method, the integrity and accuracy of private domain semi-structured knowledge representation are improved, table knowledge candidates are scored, the fault tolerance of the method is increased, and the robustness is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing and relates to a private domain semi-structured knowledge representation method, system and related devices. Background Art

[0002] Recently, large language models have had a huge impact on the field of natural language processing research, and have also made a qualitative leap in the understanding of semi-structured knowledge. However, in the process of continuing pre-training, private semi-structured knowledge in the power industry, such as tables, usually has certain limitations, which are specifically manifested in:

[0003] 1. Knowledge in the power industry is usually collected based on methods such as OCR (Optical Character Recognition), technology or document parsing, and there are certain noises and errors in both format and content.

[0004] 2. The semi-structured knowledge in the power industry is private and critical. It cannot be converted using out-of-domain models and cannot be completely discarded.

[0005] 3. The computing power and data scale required to train a trillion-dollar model that can understand complex semi-structured knowledge (such as the latex format of a table) are difficult to meet.

[0006] Therefore, training a model of tens of billions of scale to understand such knowledge during the pre-training process is a difficult problem for the power industry.

[0007] Currently, there are three main ways to make models understand this kind of knowledge as far as tables are concerned:

[0008] 1. Heuristic text sequence format:

[0009] In the Bert era, table understanding methods mainly used heuristic text sequences. For example, the encoder-only structure of TABERT, TableFormer, TAPAS and other works added additional column ID embedding, row ID embedding, etc. on the basis of the original position embedding. By learning additional embedding representations, the table can be better represented. Or similar to the encoder-decoder structure of TAPEX, the table |[HEAD]|header 1|header 2| is straightened and the table is represented by the prompt word method.

[0010] However, this method requires absolute accuracy of the table format and data, which is difficult to guarantee on tables in the power industry.

[0011] 2.Markdown format:

[0012] At present, some closed-source large language models use Markdown format to represent tables, which can easily represent tables. Even for models with tens of billions of words, there is a certain tolerance for Markdown representation of tables through certain prompt words.

[0013] However, there are many problems with using the Markdown format for pre-training in the power industry. First, there are no prompts to assist model understanding during training; second, the 10 billion model still has a low tolerance for messy tables, and even does not support complex tables.

[0014] 3.Latex / HTML format:

[0015] In order to express complex tables, especially merged tables, you can also use Latex and HTML formats to express tables. Use the rowspan and colspan attributes to express the merging of cells to cover more complex tables.

[0016] However, covering more complex tables often requires the complexity and accuracy of the representation method. In terms of the complexity of the representation method, the ability of a model with a scale of tens of billions to understand HTML or latex is usually weak, and a table is usually represented by text that is several times the length of the table, which also poses certain challenges to the input length of the model; in terms of accuracy, structural errors caused by the noise of the recognition table will also be amplified. Summary of the invention

[0017] In order to solve the above problems, the present invention proposes a private domain semi-structured knowledge representation method, system and related devices, which improve the completeness and accuracy of the private domain semi-structured knowledge representation, score the tabular knowledge candidates, increase the fault tolerance of the method, and improve the robustness.

[0018] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0019] In a first aspect, the present invention provides a method for representing private domain semi-structured knowledge, comprising:

[0020] The obtained table text sequence;

[0021] Obtaining a Markdown text sequence of the table text sequence by using OCR or document parsing, and performing coarse-grained table format correction by using heuristic rules;

[0022] Use the pre-trained table category discrimination model to classify the table after format correction to obtain the classification result and category probability;

[0023] According to the classification results and the category probabilities, the table knowledge is distilled using the teacher model to obtain the table knowledge text;

[0024] Based on the voting mechanism of model self-checking, the final text representation of the tabular knowledge most recognized by the teacher model is voted out from the tabular knowledge text.

[0025] As a further improvement of the present invention, in the Markdown text sequence obtained by utilizing OCR or document parsing to obtain the table text sequence, the merged cell part is filled in a repeated manner.

[0026] As a further improvement of the present invention, the coarse-grained table format correction using heuristic rules includes aligning the number of columns of each row of the table and checking whether the contents of the merged cells are consistent.

[0027] As a further improvement of the present invention, the training process of the pre-trained table category discrimination model includes:

[0028] Divide tables into four categories: vertical tables, horizontal tables, complex vertical tables and others;

[0029] Label each type of table data in the format-corrected tables as training sets;

[0030] Based on the training set, Roberta is used as a basic model for training to obtain a pre-trained table category discrimination model.

[0031] As a further improvement of the present invention, in the training using Roberta as the basic model, long tables are processed by truncating them from the beginning according to the maximum length.

[0032] As a further improvement of the present invention, according to the classification results and the category probabilities, the table knowledge text is obtained by performing table knowledge distillation using the teacher model, including:

[0033] According to the classification results and probability of the table category discrimination model, a threshold is set to determine the table type;

[0034] The teacher model's understanding of the table is obtained multiple times by changing the prompt words and increasing the randomness of the teacher model's answers;

[0035] Use three other types of prompt words to obtain the teacher model’s understanding of the table, and perform table knowledge distillation to obtain table knowledge text.

[0036] As a further improvement of the present invention, the voting mechanism based on model self-checking, which votes out the final text representation of the table knowledge most recognized by the teacher model from the table knowledge text, includes:

[0037] Using the prompt words to score the table knowledge, assume that the table text t has m different representation methods due to different prompt words, which are T = {T1, T2, ..., T}, and the i-th text sequence T i , the score set after n evaluations is S i ={S i,1 ,S i,2 ,...,S i,n}, calculate the score s i :

[0038]

[0039] S i ′ =S i \{max(S i ),min(S i )}

[0040] Among them, S i ′ is the score set S i The score set after removing a maximum value and a minimum value; s i Then S i ′ The average score under the set;

[0041] The text sequence T with the highest score in set T i , representing the textual representation of the most appropriate tabular knowledge.

[0042] In a second aspect, the present invention provides a private domain semi-structured knowledge representation system, comprising:

[0043] The acquisition module is used to acquire the table text sequence;

[0044] A correction module, used for obtaining a Markdown text sequence of the table text sequence by using OCR or document parsing, and performing coarse-grained table format correction by using heuristic rules;

[0045] A determination module is used to use a pre-trained table category determination model to determine the category of the table after the format correction, and obtain a classification result and category probability;

[0046] A distillation module, used for performing table knowledge distillation based on the classification results and category probabilities and using a teacher model to obtain table knowledge text;

[0047] The voting module is used for voting the final text representation of the tabular knowledge most recognized by the teacher model from the tabular knowledge text based on the voting mechanism of model self-examination.

[0048] Optionally, in the correction module, in the Markdown text sequence of the table text sequence obtained by OCR or document parsing, the merged cell part is filled in a repeated manner.

[0049] Optionally, in the correction module, the heuristic rules are used to perform coarse-grained table format correction, including aligning the number of columns in each row of the table and checking whether the contents of merged cells are consistent.

[0050] Optionally, in the determination module, the training process of the pre-trained table category discrimination model includes:

[0051] Divide tables into four categories: vertical tables, horizontal tables, complex vertical tables and others;

[0052] Label each type of table data in the format-corrected tables as training sets;

[0053] Based on the training set, Roberta is used as a basic model for training to obtain a pre-trained table category discrimination model.

[0054] Optionally, in the determination module, when Roberta is used as the basic model for training, long tables are processed by truncating them from the beginning according to the maximum length.

[0055] Optionally, in the distillation module, according to the classification result and the category probability, the table knowledge is distilled using a teacher model to obtain a table knowledge text, including:

[0056] According to the classification results and probability of the table category discrimination model, a threshold is set to determine the table type;

[0057] The teacher model's understanding of the table is obtained multiple times by changing the prompt words and increasing the randomness of the teacher model's answers;

[0058] Use three other types of prompt words to obtain the teacher model’s understanding of the table, and perform table knowledge distillation to obtain table knowledge text.

[0059] Optionally, in the voting module, the voting mechanism based on model self-checking, voting out the final text representation of the table knowledge most recognized by the teacher model from the table knowledge text, includes:

[0060] Using the prompt words to score the table knowledge, assume that the table text t has m different representation methods due to different prompt words, which are T = {T1, T2, ..., T}, and the i-th text sequence T i , the score set after n evaluations is S i ={S i,1 ,S i,2,...,S i,n}, calculate the score s i :

[0061]

[0062] S i ′ =S i \{max(S i ),min(S i )}

[0063] Among them, S i ′ is the score set S i The score set after removing a maximum value and a minimum value; s i Then S i ′ The average score under the set;

[0064] The text sequence T with the highest score in set T i , representing the textual representation of the most appropriate tabular knowledge.

[0065] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the private domain semi-structured knowledge representation method when executing the computer program.

[0066] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the private domain semi-structured knowledge representation method is implemented.

[0067] In a fifth aspect, the present invention provides a computer program product, wherein the computer program product comprises computer instructions, wherein the computer instructions instruct a computer to execute the private domain semi-structured knowledge representation method.

[0068] The beneficial effects of the present invention compared with the prior art are as follows:

[0069] In order to improve the table input of the trillion-level model, the present invention performs heuristic coarse-grained inspection and correction of the table format and complex merged cells from the source, which increases the fault tolerance of the method for the table format. Taking into account the diversity of table formats, the present invention designs a table category discrimination model to judge the table type, which can assist in improving the accuracy of the teacher model in acquiring table knowledge. While adding corresponding table type prompt words based on the discrimination results, the other three types of table type prompt words are not completely deleted to generate multiple groups of table knowledge candidates. Designing multiple discrimination experts to score the table knowledge candidates based on the completeness and accuracy of the table knowledge increases the fault tolerance of the method and improves the robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0071] Figure 1 A flowchart of the private domain semi-structured knowledge representation provided by the present invention;

[0072] Figure 2 A schematic diagram of an operation for aligning table columns provided in an embodiment of the present invention;

[0073] Figure 3 A schematic diagram of an example of a table type provided in an embodiment of the present invention;

[0074] Figure 4 A flow chart of a method provided by an embodiment of the present invention;

[0075] Figure 5 A flowchart of the technology application provided by the embodiment of the present invention;

[0076] Figure 6 A private domain semi-structured knowledge representation system provided by the present invention;

[0077] Figure 7 A schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0078] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0079] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0080] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The embodiments will be described in detail below in conjunction with the accompanying drawings.

[0081] Terminology explanation:

[0082] OCR (Optical Character Recognition) is a powerful tool that is particularly good at recognizing text in mathematical formulas, scientific symbols, and handwritten notes. Mathpix is ​​more than just a simple OCR software. It can convert complex contents such as scanned or photographed mathematical formulas, diagrams, codes, etc. into editable formats such as LaTeX, MathML, PNG, SVG, etc., greatly improving the work efficiency of scientific researchers, students, teachers, and anyone who needs to deal with mathematical and scientific documents.

[0083] CD-ROM, the full name of Compact Disc Read-Only Memory, is an external storage medium that can store large amounts of data.

[0084] Markdown is a lightweight markup language that allows people to write documents in a plain text format that is easy to read and write, and then convert it into a valid XHTML (or HTML) document. Markdown has a concise syntax and low learning cost, making it very suitable for writing blog posts, document descriptions, project introductions, etc.

[0085] PDF (Portable Document Format) is a file format used to present documents, including text, images, tables, charts, forms, etc., in a way that is independent of applications, operating systems, and hardware. PDF files are designed to fully present the format of the source document, including layout, fonts, colors, and images, ensuring that the document remains intact when viewed on any device.

[0086] The RoBERTa model (Robustly Optimized BERT Pretraining Approach) is an optimized version of the BERT model. RoBERTa has made many improvements based on BERT to improve the performance and stability of the model in natural language processing (NLP) tasks. The RoBERTa model has the following features:

[0087] Efficiency: Although RoBERTa has a more complex configuration, it adds only a small number of additional parameters (e.g., 15M) while maintaining an inference speed comparable to BERT.

[0088] Robustness: Through multiple improvements and optimizations, RoBERTa has shown higher robustness and stability in a variety of NLP tasks.

[0089] Widely used: The RoBERTa model has been widely used in various NLP tasks and has achieved significant performance improvements.

[0090] join Figure 1 The first object of the present invention is to propose a method for representing private domain semi-structured knowledge, comprising:

[0091] S100, the obtained table text sequence;

[0092] S200, using OCR or document parsing to obtain a Markdown (i.e., lightweight markup language) text sequence of the table text sequence, and using heuristic rules to perform coarse-grained table format correction;

[0093] S300, using a pre-trained table category discrimination model to perform category discrimination on the table after format correction, and obtain a classification result and category probability;

[0094] S400, performing table knowledge distillation using a teacher model according to the classification result and the category probability to obtain a table knowledge text;

[0095] S500, based on the voting mechanism of model self-checking, vote out the final text representation of the table knowledge most recognized by the teacher model from the table knowledge text.

[0096] The principle of this invention is to use advanced natural language processing technology and machine learning models to effectively understand and represent tabular text data in the private domain. The core of this method is to combine OCR (optical character recognition) or document parsing technology, heuristic rules, table category discrimination model and knowledge distillation technology to achieve deep parsing and knowledge extraction of tabular text. The specific analysis is as follows:

[0097] First, the table text sequence is converted into a text sequence in Markdown format through OCR technology or document parsing methods. This step is the basis for subsequent processing, which ensures the readability and structure of the table data. By converting the table data into a text sequence in Markdown format through OCR or document parsing technology, the data is easier to read and process, which improves the readability of the table data.

[0098] Next, we use heuristic rules to perform coarse-grained format corrections on the Markdown text. Heuristic rules are based on experience or intuitive judgment, and they can help correct some common format errors and improve data accuracy. Using heuristic rules and table category discrimination models to perform format corrections and classification judgments on table data effectively improves data accuracy and enhances data accuracy.

[0099] Then, the pre-trained table category discrimination model is used to classify the table after the format correction. This step is to label the table data appropriately to facilitate subsequent knowledge distillation and classification processing.

[0100] Based on the classification results and category probabilities, the tabular knowledge is distilled. Knowledge distillation is the transfer of knowledge from the teacher model to the student model or text representation. Here, it is used to extract the understanding of the tabular data from the teacher model and express it in text form. Through the knowledge distillation technology, the understanding of the tabular data is extracted from the teacher model and expressed in text form, which is convenient for subsequent industry to continue pre-training and application. Effective extraction of knowledge is achieved.

[0101] Finally, based on the voting mechanism of model self-checking, the final text representation that meets the requirements is voted from the distilled tabular knowledge text. This step is to ensure that the final output text representation is accurate, reliable and useful. The voting mechanism based on model self-checking ensures the accuracy and reliability of the final output text representation, and at the same time makes the method more universal and robust in different industries and scenarios.

[0102] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0103] The private domain semi-structured knowledge representation method for industry continued pre-training proposed in this invention uses the private domain to deploy hundreds of billions of teacher models, and uses heuristic rules and table category classification models to assist the teacher model in understanding the table and tolerance of table format errors. Finally, the teacher model's understanding of the knowledge contained in the table is distilled in the form of text for industry continued pre-training.

[0104] Figure 4 The method flow chart shown in FIG. 1 is as follows:

[0105] 1)OCR or document parsing:

[0106] Since the acquired table text sequence has certain noise distribution, the present invention needs to acquire the table Markdown text sequence based on OCR or document parsing (wherein the merged cell part is filled in a repeated manner).

[0107] 2) Heuristic rules:

[0108] Design heuristic rules to perform coarse-grained table format corrections. Specific processing is to align the number of columns in each row of the table, check whether the contents of merged cells are consistent, etc. Figure 2 The following is a schematic diagram of the operation of aligning the number of table columns.

[0109] Next, we use heuristic rules to perform coarse-grained format corrections on the Markdown text. Heuristic rules are based on experience or intuitive judgment, and they can help correct some common format errors and improve the accuracy of the data.

[0110] 3) Table category discrimination model:

[0111] Taking into account that the type of table is not fixed, the knowledge expected to be extracted from different types of tables is also different. Therefore, the present invention believes that the prompt words used for teacher model distillation also need to change according to the type of table. From the table format, the present invention considers dividing the table into four categories: vertical table, horizontal table, complex vertical table and others. Finally, 100 items of each type of table data are manually labeled from the roughly corrected table data for training the table category discrimination model. When training the table category discrimination model, the present invention uses Chinese Roberta as the base model.

[0112] Preferably, considering that the type of a table can generally be determined from the first two lines of content, a special process of truncating the table from the beginning according to the maximum length is adopted for long tables (tables with a length greater than the average value). Figure 3 The following table shows an example of the table type.

[0113] The table category discrimination model judges the table type and can help improve the accuracy of the teacher model in acquiring table knowledge.

[0114] 4) Knowledge Distillation:

[0115] According to the classification results and probabilities of the table category discrimination model, the present invention uses 0.6 as the threshold. If the probability exceeds the threshold, the present invention judges it as a table of the corresponding format; otherwise, the table is classified as other types. At the same time, considering that the model's single prompt word may introduce certain biases or even misunderstandings into the understanding of the table content. Therefore, in order to reduce the errors caused by the large model in understanding the table, the present invention obtains the teacher model's (i.e., the private domain trillion model) understanding of the table multiple times by changing the prompt words and increasing the randomness of the model's answers. And in order to increase the fault tolerance of the discrimination model for judging the type of table, the present invention will also use three other types of prompt words to obtain the teacher model's understanding of the table.

[0116] 5) Voting mechanism:

[0117] Finally, the present invention designs a voting mechanism for model self-checking to vote out the complete and accurate table knowledge of the teacher model from the multiple table understanding contents output by the third step model.

[0118] Specifically, the present invention switches the role played by the teacher model to an expert who evaluates the accuracy and completeness of the table content. Multiple evaluation experts are designed to score the table knowledge using prompt words. Assume that the table text t has m different representation methods due to different prompt words, which are T = {T1, T2, ..., T}, and the i-th text sequence T i , the score set after n evaluations is S i ={S i,1 ,S i,2 ,...,S i,n}, then the score s is calculated according to the following formula i :

[0119]

[0120] S i ′ =S i \{max(S i ),min(S i )}

[0121] Where S i ′ is the score set S i The score set after removing a maximum value and a minimum value; s i Then S i ′ The average score under the set;

[0122] Calculate the text sequence T with the highest score that best represents the teacher model's understanding of the table i , then select T i Continue pre-training the corpus as a student model.

[0123] Multiple discriminant experts are designed to score the table knowledge candidates based on the completeness and accuracy of the table knowledge, which increases the fault tolerance and robustness of the method. This method focuses on how to represent private domain tables to enhance the model's support for table knowledge when continuing pre-training in the power industry.

[0124] It can be seen that this method uses the teacher model (i.e., the private domain 100 billion model) to tolerate table formats and understand table knowledge, and distills the knowledge of the private domain table in the form of text for the 100 billion-level model, and continues to pre-train the industry student model. Compared with the traditional method of directly feeding the table, it is easier for the model to learn knowledge.

[0125] Figure 5 This is a technical application flow chart of the present invention. In specific applications, the forecast of the power industry is obtained (in PDF, Word, XML and other formats), input into the table text recognition model, and the table representation is converted to plain text. The plain text obtained by the table text recognition model is cleaned and screened to obtain the forecast of the power industry large model for further pre-training.

[0126] Taking advantage of the trillion-level model's tolerance for table formats and its ability to understand table knowledge, the trillion-level model's knowledge of private domain tables is distilled in the form of text to continue pre-training the industry student model.

[0127] like Figure 6As shown, the second object of the present invention is to provide a private domain semi-structured knowledge representation system, comprising:

[0128] An acquisition module 601 is used to acquire a table text sequence;

[0129] A correction module 602 is used to obtain a Markdown text sequence of the table text sequence by using OCR or document parsing, and perform coarse-grained table format correction by using heuristic rules;

[0130] The determination module 063 is used to use a pre-trained table category determination model to perform category determination on the table after the format correction, and obtain a classification result and category probability;

[0131] A distillation module 064 is used to distill the table knowledge according to the classification result and the category probability and to obtain the table knowledge text by using the teacher model;

[0132] The voting module 605 is used to vote for the final text representation of the table knowledge that is most recognized by the teacher model from the table knowledge text based on the voting mechanism of model self-checking.

[0133] like Figure 7 As shown, the third object of the embodiment of the present invention is to provide an electronic device, including a memory 701, a processor 702, and a computer program stored in the memory 701 and executable on the processor, wherein the processor 702 implements the private domain semi-structured knowledge representation method when executing the computer program. In the figure, the communication interface 703 is an interface for physical connection, and 704 is a communication cable.

[0134] The private domain semi-structured knowledge representation system is based on the private domain semi-structured knowledge representation method.

[0135] A fourth objective of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the private domain semi-structured knowledge representation method is implemented.

[0136] A fifth objective of an embodiment of the present invention is to provide a computer program product, wherein the computer program product comprises computer instructions, and the computer instructions instruct a computer to execute the private domain semi-structured knowledge representation method.

[0137] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0139] The present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0140] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0141] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for representing private domain semi-structured knowledge, characterized in that: include: The obtained table text sequence; Obtaining a Markdown text sequence of the table text sequence by using OCR or document parsing, and performing coarse-grained table format correction by using heuristic rules; Use the pre-trained table category discrimination model to classify the table after format correction to obtain the classification result and category probability; According to the classification results and the category probabilities, the table knowledge is distilled using the teacher model to obtain the table knowledge text; Based on the voting mechanism of model self-checking, the final text representation of the tabular knowledge most recognized by the teacher model is voted out from the tabular knowledge text.

2. A method for representing private domain semi-structured knowledge according to claim 1, characterized in that: In the Markdown text sequence obtained by using OCR or document parsing to obtain the table text sequence, the merged cell part is filled in a repeated manner.

3. A method for representing private domain semi-structured knowledge according to claim 1, characterized in that: The coarse-grained table format correction using heuristic rules includes aligning the number of columns in each row of the table and checking whether the contents of merged cells are consistent.

4. A method for representing private domain semi-structured knowledge according to claim 1, characterized in that: The training process of the pre-trained table category discrimination model includes: Divide tables into four categories: vertical tables, horizontal tables, complex vertical tables and others; Label each type of table data in the format-corrected tables as training sets; Based on the training set, Roberta is used as a basic model for training to obtain a pre-trained table category discrimination model.

5. A method for representing private domain semi-structured knowledge according to claim 4, characterized in that: In the training using Roberta as the basic model, long tables are processed by truncating them from the beginning according to the maximum length.

6. A method for representing private domain semi-structured knowledge according to claim 1, characterized in that: According to the classification results and category probabilities, the table knowledge is distilled using the teacher model to obtain the table knowledge text, including: According to the classification results and probability of the table category discrimination model, a threshold is set to determine the table type; The teacher model's understanding of the table is obtained multiple times by changing the prompt words and increasing the randomness of the teacher model's answers; Use three other types of prompt words to obtain the teacher model’s understanding of the table, and perform table knowledge distillation to obtain table knowledge text.

7. A method for representing private domain semi-structured knowledge according to claim 1, characterized in that: The voting mechanism based on model self-checking, which votes out the final text representation of the table knowledge most recognized by the teacher model from the table knowledge text, includes: Using the prompt words to score the table knowledge, assume that the table text t has m different representation methods due to different prompt words, which are T = {T1, T2, ..., T}, and the i-th text sequence T i , the score set after n evaluations is S i ={S i,1 ,S i,2 ,...,S i,n }, calculate the score s i : S i ′ =S i \{max(S i ),min(S i )} Among them, S i ′ is the score set S i The score set after removing a maximum value and a minimum value; s i Then S i ′ The average score under the set; The text sequence T with the highest score in set T i , representing the textual representation of the most appropriate tabular knowledge.

8. A private domain semi-structured knowledge representation system, characterized in that: include: The acquisition module is used to acquire the table text sequence; A correction module, used for obtaining a Markdown text sequence of the table text sequence by using OCR or document parsing, and performing coarse-grained table format correction by using heuristic rules; A determination module is used to use a pre-trained table category determination model to determine the category of the table after the format correction, and obtain a classification result and category probability; A distillation module, used for performing table knowledge distillation based on the classification results and category probabilities and using a teacher model to obtain table knowledge text; The voting module is used for voting the final text representation of the tabular knowledge most recognized by the teacher model from the tabular knowledge text based on the voting mechanism of model self-examination.

9. An electronic device, characterized in that: It comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the private domain semi-structured knowledge representation method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the private domain semi-structured knowledge representation method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising computer instructions, characterized in that: The computer instructions instruct the computer to execute the private domain semi-structured knowledge representation method described in any one of claims 1-7.