Question and answer method

By extracting table cell information and building prompt statements to crop and delete the initial table, the efficiency and accuracy problems when converting table data into text data are solved, and the efficiency and accuracy of question-and-answer are improved.

CN118797020BActive Publication Date: 2024-12-24HUNDSUN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411279134.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-24
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

The prior art consumes time and misunderstoods when converting table data into text data for question-and-answer, resulting in low efficiency and accuracy of question-and-answer.

Method used

By obtaining the target question, extracting unit information pairs in the table, building prompt statements in preset statement format, and entering them into the Q&A model to generate prompt information, and cropping the initial table to obtain the target table, thereby improving the efficiency and accuracy of Q&A.

Benefits of technology

It realizes improving the efficiency and accuracy of Q&A in the form Q&A scenario, reducing processing time, and ensuring the accuracy of answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797020B_ABST
    Figure CN118797020B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a question-and-answer method, wherein the question-and-answer method includes: obtaining a target question posed for an initial form, extracting unit information pairs in the initial form, and constructing a prompt statement in a corresponding preset sentence format based on the unit information pairs and the target question. The prompt statement is used to guide the question-and-answer model to process information and ensure the output effect of the question-and-answer model. The prompt statement and the initial form are input into the question-and-answer model, the prompt information of the prompt statement is generated using the question-and-answer model, and the initial form is trimmed according to the field information in the prompt information to obtain the target form. The initial form containing more information is trimmed into a target form containing less key information. Subsequently, the target answer corresponding to the target question can be determined based on the target form, thereby improving the efficiency and accuracy of determining the target answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular to a question-answering method. Background Art

[0002] As machine learning models are continuously optimized, their ability to process tabular data for various tasks such as prediction, table understanding, quantitative reasoning, and data generation is also improving. Tabular data is one of the basic data formats that is ubiquitous in machine learning and is widely used in fields that heavily rely on relational databases, such as finance, medicine, business, agriculture, and education. As the amount of tabular data continues to increase, the demand for question-answering based on tabular data is also increasing.

[0003] In the prior art, when using machine learning to answer questions based on tables, it is usually necessary to convert table data into text data, and the machine learning model answers questions based on the text data. However, this processing method takes a lot of time to convert table data into text data, and there is a possibility of misinterpretation of table data, which not only reduces the efficiency of question answering, but also cannot guarantee the accuracy of subsequent questions and answers. Therefore, there is an urgent need for a more effective question answering method to solve the above problems. Summary of the invention

[0004] In view of this, the embodiments of this specification provide a question-answering method. One or more embodiments of this specification also relate to a question-answering device, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a question-answering method is provided, including:

[0006] Get the target questions asked for the initial form;

[0007] Extracting unit information pairs from the initial table, and constructing prompt sentences corresponding to the preset sentence format based on the unit information pairs and the target question;

[0008] Inputting the prompt statement and the initial form into a question-answering model, generating prompt information of the prompt statement using the question-answering model, and cutting the initial form according to field information in the prompt information to obtain a target form;

[0009] A target answer corresponding to the target question is determined based on the target table.

[0010] According to a second aspect of an embodiment of this specification, a question-answering device is provided, including:

[0011] an acquisition module, configured to acquire target questions posed for the initial form;

[0012] A construction module is configured to extract unit information pairs from the initial table, and construct a prompt sentence corresponding to a preset sentence format based on the unit information pairs and the target question;

[0013] A generating module is configured to input the prompt statement and the initial form into a question-answering model, generate prompt information of the prompt statement using the question-answering model, and clip the initial form according to field information in the prompt information to obtain a target form;

[0014] A determination module is configured to determine a target answer corresponding to the target question based on the target table.

[0015] According to a third aspect of an embodiment of this specification, another question-answering method is provided, which is applied to a server, including:

[0016] receiving a target question submitted by a client user for a target business, and determining an initial table in a table set based on the target question;

[0017] Extracting unit information pairs from the initial table, and constructing prompt sentences corresponding to the preset sentence format based on the unit information pairs and the target question;

[0018] Inputting the prompt statement and the initial form into a question-answering model, generating prompt information of the prompt statement using the question-answering model, and cutting the initial form according to field information in the prompt information to obtain a target form;

[0019] A target answer corresponding to the target question is determined based on the target table, and the target answer is fed back to the client user.

[0020] According to a fourth aspect of the embodiments of this specification, another question-answering device is provided, which is applied to a server, and includes:

[0021] A receiving module, configured to receive a target question submitted by a client user for a target business, and determine an initial table in a table set based on the target question;

[0022] An extraction module is configured to extract unit information pairs from the initial table, and construct a prompt sentence corresponding to a preset sentence format based on the unit information pairs and the target question;

[0023] An input module is configured to input the prompt statement and the initial form into a question-answering model, generate prompt information of the prompt statement using the question-answering model, and clip the initial form according to field information in the prompt information to obtain a target form;

[0024] The feedback module is configured to determine a target answer corresponding to the target question based on the target table, and feed back the target answer to the client user.

[0025] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:

[0026] Memory and processor;

[0027] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned question-and-answer method are implemented.

[0028] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned question-and-answer method are implemented.

[0029] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions, which implement the steps of the above-mentioned question-and-answer method when executed by a processor.

[0030] An embodiment of the present specification obtains a target question raised for an initial table, extracts unit information pairs from the initial table, and constructs a prompt statement in a corresponding preset sentence format based on the unit information pairs and the target question. The prompt statement is used to guide the question-answering model to process information and ensure the output effect of the question-answering model. The prompt statement and the initial table are input into the question-answering model, the prompt information of the prompt statement is generated using the question-answering model, and the initial table is trimmed according to the field information in the prompt information to obtain the target table. The initial table containing more information is trimmed into a target table containing less key information. Subsequently, the target answer corresponding to the target question can be determined based on the target table, thereby improving the efficiency and accuracy of determining the target answer. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a schematic diagram of a question-and-answer method provided by an embodiment of this specification;

[0032] Figure 2 is a flow chart of a question-and-answer method provided by an embodiment of this specification;

[0033] Figure 3 is a process flow chart of a question-answering method provided by an embodiment of this specification;

[0034] Figure 4 It is a table schematic diagram of a question-and-answer method provided by an embodiment of this specification;

[0035] Figure 5is a structural schematic diagram of a question-and-answer device provided by an embodiment of this specification;

[0036] Figure 6 is a flow chart of another question-and-answer method provided by an embodiment of this specification;

[0037] Figure 7 is a schematic diagram of the structure of another question-and-answer device provided by an embodiment of this specification;

[0038] Figure 8 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0039] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0040] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0041] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0042] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0043] First, the terms involved in one or more embodiments of this specification are explained.

[0044] Large language models (LLMs): are deep learning models trained on large amounts of data and have general problem-solving capabilities.

[0045] Chain of Thought (CoT): usually refers to the sequential logical steps in people's thinking process when solving problems or making inferences. This concept can be applied to many fields, such as psychology, philosophy, education, and artificial intelligence.

[0046] Figure 1 A schematic diagram of a question-and-answer method provided according to an embodiment of the present specification is shown. In a question-and-answer scenario, a question-and-answer operation can be implemented based on a table, and the answer corresponding to the question can be obtained by retrieving the table based on the question. A target question posed for the initial table is obtained, unit information pairs are extracted from the initial table, and a prompt statement in a corresponding preset sentence format is constructed based on the unit information pairs and the target question. The prompt statement is used to guide the question-and-answer model to process information and ensure the output effect of the question-and-answer model. The prompt statement and the initial table are input into the question-and-answer model, the prompt information of the prompt statement is generated using the question-and-answer model, and the initial table is clipped according to the field information in the prompt information to obtain the target table. The initial table containing more information is clipped into a target table containing less key information. Subsequently, the target answer corresponding to the target question can be determined based on the target table, thereby improving the efficiency and accuracy of determining the target answer.

[0047] In this specification, a question-answering method is provided. This specification also relates to a question-answering device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0048] See also Figure 2 , Figure 2 A flowchart of a question-and-answer method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0049] Step 202: Obtain target questions posed for the initial form.

[0050] Specifically, the initial table contains structured table data, and the initial table can be a table in the fields of commodity sales, knowledge storage, medical data, etc. The target question refers to a question that needs to be answered based on the table data in the initial table. The answer to the target question can be obtained by calculating or summarizing the table data in the initial table, or by directly extracting the table data in the initial table.

[0051] Furthermore, considering that the table to be processed may contain merged cells, which are not conducive to the retrieval of subsequent target answers, the merged cells can be split and the initial table obtained by splitting can be used for subsequent question and answer. The specific implementation is as follows:

[0052] Determine a table to be processed; if the table to be processed contains merged cells, split the table to be processed according to the merged cells to obtain the initial table.

[0053] Specifically, the table to be processed may be an original table that has not been processed. A merged cell refers to a cell corresponding to at least two table rows.

[0054] Based on this, determine the table to be processed. Check whether the table to be processed contains merged cells. If the table to be processed contains merged cells, it means that there are multiple table rows corresponding to one merged cell. Then split the table to be processed according to the merged cells to obtain the initial table. The initial table does not contain merged cells.

[0055] For example, the question-and-answer method can be applied to the book information question-and-answer scenario. You can query or retrieve book information for the book table. The book table is the table to be processed. When the book table contains multiple table rows with the same author, year, publisher, etc. information, the author, year, publisher, etc. information are usually displayed in the book table in the form of merged cells. At this time, you can split the merged cells, split them according to the table rows, and fill the split cells based on the data in the merged cells to obtain the initial table corresponding to the table to be processed.

[0056] To sum up, when the table to be processed contains merged cells, the table to be processed is split according to the merged cells to obtain the initial table, so as to facilitate the subsequent question and answer based on the initial table and improve the question and answer effect.

[0057] Step 204: extracting unit information pairs from the initial table, and constructing prompt sentences corresponding to the preset sentence format based on the unit information pairs and the target question.

[0058] Specifically, after obtaining the target question raised for the initial table as mentioned above, the cell information pairs can be extracted from the initial table, and a prompt statement corresponding to the preset sentence format can be constructed based on the cell information pairs and the target question, wherein the cell information pairs are information pairs composed of the table data contained in the initial table, and the cell information pairs can be a key-value pair structure, and the cell information pairs are composed of the table header in the initial table and the cell data corresponding to the table header. There can be multiple cell information pairs, and the information pairs corresponding to each table header constitute the cell information pairs. The prompt statement is used to guide the question-answering model to extract key information from the initial table based on the target question, and the key information includes table rows and / or table columns that are highly correlated with the target question. The preset sentence format refers to a preset sentence composition format, and the preset sentence format corresponds to multiple sentence components and sentence specifications of sentence components.

[0059] Based on this, after obtaining the target question for the initial table, extract the unit information pairs in the initial table, determine the preset sentence format, and construct a prompt sentence corresponding to the preset sentence format based on the unit information pairs and the target question. The prompt sentence is used to guide the question-answering model to extract key information from the initial table.

[0060] Furthermore, the prompt statement is used to guide the question-answering model to process information. The prompt statement may include multiple parts such as input description information, target question, unit information pair and output description information. The specific implementation is as follows:

[0061] Determine input description information and output description information associated with the preset sentence format; extract field information and table cell information from the initial table, and form the cell information pair by the field information and the table cell information; construct a prompt statement corresponding to the preset sentence format based on the input description information, the target question, the cell information pair and the output description information.

[0062] Specifically, the input description information may be the question description information generated based on the target question, and may be the question and answer requirement information generated for the target question and the initial table. The input description information is used to represent the question intention information and / or the question and answer requirement information of the target question. The output description information may be the field name of the information field. The field information refers to the header information in the initial table, and the table cell information may be the information recorded in the cell in the initial table.

[0063] Based on this, the input description information and output description information of the associated preset statement format are determined. The input description information is used to describe the target question and the question-answering requirements of the target question, and the output description information is used to describe the output field name, and each field name corresponds to a different field category. The field information and the table cell information corresponding to the field information are extracted from the initial table, and the field information and the table cell information form a cell information pair. Based on the input description information, the target question, the cell information pair and the output description information, a prompt statement corresponding to the preset statement format is constructed. The input description information, the target question, the cell information pair and the output description information are arranged in order to form a prompt statement.

[0064] Using the above example, the target question can be "What books did Publishing House A publish in March 2001?" The preset sentence format can include input description information and output description information. The input description information is the overall description of the question-answering process, and the output description information can be an output sample: "Input question: {xxx}, provided header information and example: {xxxxxx}, output <tablecall>{'CoT': {xxxx}, 'task_type': 'cell finding', 'key_table_info': {xxx}, 'key_query_info': {xxx}}". The cell information pair consists of the table header and the cell data in the table: "Author: Zhang San, Year: 2001, Publisher: A Publisher". Among them, task_type indicates the task type; cell finding indicates cell search; key_table_info indicates the table header where the answer is located in the task type. key_query_info is the key information in the question that may correspond to the table. CoT indicates thinking process. The output description information can be a few shot example.

[0065] In summary, a prompt sentence corresponding to the preset sentence format is constructed based on the input description information, target question, unit information pair and output description information, so that the subsequent question-answering model can generate prompt information based on the prompt sentence, providing an information basis for the question-answering process.

[0066] Step 206: Input the prompt statement and the initial form into the question-answering model, use the question-answering model to generate prompt information for the prompt statement, and trim the initial form according to the field information in the prompt information to obtain a target form.

[0067] Specifically, after extracting the unit information pairs from the initial table and constructing the prompt statements of the corresponding preset sentence format based on the unit information pairs and the target question, the prompt statements and the initial table can be input into the question-answering model, and the prompt information of the prompt statement can be generated by the question-answering model, and the initial table can be clipped according to the field information in the prompt information to obtain the target table, wherein the question-answering model can be a large language model, which has the ability to retrieve structured data such as the initial table and obtain the target answer corresponding to the target question, and the question-answering model can complete tasks such as table understanding, table reasoning, and table fact verification based on the initial table and the target question. The prompt information includes table information obtained by retrieving the initial table based on the target question and having a high degree of correlation with the target question. The prompt information can also include question description information generated based on the target question, and the question description information represents the intention information of the target question. The target table is a table obtained by clipping the table columns and / or table rows of the initial table. The target table can be the same as the initial table, that is, the initial table is not clipped, and the target table can also be a table with less table data than the initial table, that is, the initial table is clipped.

[0068] Based on this, after extracting the unit information pairs in the initial table and constructing a prompt statement in the corresponding preset sentence format based on the unit information pairs and the target question, the prompt statement and the initial table are input into the question-answering model, and the prompt information of the prompt statement is generated using the question-answering model. The field information in the prompt information is extracted, and the initial table is cropped according to the field information in the prompt information. The table rows and / or table columns of the initial table are cropped to obtain the target table.

[0069] Furthermore, the question-answering model includes an information generation unit for processing the prompt sentence, which is specifically implemented as follows:

[0070] Determine the information generation unit of the question-answering model; use the information generation unit to generate question description information based on the input description information and the question information; use the information generation unit to extract table prompt information and question prompt information from the initial table based on the question description information and the unit information; construct the prompt information of the prompt sentence based on the question description information, the table prompt information and the question prompt information.

[0071] Specifically, the information generation unit has the functions of data analysis and data extraction. The information generation unit provides a TableCall function for extracting key information in the initial table that is highly relevant to the target question based on the target question. The question description information can be the intention information of the target question; the table prompt information refers to the header information in the initial table that is highly relevant to the answer information of the target question, and is the header where the answer to the question information is located; the question prompt information refers to the header information in the initial table that is highly relevant to the intention of the target question.

[0072] Based on this, determine the information generation unit of the question-answering model. Use the information generation unit to generate question description information that expresses the question intention of the target question based on the input description information and question information. Use the information generation unit to extract the header information of the answer to the target question in the initial table based on the question description information and unit information as table prompt information, and extract the header information in the initial table that is highly relevant to the limiting conditions of the target question as question prompt information. Construct prompt information of the prompt sentence based on the question description information, table prompt information and question prompt information.

[0073] Using the above example, the prompt statement can be: "Input question: {What books did A Publishing House publish in March 2001?}, the provided header information and example: {Author: Zhang San, Year: 2001, Publishing House: A Publishing House}, output <tablecall>{'CoT': {xxxx}, 'task_type': 'cell finding', 'key_table_info': {xxx}, 'key_query_info': {xxx}}". The information generation unit corresponds to the TableCall function of the question-answering model. Input the prompt sentence into the information generation unit to obtain the question description information CoT: The question mainly asks about books published by Publishing House A, so the corresponding table header information 'Book Title' is selected in key_table_info. According to the key information in the question, the information corresponding to the table headers 'Year', 'Month', and 'Publisher' may be '2001', 'March', 'Publisher A', 'task_type': 'cellfinding', 'key_table_info': {'Book Title'}, 'key_query_info': {'2001', 'March', 'Publisher A'}. Construct the prompt information of the prompt sentence based on the question description information, table prompt information, and question prompt information: <tablecall>{'CoT': {The question mainly asks about published books, so the corresponding table header information 'Book Title' is selected in key_table_info. According to the key information in the question, it may correspond to the table headers 'Year', 'Month', 'Publisher'. The corresponding information is '2001', 'March', "Publisher A"}, 'task_type': 'cell finding', 'key_table_info': {'Book Title'}, 'key_query_info': {'2001', 'March', 'Publisher A'}}.

[0074] In summary, the information generation unit is used to generate question description information, table prompt information and question prompt information, and prompt information of the prompt sentence is constructed based on the question description information, table prompt information and question prompt information, so that the question and answer can be continued based on the prompt information.

[0075] Furthermore, considering that the prompt information contains field information that is highly relevant to the answer to the target question, the initial table can be trimmed based on the field information to narrow the table range so that the question and answer can continue based on the small range table. The specific implementation is as follows:

[0076] Extract the field information from the prompt information; determine the table rows and / or table columns associated with the field information in the initial table, and determine the table area composed of the table rows and / or the table columns in the initial table; crop the table area in the initial table to obtain the target table.

[0077] Specifically, the field information corresponds to the header information in the initial table, which is the header information in the initial table that is highly relevant to the target question. The field information can also be regarded as the key information for completing the question and answer in the initial table. The table area is composed of table rows and / or table columns corresponding to the field information, which can be an uninterrupted area in the initial table, or an area composed of areas corresponding to at least one table row and / or table column.

[0078] Based on this, field information that can reflect the header information of the initial table is extracted from the prompt information. Table rows and / or table columns associated with the field information are determined in the initial table, and a table area composed of table rows and / or table columns is determined in the initial table. The table area in the initial table is clipped based on the table area to obtain a target table.

[0079] Using the above example, the four fields of information, 'Publisher A', 'Book Title', '2001' and 'March', can be extracted from the prompt information. Based on the four fields of information, the rows / columns of 'Publisher A', 'Book Title', '2001' and 'March' can be determined. The rows / columns of the four fields of information in the initial table form a table area. The target table is obtained by extracting the table area in the initial table.

[0080] In summary, a table area consisting of table rows and / or table columns is determined in the initial table. The table area in the initial table is clipped based on the table area to obtain a target table. An initial table with a longer length and more information is never clipped into a target table with a shorter length and less information. Searching for a target answer corresponding to a target question based on the target table can improve search efficiency.

[0081] Step 208: Determine a target answer corresponding to the target question based on the target table.

[0082] Specifically, after the prompt statement and the initial form are input into the question-answering model, the prompt information of the prompt statement is generated using the question-answering model, and the initial form is trimmed according to the field information in the prompt information, and the target form is obtained, the target answer corresponding to the target question can be determined based on the target form, wherein the target answer refers to the accurate answer corresponding to the target question.

[0083] Based on this, after inputting the prompt statement and the initial table into the question-answering model, using the question-answering model to generate prompt information for the prompt statement, and trimming the initial table according to the field information in the prompt information, and obtaining the target table, the target answer corresponding to the target question can be obtained by querying the target table based on the target question.

[0084] Furthermore, after the initial table is cut into the target table, the target table contains less information and is shorter than the initial table. Due to the unique table structure of the target table, the target table can be queried by constructing a query statement to obtain the target answer to the target question. The specific implementation is as follows:

[0085] When the number of rows in the target table is less than a row number threshold, the target table is mapped to a target database, and a query statement is constructed based on the target question; and a target answer corresponding to the target question is determined by executing the query statement on the target database.

[0086] Specifically, the row number threshold refers to a predetermined number of rows, and different target answer query methods can be determined according to the size relationship between the number of rows in the target table and the row number threshold. The target database contains the information in the target table, and the information storage structure in the target database is the same as the information storage structure of the target table. The query statement can be an SQL statement expression corresponding to the target question.

[0087] Based on this, when the number of rows in the target table is less than the row number threshold, it means that the length of the target table is short and contains less information. The target table is mapped to the target database, the storage structure of the information in the target table is retained, and a query statement is constructed based on the target question. By executing the query statement on the target database, the target database is queried to obtain the target answer corresponding to the target question. The target answer can be directly extracted from the target database, or it can be obtained by extracting the information in the target database and then calculating it.

[0088] Using the above example, if the number of rows in the target table is less than 2, we can build a database table in the target database based on the target table, and build the SQL query statement corresponding to the target question: SELECT name; FROM table; WHERE year = 2001 AND month = 3 AND publisher = A. By executing this query statement, we can query the target database to obtain the name of the book published by A Publishing House in March 2001. The book name is the target answer.

[0089] In summary, by constructing a target database and query statements and searching for a target answer in the target database, the efficiency of determining the target answer can be improved.

[0090] Furthermore, after determining the target table, the question-answering model can be directly used to conduct secondary question-answering for the target table. The specific implementation is as follows:

[0091] When the number of rows in the target table is greater than or equal to the row number threshold, the question-answering model is used to determine the target answer corresponding to the target question based on the target table.

[0092] Based on this, when the number of rows in the target table is greater than or equal to the row number threshold, it means that the target table is longer and contains more information. The question-answering model can be used for secondary question-answering, and the question-answering model can be used to determine the target answer corresponding to the target question based on the target table.

[0093] Using the above example, if the number of rows in the target table is greater than or equal to 2, the question-answering model can be used directly for secondary question-answering. Input the target table and the target question into the question-answering model for secondary question-answering to obtain the target answer corresponding to the target question-answer.

[0094] In summary, the question-answering model is used for secondary question-answering, and the target answer corresponding to the target question is determined based on the target table by using the question-answering model, so that the target answer corresponding to the target question can be quickly found in the target table.

[0095] Furthermore, after determining the target table, if the initial table is not successfully trimmed, the question-answering model can be used to perform secondary question-answering on the target table. The specific implementation is as follows:

[0096] In the case where the target table is the same as the initial table, the question-answering model is used to determine a target answer corresponding to the target question based on the target table or the initial table.

[0097] Based on this, when the target table is the same as the initial table, it means that the initial table has not been successfully trimmed, and the question-answering model can be directly used to perform secondary question-answering on the target question, and the question-answering model can be used to determine the target answer corresponding to the target question based on the target table or the initial table.

[0098] Using the above example, if the target table is the same as the initial table, the initial table is not successfully trimmed based on the prompt information. The question-answering model can be used directly for secondary question-answering. The target table and the target question are input into the question-answering model for secondary question-answering of the model to obtain the target answer corresponding to the target question-answering. Alternatively, the initial table and the target question are input into the question-answering model for secondary question-answering of the model to obtain the target answer corresponding to the target question-answering.

[0099] To summarize, the question-answering model is used for secondary question-answering. The target answer corresponding to the target question is determined based on the target table or the initial table. The target answer corresponding to the target question can be quickly found in the target table, avoiding the poor user experience caused by the inability to output the target answer.

[0100] Furthermore, the question-answering model can be obtained through supervised training based on a large number of samples. The training of the question-answering model includes:

[0101] Acquire a set of sample tables and a set of sample question-answer pairs; select a sample question-answer pair from the sample question set, and select a sample table associated with the sample question-answer pair from the sample table set; input the sample table and the sample questions contained in the sample question-answer pair into an initial question-answer model to obtain predicted answers; calculate a loss value based on the predicted answers and the sample answers contained in the sample question-answer pairs, and adjust the parameters of the initial question-answer model based on the loss value until the question-answer model that meets the training stop condition is obtained.

[0102] Specifically, the sample table set refers to an information table used for question-answering model training; the sample table has multiple types and supports question-answering of multiple questions. The sample question-answer pair set contains multiple sample question-answer pairs, and the sample question-answer pairs contain sample questions and accurate sample answers corresponding to the sample questions. The sample table refers to a table related to the question-answer type of the sample question-answer pair. The initial question-answer model is an untrained question-answer model. The predicted answer refers to the answer obtained by the initial question-answering model based on the sample questions and the sample table for answer prediction. The sample answer refers to the accurate answer corresponding to the sample question in the sample question-answer pair. The loss value is a numerical value calculated based on the loss function, the predicted answer and the sample answer, which is used to indicate the degree of difference between the predicted answer and the sample answer. Both larger and smaller loss values ​​indicate that the degree of difference between the predicted answer and the sample answer is larger. The training stop condition can be a preset training time or training round, or it can be the accuracy of the model prediction.

[0103] Continuing with the above example, we can build a sample table set and a sample question-answer pair set based on historical question-answer information. Select a question-answer pair from the sample question-answer pairs, and select the sample table corresponding to the question-answer pair. After inputting the questions and sample tables in the question-answer pair into the initial question-answer model, use the initial question-answer model to process them until the predicted answer is queried based on the sample table. Calculate the loss value based on the predicted answer and the answer in the question-answer pair, and adjust the parameters of the initial question-answer model based on the loss value. After adjusting the parameters, select a question-answer pair from the sample question-answer pair set, and select the table corresponding to the question-answer pair from the sample table set to continue model training until a question-answer model that meets the training stop conditions is obtained.

[0104] In summary, the initial question-answering model is supervised trained based on the sample table set and the sample question-answering pair set until a question-answering model that meets the training stop conditions is obtained, so that the question-answering model has better key information extraction ability and question-answering ability.

[0105] An embodiment of the present specification obtains a target question raised for an initial table, extracts unit information pairs from the initial table, and constructs a prompt statement in a corresponding preset sentence format based on the unit information pairs and the target question. The prompt statement is used to guide the question-answering model to process information and ensure the output effect of the question-answering model. The prompt statement and the initial table are input into the question-answering model, the prompt information of the prompt statement is generated using the question-answering model, and the initial table is trimmed according to the field information in the prompt information to obtain the target table. The initial table containing more information is trimmed into a target table containing less key information. Subsequently, the target answer corresponding to the target question can be determined based on the target table, thereby improving the efficiency and accuracy of determining the target answer.

[0106] The following combination Figure 3 , taking the application of the question-and-answer method provided in this specification in the question-and-answer of commodity sales as an example, the question-and-answer method is further explained. Among them, Figure 3 A flowchart of the processing process of a question-and-answer method provided in one embodiment of the present specification is shown, which specifically includes the following steps.

[0107] Step 302: Determine a table to be processed, and if the table to be processed contains merged cells, split the table to be processed according to the merged cells to obtain an initial table.

[0108] In the commodity sales information question and answer scenario, Figure 4 As shown in (a), you can ask questions about the sales details table. The sales details table contains table headers such as store, region, product name, specification model, storage time, transaction time, transaction order number, inventory quantity, price and sales quantity, as well as sales data corresponding to the table headers. If the table to be processed contains merged cells such as "A Convenience Store", "B Convenience Store", "D Region", "E Region" and "F Region", split the merged cells to obtain the following Figure 4 The initial table shown in (b).

[0109] Step 304: Obtain target questions posed for the initial form.

[0110] The target question is raised for the initial table: "What are the specifications and models of C milk tea in convenience store B in area E?"

[0111] Step 306: Determine the input description information and output description information associated with the preset statement format, and extract the field information and table cell information in the initial table, and form a cell information pair consisting of the field information and the table cell information.

[0112] Step 308: Construct a prompt sentence corresponding to a preset sentence format based on the input description information, the target question, the unit information pair and the output description information.

[0113] The default statement format can be: overall description + query question + table header + cell example + few shot example. The input description information can be the overall description generated for the target question: Please output based on the question and table header information we provide. <tablecall>; {'CoT': {xxx}, 'task_type': 'cell finding', 'key_table_info': {xxx}, 'key_query_info': {xxx}}, where task_type indicates the task type; cell finding indicates cell finding; key_table_info indicates the table header where the answer is located in the task type. key_query_info is the key information in the question that may correspond to the table. CoT indicates the thinking process. The output description information can be a few shot example.

[0114] Few shot example 1: Input question: {xxx}, provided header information and example: {xxxxxx}, output <tablecall>{'CoT': {xxxx}, 'task_type': 'cell finding', 'key_table_info': {xxx}, 'key_query_info': {xxx}}.

[0115] Few shot example 2: Input question: {xxx}, provided header information and example: {xxxxxx}, output <tablecall>{'CoT': {xxxx}, 'task_type': 'cell finding', 'key_table_info': {xxx}, 'key_query_info': {xxx}}.

[0116] The cell information pair can be the header information plus the corresponding cell example. The header information and the example can be the following json: {'store': 'A convenience store', 'region': 'A region', 'product name': 'A mineral water', 'specification model': 'BKL5275534', 'warehouse time': '2018.4.21', 'transaction time': '2018 / 4 / 21 18:21', 'transaction order number': '4.52E+21', 'inventory quantity': '28', 'price': '5 yuan', 'sales quantity': '3'}. The prompt sentence composed of input description information, target question, cell information pair and output description information is input into the question-answering model.

[0117] Step 310: Input the prompt statement into the question-answering model, use the question-answering model to generate prompt information of the prompt statement, and extract field information from the prompt information.

[0118] Enable TableCall for the question-and-answer model and use TableCall to simplify the initial table.

[0119] After inputting the above statement into the question-answering model, you can get the prompt information: <tablecall>{'CoT': {The question mainly asks about specifications, so the corresponding header information 'Specification Model' is selected in key_table_info. According to the key information in the question, the information corresponding to the headers 'Product Name', 'Store', and 'Region' may be 'C Milk Tea', 'E Region', and 'B Convenience Store'}, 'task_type': 'cell finding', 'key_table_info': {'Specification Model'}, 'key_query_info': {'C Milk Tea', 'E Region', 'B Convenience Store'}}.

[0120] Extract key information from the prompt information, that is, field information: specification model, C milk tea, E region and B convenience store.

[0121] Step 312: Determine the table rows and table columns associated with the field information in the initial table, and determine the table area composed of the table rows and table columns in the initial table.

[0122] Step 314: Crop the table area in the initial table to obtain the target table.

[0123] In the initial table, determine the rows and columns corresponding to the field information, form a table area with the rows and columns, and cut the table area to obtain the following Figure 4 The target table shown in (c) contains sales information such as store, region, product name, and specification model.

[0124] Step 316: When the number of rows in the target table is less than the row number threshold, the target table is mapped to a target database, and a query statement is constructed based on the target question.

[0125] Step 318: Determine the target answer corresponding to the target question by executing the query statement on the target database.

[0126] The row number threshold can be 1. When the target table obtained by trimming the initial table contains 1 row of data, a database can be built based on the target table, and an SQL statement corresponding to the target question can be built. The SQL statement can be executed to query the database to obtain the target answer corresponding to the target question: SM967962, SM967963, SM967964 and SM967965.

[0127] Step 320: When the number of rows in the target table is greater than or equal to the row number threshold, the question-answering model is used to determine the target answer corresponding to the target question based on the target table.

[0128] When the number of rows in the target table obtained by trimming the initial table is greater than 1, the question-answering model can be used directly for secondary question-answering. The target question and the target table are input into the question-answering model, and the target answer is determined using the question model.

[0129] Step 322: When the target form is the same as the initial form, the question-answering model is used to determine the target answer corresponding to the target question based on the target form or the initial form.

[0130] When the initial table cannot be simplified, the initial table and the target question can be directly input into the question-answering model, and the question-answering model can be used directly for secondary question-answering.

[0131] In summary, an embodiment of this specification proposes the TableCall function of the question-answering model, which transforms the table question-answering based on the question-answering model into a task of extracting key information only through part of the table information. Based on the results of TableCall, the table is trimmed, and the final table question-answering result is obtained by using SQL and the large model for secondary question-answering, thereby improving the accuracy and efficiency of table question-answering.

[0132] Corresponding to the above method embodiment, this specification also provides a question-answering device embodiment, Figure 5 FIG. 1 shows a schematic diagram of the structure of a question-answering device provided by an embodiment of this specification. Figure 5 As shown, the device comprises:

[0133] An acquisition module 502 is configured to acquire a target question posed for the initial form;

[0134] A construction module 504 is configured to extract unit information pairs from the initial table, and construct a prompt sentence corresponding to a preset sentence format based on the unit information pairs and the target question;

[0135] A generating module 506 is configured to input the prompt statement and the initial form into a question-answering model, generate prompt information of the prompt statement using the question-answering model, and clip the initial form according to field information in the prompt information to obtain a target form;

[0136] The determination module 508 is configured to determine a target answer corresponding to the target question based on the target table.

[0137] In an optional embodiment, the construction module 504 is further configured to:

[0138] Determining input description information and output description information associated with the preset sentence format;

[0139] Extracting field information and table cell information from the initial table, and forming the cell information pair by the field information and the table cell information;

[0140] A prompt sentence in a corresponding preset sentence format is constructed based on the input description information, the target question, the unit information pair and the output description information.

[0141] In an optional embodiment, the generating module 506 is further configured to:

[0142] Determining an information generation unit of the question-answering model;

[0143] Generate problem description information based on the input description information and the problem information using the information generation unit;

[0144] Extracting table prompt information and question prompt information from the initial table based on the question description information and the unit information by using the information generating unit;

[0145] The prompt information of the prompt sentence is constructed based on the problem description information, the table prompt information and the problem prompt information.

[0146] In an optional embodiment, the generating module 506 is further configured to:

[0147] Extracting the field information from the prompt information;

[0148] Determine in the initial table the table rows and / or table columns associated with the field information, and determine in the initial table a table area consisting of the table rows and / or the table columns;

[0149] The table area in the initial table is cropped to obtain a target table.

[0150] In an optional embodiment, the determining module 508 is further configured to:

[0151] Mapping the target table to a target database, and constructing a query statement based on the target question;

[0152] The target answer corresponding to the target question is determined by executing the query statement on the target database.

[0153] In an optional embodiment, the determining module 508 is further configured to:

[0154] The question-answering model is used to determine the target answer corresponding to the target question based on the target table.

[0155] In an optional embodiment, the determining module 508 is further configured to:

[0156] The question-answering model is used to determine a target answer corresponding to the target question based on the target table or the initial table.

[0157] In an optional embodiment, the acquisition module 502 is further configured to:

[0158] Identify pending forms;

[0159] In the case that the table to be processed includes merged cells, the table to be processed is split according to the merged cells to obtain the initial table.

[0160] In an optional embodiment, the determination module 508 is further configured to: obtain a sample table set and a sample question-answer pair set;

[0161] Selecting a sample question-answer pair from the sample question set, and selecting a sample form associated with the sample question-answer pair from the sample form set;

[0162] Inputting the sample table and the sample questions included in the sample question-answer pairs into the initial question-answer model to obtain predicted answers;

[0163] A loss value is calculated based on the predicted answer and the sample answer included in the sample question and answer pair, and the initial question and answer model is adjusted based on the loss value until the question and answer model that meets the training stop condition is obtained.

[0164] An embodiment of the present specification obtains a target question raised for an initial table, extracts unit information pairs from the initial table, and constructs a prompt statement in a corresponding preset sentence format based on the unit information pairs and the target question. The prompt statement is used to guide the question-answering model to process information and ensure the output effect of the question-answering model. The prompt statement and the initial table are input into the question-answering model, the prompt information of the prompt statement is generated using the question-answering model, and the initial table is trimmed according to the field information in the prompt information to obtain the target table. The initial table containing more information is trimmed into a target table containing less key information. Subsequently, the target answer corresponding to the target question can be determined based on the target table, thereby improving the efficiency and accuracy of determining the target answer.

[0165] The above is a schematic scheme of a question-and-answer device of this embodiment. It should be noted that the technical scheme of the question-and-answer device and the technical scheme of the question-and-answer method described above are of the same concept, and the details not described in detail in the technical scheme of the question-and-answer device can be found in the description of the technical scheme of the question-and-answer method described above.

[0166] See also Figure 6 , Figure 6 A flowchart of another question-and-answer method provided according to an embodiment of the present specification is shown. The another question-and-answer method is applied to a server and specifically includes the following steps.

[0167] Step 602: receiving a target question submitted by a client user for a target business, and determining an initial table in a table set based on the target question;

[0168] Step 604: extracting unit information pairs from the initial table, and constructing prompt sentences corresponding to the preset sentence format based on the unit information pairs and the target question;

[0169] Step 606: input the prompt statement and the initial form into the question-answering model, generate prompt information of the prompt statement using the question-answering model, and cut the initial form according to the field information in the prompt information to obtain a target form;

[0170] Step 608: Determine a target answer corresponding to the target question based on the target table, and feed back the target answer to the client user.

[0171] In practical applications, the target business may be a task handled by a client user. When the client user has a question-and-answer requirement in the process of handling the target business, the target question may be submitted to the server. The server stores a table set containing multiple tables. After receiving the target question submitted by the client user for the target business, the server may determine the initial table related to the target question in the table set based on the target question. Unit information pairs are extracted from the initial table, and prompt statements corresponding to the preset statement format are constructed based on the unit information pairs and the target question. The prompt statement is used to guide the question-and-answer model to process information and ensure the output effect of the question-and-answer model. The prompt statement and the initial table are input into the question-and-answer model, and the prompt information of the prompt statement is generated by the question-and-answer model. The initial table is clipped according to the field information in the prompt information to obtain the target table. The initial table containing more information is clipped into a target table containing less key information. Subsequently, the target answer corresponding to the target question can be determined based on the target table, and the target answer is fed back to the client user, thereby improving the efficiency and accuracy of determining the target answer.

[0172] Corresponding to the above method embodiment, this specification also provides a question-answering device embodiment, Figure 7 FIG. 2 shows a schematic diagram of the structure of another question-answering device provided by an embodiment of the present specification. Another question-answering device is applied to a server, such as Figure 7 As shown, the device comprises:

[0173] The receiving module 702 is configured to receive a target question submitted by a client user for a target business, and determine an initial table in a table set based on the target question;

[0174] An extraction module 704 is configured to extract unit information pairs from the initial table, and construct a prompt sentence corresponding to a preset sentence format based on the unit information pairs and the target question;

[0175] An input module 706 is configured to input the prompt statement and the initial form into a question-answering model, generate prompt information of the prompt statement using the question-answering model, and clip the initial form according to field information in the prompt information to obtain a target form;

[0176] The feedback module 708 is configured to determine a target answer corresponding to the target question based on the target table, and feed back the target answer to the client user.

[0177] In one embodiment of the present specification, when a client user has a question-and-answer demand in the process of processing a target business, the target question can be submitted to the server. The server stores a table set containing multiple tables. After receiving the target question submitted by the client user for the target business, the server can determine the initial table related to the target question in the table set based on the target question. Extract the unit information pair in the initial table, and construct a prompt statement in a corresponding preset sentence format based on the unit information pair and the target question. The prompt statement is used to guide the question-and-answer model to process information and ensure the output effect of the question-and-answer model. Input the prompt statement and the initial table into the question-and-answer model, generate the prompt information of the prompt statement using the question-and-answer model, and cut the initial table according to the field information in the prompt information to obtain the target table. The initial table containing more information is cut into a target table containing less key information. Subsequently, the target answer corresponding to the target question can be determined based on the target table, and the target answer is fed back to the client user, thereby improving the efficiency and accuracy of determining the target answer.

[0178] The above is a schematic scheme of another question-answering device of this embodiment. It should be noted that the technical scheme of the question-answering device and the technical scheme of the question-answering method described above are of the same concept, and the details not described in detail in the technical scheme of the question-answering device can be found in the description of the technical scheme of the question-answering method described above.

[0179] Figure 8 The block diagram of a computing device 800 according to an embodiment of the present specification is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.

[0180] The computing device 800 also includes an access device 840 that enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0181] In one embodiment of the present specification, the above components of the computing device 800 and Figure 8 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 8 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0182] The computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 800 may also be a mobile or stationary server.

[0183] Among them, the processor 820 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned question-and-answer method.

[0184] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned question-answering method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned question-answering method.

[0185] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned question-and-answer method.

[0186] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned question-and-answer method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned question-and-answer method.

[0187] An embodiment of the present specification also provides a computer program product, including a computer program or instructions, which implement the steps of the above-mentioned question-and-answer method when executed by a processor.

[0188] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned question-and-answer method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above-mentioned question-and-answer method.

[0189] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0190] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0191] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0192] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0193] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well.< / tablecall> < / tablecall> < / tablecall> < / tablecall> < / tablecall> < / tablecall> < / tablecall>

Claims

1. A question-answering method, characterized in that: include: Get the target questions asked for the initial form; Extracting a unit information pair from the initial table, and constructing a prompt sentence in a corresponding preset sentence format based on the unit information pair and the target question, wherein the prompt sentence is constructed based on input description information, the target question, the unit information pair and an output sample, and the unit information pair includes field information and table unit information extracted from the initial table; Input the prompt statement and the initial form into a question-answering model, determine an information generation unit of the question-answering model, and use the information generation unit to generate question description information based on the input description information and the target question; Extracting table prompt information and question prompt information from the initial table based on the question description information and the unit information by using the information generating unit; Constructing the prompt information of the prompt statement based on the problem description information, the table prompt information and the problem prompt information, and cutting the initial table according to the field information in the prompt information to obtain the target table; A target answer corresponding to the target question is determined based on the target table.

2. The question-answering method according to claim 1, characterized in that: The step of clipping the initial form according to the field information in the prompt information to obtain the target form includes: Extracting the field information from the prompt information; Determine in the initial table the table rows and / or table columns associated with the field information, and determine in the initial table a table area consisting of the table rows and / or the table columns; The table area in the initial table is cropped to obtain a target table.

3. The question-answering method according to claim 1, characterized in that: When the number of rows in the target table is less than the row number threshold, determining the target answer corresponding to the target question based on the target table includes: Mapping the target table to a target database, and constructing a query statement based on the target question; The target answer corresponding to the target question is determined by executing the query statement on the target database.

4. The question-answering method according to claim 3, characterized in that: When the number of rows in the target table is greater than or equal to the row number threshold, determining the target answer corresponding to the target question based on the target table includes: The question-answering model is used to determine the target answer corresponding to the target question based on the target table.

5. The question-answering method according to claim 1, characterized in that: In the case that the target table is the same as the initial table, determining the target answer corresponding to the target question based on the target table includes: The question-answering model is used to determine a target answer corresponding to the target question based on the target table or the initial table.

6. The question-answering method according to claim 1, characterized in that: Determination of the initial form includes: Identify pending forms; In the case that the table to be processed includes merged cells, the table to be processed is split according to the merged cells to obtain the initial table.

7. The question-answering method according to any one of claims 1 to 6, characterized in that: The training of the question-answering model includes: Obtain a sample table set and a sample question-answer pair set; Selecting a sample question-answer pair from the sample question-answer pair set, and selecting a sample table associated with the sample question-answer pair from the sample table set; Inputting the sample table and the sample questions included in the sample question-answer pairs into the initial question-answer model to obtain predicted answers; A loss value is calculated based on the predicted answer and the sample answer included in the sample question and answer pair, and the initial question and answer model is adjusted based on the loss value until the question and answer model that meets the training stop condition is obtained.

8. A question-answering method, characterized in that: Applied to the server, including: receiving a target question submitted by a client user for a target business, and determining an initial table in a table set based on the target question; Extracting a unit information pair from the initial table, and constructing a prompt sentence in a corresponding preset sentence format based on the unit information pair and the target question, wherein the prompt sentence is constructed based on input description information, the target question, the unit information pair and an output sample, and the unit information pair includes field information and table unit information extracted from the initial table; Input the prompt statement and the initial form into a question-answering model, determine an information generation unit of the question-answering model, and use the information generation unit to generate question description information based on the input description information and the target question; Extracting table prompt information and question prompt information from the initial table based on the question description information and the unit information by using the information generating unit; Constructing the prompt information of the prompt statement based on the problem description information, the table prompt information and the problem prompt information, and cutting the initial table according to the field information in the prompt information to obtain the target table; A target answer corresponding to the target question is determined based on the target table, and the target answer is fed back to the client user.

9. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the question-answering method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium, characterized in that: It stores computer executable instructions, which, when executed by a processor, can implement the steps of the question-answering method described in any one of claims 1 to 8.

11. A computer program product, characterized in that The method comprises a computer program or instructions, which, when executed by a processor, implements the steps of the question-answering method according to any one of claims 1 to 8.