Question answering method based on structured data and question answering method based on sports table
By filtering and splitting table data in large language models, the efficiency problem of large language models when processing complex table data is solved, and more efficient data processing and answer generation are achieved.
Patent Information
- Application Number
- CN202411001429.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-12-20
AI Technical Summary
When processing complex tabular data, large language models increase exponentially due to the intricate interaction between rows and columns, which hinders their understanding and reasoning capabilities and makes it difficult to effectively deal with and answer complex problems across long chains.
By obtaining pending text information and original structured data, use the Q&A model to filter out the target structured data related to text information and split it into tree structure logical processing information to reduce the amount of data and improve the processing efficiency of the Q&A model. .
It effectively reduces the data processing volume of the Q&A model, improves data processing efficiency, enhances the understanding and reasoning ability of complex structured data, and can generate target answer information more accurately.
Smart Images

Figure CN119166651A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a question-answering method based on structured data and a question-answering method based on sports tables. Background Art
[0002] As a form of semi-structured data, tables support all aspects of daily life and professional fields. Tables include but are not limited to databases, web pages, files, etc., and are used in key applications such as financial analysis, risk management, health monitoring, and business reporting. The emergence of large language models (LLMs) provides new ideas for understanding and reasoning about data in tables.
[0003] The application of large language models to table understanding has shown good results on small-scale tables. However, in actual applications, the form of tables is becoming more and more complex, and the content of the data in the tables is becoming richer and richer. Due to the intricate interactions between the rows and columns of the table, the amount of information that needs to be processed and understood is growing exponentially. This complexity seriously hinders the understanding ability of large language models. Faced with the answer logic of complex questions, locating, extracting and understanding tables has become a huge challenge for large language models. Summary of the invention
[0004] In view of this, the embodiments of this specification provide a question-answering method based on structured data. One or more embodiments of this specification also relate to a question-answering method based on sports tables, a question-answering device based on structured data, 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 based on structured data is provided, comprising:
[0006] Acquire the text information to be processed and the original structured data corresponding to the text information to be processed;
[0007] Processing the text information to be processed and the original structured data based on the question-answering model to obtain target structured data;
[0008] A question-and-answer text is generated according to the text information to be processed and the target structured data, and the question-and-answer text is input into the question-and-answer model to obtain the target answer information output by the question-and-answer model, wherein the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
[0009] According to a second aspect of an embodiment of this specification, a question-answering method based on a sports table is provided, comprising:
[0010] Obtaining the sports problem information to be processed and the original sports information table corresponding to the sports problem information to be processed;
[0011] Processing the sports question information to be processed and the original sports information table based on the question-answering model to obtain a target sports information table;
[0012] A question and answer text is generated according to the sports question information to be processed and the target sports information table, and the question and answer text is input into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer text includes tree structure logic processing information for the sports question information to be processed, and the question and answer model generates the target answer information based on the tree structure logic processing information.
[0013] According to a third aspect of the embodiments of this specification, a question-answering method based on a sports table is provided, which is applied to a cloud-side device, including:
[0014] The receiving end-side device sends the unprocessed sports problem information, and obtains the corresponding original sports information table according to the unprocessed sports problem information;
[0015] Processing the sports question information to be processed and the original sports information table based on the question-answering model to obtain a target sports information table;
[0016] Generate a question-and-answer text according to the sports question information to be processed and the target sports information table, and input the question-and-answer text into the question-and-answer model to obtain the target answer information output by the question-and-answer model;
[0017] The target answer information is sent to the terminal device.
[0018] According to a fourth aspect of an embodiment of this specification, there is provided an information processing method based on a question-answering model, which is applied to a task platform and includes:
[0019] A task generation request sent by a receiving end-side device, wherein the task generation request includes request information;
[0020] Based on the request information, a question-answering model is obtained, wherein the question-answering model determines target structured data according to the text information to be processed and the original structured data, and determines target answer information according to a question-answering text generated from the text information to be processed and the target structured data, wherein the question-answering text includes tree structure logic processing information for the text information to be processed, and the question-answering model generates the target answer information based on the tree structure logic processing information;
[0021] Task information is generated based on the question-answering model, wherein the task information is used by the terminal device to perform a question-answering task based on structured data.
[0022] According to a fifth aspect of the embodiments of this specification, there is provided a task platform, including a request interface and a response unit;
[0023] The request interface is used to receive a task generation request sent by a terminal device, wherein the task generation request includes request information;
[0024] The response unit is used to obtain a question-and-answer model based on the request information, wherein the question-and-answer model determines the target structured data according to the text information to be processed and the original structured data, and determines the target answer information according to the question-and-answer text generated by the text information to be processed and the target structured data, the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
[0025] According to a sixth aspect of an embodiment of this specification, a question-answering device based on structured data is provided, including:
[0026] An acquisition module is configured to acquire the text information to be processed and the original structured data corresponding to the text information to be processed;
[0027] A screening module is configured to process the text information to be processed and the original structured data based on the question-answering model to obtain target structured data;
[0028] The question-and-answer module is configured to generate a question-and-answer text based on the text information to be processed and the target structured data, and input the question-and-answer text into the question-and-answer model to obtain the target answer information output by the question-and-answer model, wherein the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
[0029] According to a seventh aspect of an embodiment of this specification, there is provided a computing device, including:
[0030] Memory and processor;
[0031] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned question-and-answer method based on structured data, the question-and-answer method based on sports tables, and the information processing method based on question-and-answer models are implemented.
[0032] According to the eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the above-mentioned question and answer method based on structured data, the question and answer method based on sports tables, and the information processing method based on question and answer models are implemented.
[0033] According to the ninth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned question-and-answer method based on structured data, the question-and-answer method based on sports tables, and the information processing method based on question-and-answer models.
[0034] An embodiment of the present specification provides a question-and-answer method based on structured data, comprising: obtaining text information to be processed and original structured data corresponding to the text information to be processed; processing the text information to be processed and the original structured data based on a question-and-answer model to obtain target structured data; generating a question-and-answer text according to the text information to be processed and the target structured data, and inputting the question-and-answer text into the question-and-answer model to obtain target answer information output by the question-and-answer model, wherein the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
[0035] Through the method provided in the embodiment of this specification, after obtaining the text information to be processed and the original structured data, the original structured data is first screened according to the question-answer model, and the target structured data related to the text information to be processed is determined in the original structured data according to the text information to be processed, which effectively reduces the data volume of the target structured data. Then, the target structured data and the text information to be processed are input into the question-answer model for question-answer parsing, so that the question-answer model processes the text information to be processed and the target structured data based on the tree structure logic processing information, and obtains the target answer information of the text information to be processed from the target structured data, which effectively reduces the data processing volume of the question-answer model and improves the data processing efficiency of the question-answer model. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a processing schematic diagram of a question-answering method based on structured data provided by an embodiment of this specification;
[0037] Figure 2 is a flowchart of a question-answering method based on structured data provided by an embodiment of this specification;
[0038] Figure 3 is a flow chart of a processing process of a sports table-based question-answering method provided by an embodiment of the present specification;
[0039] Figure 4 It is a processing flow chart of a sports table-based question-answering method applied to a cloud-side device provided by an embodiment of this specification;
[0040] Figure 5 is a flowchart of an information processing method based on a question-answering model provided by an embodiment of this specification;
[0041] Figure 6 is a schematic diagram of a task platform provided by an embodiment of this specification;
[0042] Figure 7 is a schematic diagram of the structure of a question-answering device based on structured data provided by an embodiment of this specification;
[0043] Figure 8 is an architecture diagram of a question-answering system based on structured data provided by an embodiment of this specification;
[0044] Fig. 9 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0045] 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.
[0046] 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.
[0047] 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".
[0048] 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 this manual 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 relevant laws, regulations and standards in the relevant regions, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0049] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training model, etc.
[0050] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.
[0051] First, the terms involved in one or more embodiments of this specification are explained.
[0052] Large Language Model (LLM): In machine learning and artificial intelligence, large language models usually refer to deep learning models with a large number of parameters and complex structures. These models are able to learn and store a large amount of knowledge due to their large size, and have good generalization capabilities and the ability to solve complex problems. Large models can perform tasks in multiple scenarios such as multi-task, multi-domain, and multi-modal, and are widely used in natural language processing, image recognition, speech recognition, and other fields.
[0053] Tabular Understanding: Tabular understanding refers to the process of parsing, understanding, and extracting structured information from tabular data. In the field of AI, tabular understanding may involve identifying the contents of rows, columns, headers, and cells from a table, and understanding the relationship between them and how to apply this relationship to specific tasks, such as data analysis, information retrieval, or table-to-text generation.
[0054] Chain of Thought: Chain of Thought is a conceptual model that simulates human logic and reasoning process. In AI, Chain of Thought can be understood as a series of logically linked thinking steps that are interconnected through causal relationships, analogies, or other associations to form a process of solving problems or generating new ideas. By establishing such a chain of thought, AI systems can achieve more advanced reasoning and decision-making functions.
[0055] As a form of semi-structured data, tables play an important role in many aspects of daily life and professional fields. Tables include open data repositories, web pages, document tables, etc. They are widely used in many scenarios such as financial analysis, risk management, health monitoring, and business reports. The emergence of large language models has opened up new processing methods for understanding and reasoning about tabular data.
[0056] Compared with unstructured text, tables provide a dense structured format through the interaction of rows and columns. Rows usually represent the field information included in the table, and columns represent the business data corresponding to each field information. Tables provide a rich source of information. However, the structural characteristics of rows and columns also pose unique challenges to large language models, because large language models need to perform high-level reasoning on text and numerical data. Given the increasing reliance on tables for data representation and the complexity of interpretation. Research on integrating large language models to improve large-scale tables has become an important research direction.
[0057] Currently, large language models often encounter difficulties when applied to more complex and larger tables in real-world scenarios. The limited contextual capacity of current large language models is a major challenge for table understanding. As the size of the table increases, the amount of information that needs to be processed and understood grows exponentially due to the intricate interactions between rows and columns. This complexity makes it difficult for large language models to capture and reason about all the information needed at once, significantly hindering their understanding capabilities. Faced with complex question answering logic that spans a long chain, locating, extracting, and understanding key information in the table becomes a huge challenge.
[0058] There are two common methods to solve this problem. The first is to use the table's schema information and adopt a program-assisted method, such as generating SQL-based answers based on questions. However, the SQL statements of this method may be long and error-prone, resulting in poor performance. The second is to decompose the table into multiple sub-tables to manage larger tables, but this method is difficult to decompose the table in actual applications and is not practical enough.
[0059] Based on this, in this specification, a question and answer method based on structured data is provided. This specification also involves a question and answer method based on sports tables, a question and answer device based on structured data, 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.
[0060] See also Figure 1 , Figure 1 A processing schematic diagram of a question-answering method based on structured data provided according to an embodiment of the present specification is shown.
[0061] like Figure 1 As shown, the text information to be processed and the original structured data are obtained, wherein the text information to be processed can be understood as the question information in the question-answering scenario, and the original structured data is the structured data based on which the answer to the question information is answered in the question-answering scenario, and the structured data stores the data used to answer the question information. The structured data may include structured or semi-structured data such as tables and databases.
[0062] A massive amount of data information is stored in the original structured data of the question-and-answer scenario. Taking a table as an example, it can be one table or multiple tables. In the method provided in the embodiment of this specification, the form of the original structured data is not limited.
[0063] After obtaining the text information to be processed and the original structured data, since the original structured data has a lot of content, although it contains content used to answer the text information to be processed, it also contains a lot of redundant information, which is not conducive to the question-answering model to process all the data in the original structured data.
[0064] Based on this, in the method provided in the embodiment of this specification, the original structured data and the text information to be processed are first input into the question-answering model for processing, so that the question-answering model determines the target structured data related to the text information to be processed. Specifically, in order to improve the processing efficiency of the question-answering model, the original structured data identifier and the example structured data in the original structured data are input into the question-answering model for processing with the text information to be processed, and the question-answering model determines the target structured data identifier related to the text information to be processed from the original structured data identifier. Then, the original structured data is screened according to the target structured data identifier and the text information to be processed, and the redundant information in the original structured data is filtered out to generate the target structured data for answering the text information to be processed.
[0065] Then, the target structured data and the text information to be processed are input into the question-answering model, so that the question-answering model splits the target structured data into multiple target structured sub-data based on the given tree structure logic processing information and the text information to be processed, and generates the reference answer information corresponding to each structured sub-data by parsing each target structured sub-data. Finally, the final target answer information is generated based on each reference answer information.
[0066] Through the method provided in the embodiment of this specification, after obtaining the text information to be processed and the original structured data, the original structured data is first screened according to the question-answering model, and the target structured data identifier related to the text information to be processed is determined in the original structured data according to the text information to be processed, and then the target structured data is screened out from the original structured data according to the target structured data identifier and the text information to be processed, which effectively reduces the data volume of the target structured data. Then, the target structured data and the text information to be processed are input into the question-answering model for question-answering analysis, and the target answer information of the text information to be processed is obtained from the target structured data, which effectively reduces the data processing volume of the question-answering model and improves the data processing efficiency of the question-answering model.
[0067] See also Figure 2 , Figure 2 A flowchart of a question-answering method based on structured data provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0068] Step 202: Acquire the text information to be processed and the original structured data corresponding to the text information to be processed.
[0069] The method provided in the embodiments of this specification is applied to a terminal, which can be understood as any device with computing capabilities, such as a personal computer, a smart terminal, a smart wearable device, a server, a cloud server, etc.
[0070] The text information to be processed can be understood as the question text asked by the user, and the text information to be processed can be one or more. The user can input the text information to be processed through the user graphical interface of the terminal, and the terminal in the embodiment of this specification obtains the text information to be processed.
[0071] The original structured data corresponding to the text information to be processed can be understood as structured data related to the text information to be processed. The original structured data is structured data that has not been processed. The original structured data includes a structured data identifier, and the structured data identifier includes multiple structured data information. The original structured data also includes data information corresponding to each data field. For example, taking a personnel form as an example, its structured data identifier may include form fields such as "name, department, date of birth, age, gender", etc. Each structured data identifier corresponds to corresponding business data, such as "Zhang San, Department A, 19900505, 34, male".
[0072] In the method provided in the embodiment of this specification, the original structured data may be a table, such as an Excel table. It may also be multiple tables, and there is a relationship between the multiple tables, such as a database table. In the method provided in the embodiment of this specification, the specific form of the original structured data is not limited. It shall be subject to actual application.
[0073] In practical applications, the original structured data may be sent by the user together with the text information to be processed to the question-answering system of the question-answering scenario, or may be pre-stored in the question-answering system. In the method provided in the embodiments of this specification, the method for obtaining the original structured data is not limited.
[0074] In a specific implementation manner provided in this specification, the original structured data is saved in a question-and-answer system as an example for explanation. The question-and-answer system in this implementation manner can solve various types of problems.
[0075] Acquiring text information to be processed and original structured data corresponding to the text information to be processed, including:
[0076] receiving text information to be processed;
[0077] Parsing the text information to be processed to obtain text field information corresponding to the text information to be processed;
[0078] The original structured data corresponding to the text information to be processed is determined according to the text domain information.
[0079] In the method provided in the embodiment of this specification, the question-answering system in the terminal receives the text information to be processed sent by the user. The question-answering system parses the text information to be processed and determines the text field information corresponding to the text information to be processed. The text field information can be understood as the question of what field the text information to be processed belongs to. For example, the text field information corresponding to the text information to be processed can be the economic field, the science and technology field, the sports field, the education field, etc.
[0080] A huge amount of data is stored in the question-answering system, and various data are stored in different structured formats. In order to quickly find the structured data corresponding to the text information to be processed from the huge amount of data, various structured data can be divided in advance according to the domain information. For example, the domain to which the structured data belongs can be determined based on the data information corresponding to each structured data, and each structured data can be labeled with the domain information. After the text domain information corresponding to the text information to be processed is obtained through parsing, the structured data in the question-answering system can be preliminarily screened based on the text domain information, and the structured data related to the text domain information can be selected as the original structured data.
[0081] For example, there are 10 tables in the question-answering system, of which 3 tables are related to sports, 3 tables are related to technology, and 4 tables are related to economy. After receiving the text information to be processed, the question-answering system can parse the text information to be processed and obtain the text field information corresponding to the text information to be processed as "technology". Then, the 3 tables related to technology can be used as the original tables corresponding to the text information to be processed.
[0082] Through the text domain information of the text information to be processed, the structured data in the question-answering system is initially screened, and the structured data related to the text domain information is determined to be the original structured data, which effectively reduces the amount of data processing in the subsequent processing of the question-answering system and improves the data processing efficiency of the question-answering system.
[0083] Step 204: Process the text information to be processed and the original structured data based on the question-answering model to obtain target structured data.
[0084] Among them, the target structured data can be understood as structured data used to answer the text information to be processed. In the method provided in the embodiment of this specification, after the text information to be processed and the original structured data are processed according to the question-answering model, the corresponding target structured data can be obtained, and the target structured data used to answer the text information to be processed can be screened out from the original structured data, which can effectively reduce the amount of data processing and improve the data processing efficiency of the question-answering model.
[0085] Specifically, the text information to be processed and the original structured data are processed based on the question-answering model to obtain target structured data, including:
[0086] Generate structured data screening text according to the text information to be processed and the original structured data, and input the structured data screening text into the question-answering model to obtain target structured data identification information output by the question-answering model;
[0087] Generate target structured data according to the target structured data identification information and the original structured data.
[0088] Among them, the structured data screening text can be understood as a prompt text for input into the question-answering model to filter the original structured data. The question-answering model provided in the embodiment of this specification can be understood as a large language model. The purpose of the prompt text is to convey the user's intention to the large language model in an efficient and accurate manner, so that the question-answering model can generate a corresponding response based on the prompt text. Correct and effective prompt text can greatly enhance the interactive effect of the large language model. The functions of the prompt text mainly include clearly expressing needs, guiding the thinking of the large language model, and providing professional data.
[0089] The structured data screening text provided in an embodiment of the present specification is intended to compress and screen the original structured data based on the text information to be processed. The original structured data is the initial structured data form stored in the question-and-answer system. The amount of business data stored in the original structured data will also be relatively large, and the context capacity that the question-and-answer model can process is limited. If the amount of business data in the original structured data exceeds the processing capacity of the question-and-answer model, the question-and-answer model will be unable to give a valid answer. Based on this, in the method provided in an embodiment of the present specification, a corresponding structured data screening text is generated based on the text information to be processed and the original structured data, which is used to prompt the question-and-answer model to compress the original structured data based on the text information to be processed. The question-and-answer model outputs the target structured data identification information.
[0090] The target structured data identification information can be understood as the structured data identification information related to the text information to be processed. For example, there are 100 fields in the header of the original structured data, and the text information to be processed involves 10 of them. The structured data screening text generated based on the original structured data and the text information to be processed is input into the question-answering model, and the question-answering model outputs the target structured data identification information composed of these 10 fields. The target structured data identification information is a subset of the original structured data identification information of the original structured data.
[0091] In practical applications, the target structured data is large in volume. If all the original structured data is input into the question-answering model, it will lead to the problem of increased difficulty in processing the question-answering model. In order to improve the processing efficiency of the question-answering model, in a specific implementation provided in this specification, a structured data screening text is generated according to the text information to be processed and the original structured data, including:
[0092] Determine the preset data filtering prompt text;
[0093] Generate a screening example text according to the original structured data, wherein the screening example text includes the original structured data identification information and the example structured data corresponding to the original structured data identification information;
[0094] A structured data screening text is generated according to the preset data screening prompt text, the screening example text and the text information to be processed.
[0095] The preset data filtering prompt text can be understood as the default prompt text for structured data filtering. For example, the preset data filtering prompt text can be "Please filter the original structured data identifier according to the following filtering example text". In actual applications, the preset data filtering prompt text can be a pre-set default text. When generating structured data filtering text, the preset data filtering prompt text can be directly obtained.
[0096] It should be noted that the structured data screening text is the text information input into the data model, which includes the preset data screening prompt text, the screening sample text and the text information to be processed. The structured data screening text corresponding to each text information to be processed is different. The preset data screening prompt text is a template text used to generate the structured data screening text. Different text information to be processed can correspond to the same preset data screening prompt text.
[0097] The screening sample text can be understood as a structured data sample text generated based on the original structured data, and the screening sample text includes the original structured data identifier of the original structured data and the sample business data corresponding to each original structured data identifier. The sample business data can be understood as the sample data of the specific business data in each original structured data identifier. The sample business data is a subset of the business data in the original structured data. For example, taking the example that the original structured data has 100 business fields and the original structured data includes 100,000 business data, the screening sample text can be the original structured data identifier consisting of 100 business fields and 10 sample table data among the 100,000 business data.
[0098] Specifically, generating a screening sample text according to the original structured data includes:
[0099] Extracting original structured data identification information from the original structured data;
[0100] Extracting example structured data from the original structured data based on a preset data quantity and the original structured data identification information;
[0101] A screening example text is generated according to the original structured data identification information and the example structured data.
[0102] In practical applications, the original structured data consists of the original structured data identifier and the original business data. The original structured data identifier can be directly extracted from the original structured data. In order to facilitate the question-answering model to understand the actual content of each business field in the original structured data identifier in the original structured data, a preset number of sample structured data can be extracted from the original business data. Then, the original structured data identifier and the sample structured data are spliced to generate the screening sample text.
[0103] For example, the example that the original structured data has 100 business fields and the original structured data includes 100,000 structured data is still used for explanation. The original structured data identifier is extracted from the original structured data. If the preset data quantity is determined to be 5, 5 example structured data are selected from the 100,000 structured data. The method of extracting the example structured data from the original structured data can be random extraction, extraction of the latest five structured data, or extraction of the earliest five structured data, and so on. In the method provided in the embodiment of this specification, the specific implementation method of extracting the example structured data from the original structured data based on the preset data quantity and the original structured data identifier is not limited, and is subject to actual application. Finally, the screening example text is generated by splicing the original structured data identifier composed of 100 business fields and the 5 example structured data.
[0104] After obtaining the sample text for screening, the structured data screening text can be generated according to the preset data screening prompt text, the sample text for screening and the text information to be processed, and the structured data screening text is input into the question-answering model.
[0105] For example, the structured data filter text is:
[0106] “Please filter the original structured data identifier according to the following filter sample text;
[0107] Filter sample text 1;
[0108] Text message to be processed 1"
[0109] Among them, "Please filter the original structured data identifier according to the following filtering sample text" is the preset data filtering prompt text, filtering sample text 1 is the filtering sample text, and text information to be processed 1 is the text information to be processed.
[0110] In the aforementioned implementation, the target structured data can be generated according to the target structured data identification information and the original structured data. If the amount of business data in the structured data is large, although the original structured data can be screened by the target structured data identification information, the huge amount of business data may still affect the processing of the model.
[0111] Based on this, in a specific implementation provided in this specification, generating target structured data according to the target structured data identification information and the original structured data includes:
[0112] The target structured data is generated according to the target structured data identification information, the text information to be processed and the original structured data.
[0113] In practical applications, in addition to compressing the original structured data using the target structured data identification information, the original structured data may be further compressed according to the content of the text information to be processed, thereby obtaining the target structured data.
[0114] In practical applications, after obtaining the target structured data identification information, the original structured data can be filtered according to the target structured data identification information. However, the filtered structured data obtained at this time may still have the problem that the amount of business data exceeds the processing capacity of the question-answering model. At this time, the filtered structured data can be further filtered according to the text information to be processed to obtain the target structured data.
[0115] For example, the original structured data still has 100 business fields, and the original structured data includes 100,000 structured data. After filtering the original structured data according to the target structured data identification information, it is compressed from 100 business fields to 10 business fields. However, these 10 business fields still correspond to 100,000 business data. At this time, further filtering can be performed according to the text information to be processed. For example, there are certain filtering conditions for business data in the text information to be processed. By filtering the business data, the amount of business data can be further reduced. Thus, the target structured data is obtained.
[0116] In a specific implementation provided in this specification, generating target structured data according to the target structured data identification information, the text information to be processed and the original structured data includes:
[0117] Extracting data screening parameters from the text information to be processed;
[0118] Generate reference structured data according to the target structured data identification information and the original structured data;
[0119] The reference structured data is screened according to the data screening parameter to generate target structured data corresponding to the reference structured data.
[0120] The data screening parameters are the restriction parameters in the text information to be processed. For example, the text information to be processed is "Which company has the largest and smallest sales growth percentage in a certain region between 2020 and 2022?" The query time is limited to 2020-2022, and the query range is limited to A company, B company, C company and a certain region. 2020-2022, A company, B company, C company and a certain region can all be understood as data screening parameters.
[0121] Preliminary screening is performed based on the target structured data identification information and the original structured data, and only the business data related to the target structured data identification information in the original structured data is retained to generate reference structured data. The reference structured data is structured data generated after screening and compression based only on the target structured data identification information.
[0122] Then, the reference structured data is filtered according to the data filtering parameters, and the business data that meets the data filtering parameters is retained. The target structured data corresponding to the reference structured data is generated. At this time, the business data in the target structured data is the business data related to the text information to be processed. Through the compression and filtering of the structured data identification information and the data filtering parameters, the volume of the target structured data obtained is much smaller than the volume of the original structured data. This facilitates the subsequent understanding of the target structured data and can improve the processing efficiency of the question-answering model.
[0123] Through the method provided in the embodiments of this specification, by generating a structured data screening text, and inputting the structured data screening text into the question-answering model for processing, the understanding ability of the question-answering model is used to determine the target structured data identification information related to the text information to be processed, thereby reducing the subsequent processing workload of the question-answering model when understanding the structured data, and facilitating improving the subsequent processing efficiency of the question-answering model.
[0124] Step 206: Generate a question and answer text based on the text information to be processed and the target structured data, and input the question and answer text into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer text includes tree structure logic processing information for the text information to be processed, and the question and answer model generates the target answer information based on the tree structure logic processing information.
[0125] The question-answering text can be understood as the prompt text input into the question-answering model to assist the question-answering model in answering questions. The question-answering model can process the text information to be processed and the target structured data according to the content in the question-answering text, and obtain the target answer information corresponding to the text information to be processed from the target structured data. The target answer information can be understood as the answer generated for the text information to be processed based on the original structured data.
[0126] In the application process of the large language model, the prompt text plays a key role. The question and answer text provided in the embodiment of this specification includes prompt information of tree structure logic processing information. The tree structure logic processing information facilitates the large language model to split the target structured data into smaller and easier to understand structured sub-data, so as to obtain the final target answer information according to the processing results of each structured sub-data after analyzing each structured sub-data.
[0127] Tree-structured logic information processing is to organize structured data through a tree structure. This structure imitates the cognitive process of human step-by-step reasoning and problem solving, and provides a clear navigation path for large language models when processing structured data with complex associations and large amounts of data. Each node of tree-structured logic information processing represents a logical step in information data processing. Tree-structured logic information processing can make the analysis and application of complex structured data more efficient and systematic.
[0128] In a specific implementation provided in this specification, generating a question-answer text according to the text information to be processed and the target structured data includes:
[0129] Determine the analysis logic prompt text according to the text information to be processed;
[0130] The parsing logic prompt text, the text information to be processed and the target structured data are concatenated to generate a question and answer text.
[0131] The question and answer text in this embodiment includes the above-mentioned tree structure logic processing information, that is, the analysis logic prompt text for the text information to be processed is determined according to the text information to be processed. The analysis logic prompt text can be understood as the tree structure logic processing information in the process of answering the text information to be processed. It defines the processing logic sequence in the process of answering the text information to be processed.
[0132] Information extracted from structured data is reorganized into a hierarchical tree structure through tree-structured logic processing information. The nodes in the tree-structured logic processing information represent a logical information block or a step in the reasoning chain. Tree-structured logic processing information breaks down complex problems into smaller, easier-to-handle sub-problems. The arrangement of each node imitates the thinking process used in thinking logic to answer the text information to be processed. Tree-structured logic processing information effectively performs step-by-step reasoning through the constructed structured data tree, simulating the step-by-step reasoning process of humans on complex problems. Tree-structured logic processing information generates a tree structure in real time in a large language model, so that each traversal can perform reasonable step-by-step reasoning on the current node information, reflecting the characteristics of iterative reasoning, and ultimately giving the target answer information.
[0133] Specifically, determining the parsing logic prompt text according to the text information to be processed includes:
[0134] Parsing the text information to be processed to obtain tree structure logic processing information corresponding to the text information to be processed;
[0135] According to the logic processing information, a parsing logic prompt text corresponding to the text information to be processed is generated.
[0136] In actual applications, the text information to be processed is different. It is impossible to set a fixed template for the parsing logic prompt text for easy use. Based on this, the text information to be processed can be parsed to obtain the tree structure logic processing information of the text information to be processed. The parsing logic prompt text corresponding to the text to be processed is generated according to the tree structure logic processing information.
[0137] Furthermore, the text information to be processed can be input into a pre-trained information understanding model for processing, and the information understanding model can generate corresponding tree structure logic processing information according to the text information to be processed.
[0138] For example, let's take the text information to be processed as "Which company has the largest and smallest sales growth percentage in a certain region between 2020 and 2022?" as an example for explanation. By parsing the text information to be processed, we can determine that the corresponding tree structure logic processing information is:
[0139] 1. Calculate the maximum and minimum sales growth percentages of Company A in a certain region from 2020 to 2022.
[0140] 2. Calculate the maximum and minimum sales growth percentages of Company B in a certain region from 2020 to 2022.
[0141] 3. Calculate the maximum and minimum sales growth percentages of Company C in a certain region from 2020 to 2022.
[0142] 4. Determine the maximum and minimum sales growth percentages among the maximum and minimum sales growth percentages of Company A, the maximum and minimum sales growth percentages of Company B, and the maximum and minimum sales growth percentages of Company C.
[0143] The corresponding analytical logic prompt text is generated according to the tree structure logic processing information. It should be noted that the analytical logic prompt text may also include a calculation method for calculating the maximum sales growth percentage and a calculation method for calculating the minimum sales growth percentage.
[0144] In another specific implementation provided in this specification, the question and answer text includes tree structure logic processing information corresponding to the text information to be processed;
[0145] Inputting the question-answer text into the question-answer model to obtain target answer information output by the question-answer model includes:
[0146] The question and answer text is input into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer model splits the target structured data into at least one target structured sub-data based on the tree structure logic processing information and the text information to be processed, parses each target structured sub-data to generate reference answer information corresponding to each target structured sub-data, and generates target answer information according to the tree structure logic processing information and each reference answer information.
[0147] In practical applications, the question-answer text includes tree structure logic processing information corresponding to the text information to be processed. When the question-answer text is input into the question-answer model for processing, the question-answer model splits the target structured data into at least one target structured sub-data according to the tree structure logic processing information, and obtains the reference answer information corresponding to each target structured sub-data by parsing each target structured sub-data. Finally, the final target answer information is generated based on each reference answer information.
[0148] We still take the text information to be processed as "Which one has the largest and smallest sales growth percentage in a certain region among Company A, Company B, and Company C from 2020 to 2022?" as an example for explanation. According to the contents of nodes 1-3 in the tree structure logic processing information, the target structured data is split into three target structured sub-data, corresponding to the sales information of Company A in a certain region from 2020 to 2022, the sales information of Company B in a certain region from 2020 to 2022, and the sales information of Company C in a certain region from 2020 to 2022. After parsing and analyzing the three target structured sub-data separately, we obtain the maximum sales growth percentage of Company A in a certain region from 2020 to 2022. max and the maximum value A min ; Obtain the maximum sales growth percentage of company B in a certain region during 2020-2022 max and the maximum value B min ; Obtain the maximum sales growth percentage of company C in a certain region during 2020-2022 max and the maximum value C min Then, according to the tree structure logic, the content of the fourth node in the information is processed, and the max , B max , C max Select the maximum value C max ; From A min , B min , C min Select the minimum value A min , and then determine the target answer information "Between 2020 and 2022, the maximum sales growth percentage of companies A, B and C in a certain region is C max , the minimum value is A min ”.
[0149] Through the method provided in the embodiments of this specification, target structured data is generated based on the text information to be processed and the original structured data, which effectively reduces the volume of the original structured data, so that the large language model can better grasp the key information in the target structured data in the subsequent processing of the structured data, that is, reduce the amount of data processed by the large language model. In the process of processing the question and answer text, the question and answer model can enhance the reasoning ability of the question and answer model for the target structured data according to the tree structure logic processing information in the question and answer text, split the complex structured data into multiple structured sub-data, and determine the final target answer information based on the reference answer information of each structured sub-data.
[0150] Secondly, in the process of generating target structured data, the target structured data identification information can be determined through the text information to be processed and the original structured data, the original structured data can be screened through the target structured data identification information, and then the screened structured data can be screened again according to the text information to be processed to obtain the target structured data. Through two screenings, the original structured data can be better compressed, reducing the amount of data processed by the large language model.
[0151] In addition, the question-and-answer text generated based on the text information to be processed and the target structured data includes tree-structured logic processing information, and constructs the answer logic into a tree-like thinking chain, which helps the large language model gradually understand the complex structured data content. The tree-like thinking chain simulates the step-by-step reasoning process of solving problems and provides a logical and orderly operation method. It enables the large language model to query information in complex structured data, simulate the user's segmented understanding of information and provide answers. Each node in the tree-like thinking chain has its specific purpose, which simplifies the interaction between the large language model and complex structured data, allowing the large language model to more effectively process and understand the business data in the structured data.
[0152] The following combination Figure 3 Taking the application of the question-answering method based on structured data provided in this specification in sports scenarios as an example, the question-answering method based on structured data is further described. Figure 3 A flowchart of the processing process of a sports table-based question-and-answer method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0153] Step 302: Obtain the sports problem information to be processed and the original sports information table corresponding to the sports problem information to be processed.
[0154] Step 304: Process the sports question information to be processed and the original sports information table based on the question-answering model to obtain a target sports information table.
[0155] Step 306: Generate a question and answer text based on the sports question information to be processed and the target sports information table, and input the question and answer text into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer text includes tree structure logic processing information for the sports question information to be processed, and the question and answer model generates the target answer information based on the tree structure logic processing information.
[0156] The question-answering method based on structured data provided in this embodiment is applied to the query scenario of sports table data, for example, a certain sports event, such as football events, basketball events, comprehensive events, etc.
[0157] The sports question information to be processed is question information for sports scenes. For example, the sports question information to be processed may be "who is the oldest person and the youngest person in all the finals of Project A of Event 1".
[0158] Based on the sports problem information to be processed, an original sports information table corresponding to the sports problem information to be processed is obtained. The original sports information table includes various information related to sports, such as event 1, event 2, event 3, etc. Event 1 can be a comprehensive event, event 2 can be a football-related event, event 3 can be a gymnastics-related event, etc.
[0159] If the original sports table information needs to be filtered, the corresponding table filtering text is generated according to the sports question information to be processed and the original sports information table. The table filtering text is used to prompt the question-answering model to filter according to the original sports information table to determine the target header information related to the sports question information to be processed.
[0160] Further compression and screening are performed according to the target header information, the sports problem information to be processed and the original sports information table to obtain the target sports information table. The target sports information table can be understood as a sports information table related to the sports problem information to be processed.
[0161] The analysis logic prompt text is determined according to the sports question information to be processed, the analysis logic prompt text, the text information to be processed and the target sports information table are spliced to generate the question and answer text, and the question and answer text is input into the question and answer model for processing.
[0162] The question-answering model splits the target sports information table according to the analytical logic prompt text and the sports question information to be processed to obtain multiple target sports information sub-tables. Each target sports information sub-table is processed separately to obtain the reference answer information corresponding to each target sports information sub-table, and the final target answer information is generated based on each reference answer information.
[0163] For example, take the sports question information to be processed as "Who is the oldest and youngest player in all the finals of Project A of Event 1" as an example for explanation. According to the analytical logic prompt text and the sports question information to be processed, the target sports information table can be split according to the finals of Project A of Event 1, and the target sports information subtable corresponding to each final of Project A of Event 1 is obtained. In each target sports information subtable, the age of each athlete is calculated according to the date of birth of each athlete participating in the final and the date of the final, and the oldest and youngest athletes in each final are determined. Then the oldest and youngest athletes in each final are compared to further determine the oldest and youngest athletes in all the finals of Project A of Event 1. Thus, the target answer information is determined as "the oldest athlete is Zhang San, and the youngest athlete is Li Si". Furthermore, it is also possible to further determine in the target answer information which final the oldest athlete Zhang San played in and related information about Li Si's age (such as date of birth, date of final, etc.); which final the youngest athlete Li Si played in and related information about Li Si's age (such as date of birth, date of final, etc.).
[0164] Through the method provided in the embodiment of this specification, a table screening text is generated according to the sports question information to be processed and the original sports information table, and the target header information generated by the table screening text is used to screen the original sports information table to generate the target sports information table, which effectively reduces the volume of the original sports information table, so that the large language model can better grasp the key information in the target sports information table in the subsequent processing of the table, that is, reduce the amount of data processed by the large language model. In the process of processing the question and answer text, the question and answer model can enhance the reasoning ability of the question and answer model for the target structured data according to the tree structure logic processing information in the question and answer text, split the complex structured data into multiple structured sub-data, and determine the final target answer information according to the reference answer information of each structured sub-data.
[0165] In the process of generating the target sports information table, the target header information can be determined through the sports problem information to be processed and the original sports information table, the original sports information table can be filtered through the target header information, and then the filtered sports information table can be filtered again according to the sports problem information to be processed to obtain the target sports information table. Through two filterings, the original sports information table can be better compressed, reducing the amount of data processed by the large language model.
[0166] In addition, the question-and-answer text generated based on the sports question information to be processed and the target sports information table includes a parsing logic prompt text, and the answer logic is constructed as a tree-like thinking chain, which helps the large language model to gradually understand the complex table content. The tree-like thinking chain simulates the step-by-step reasoning process of solving problems and provides a logical and orderly operation method. It enables the large language model to query information in complex table information, simulate the user's segmented understanding of information and provide answers. Each node in the tree-like thinking chain has its specific purpose, which simplifies the interaction between the large language model and the complex table, so that the large language model can more effectively process and understand the business data in the table.
[0167] See also Figure 4 , Figure 4 A flowchart of a processing process of a sports table-based question-answering method applied to a cloud-side device provided by an embodiment of this specification is shown, which specifically includes the following steps:
[0168] Step 402: receiving the sports problem information to be processed sent by the terminal side device, and obtaining the corresponding original sports information table according to the sports problem information to be processed.
[0169] Step 404: Process the sports question information to be processed and the original sports information table based on the question-answering model to obtain a target sports information table.
[0170] Step 406: Generate a question and answer text based on the sports question information to be processed and the target sports information table, and input the question and answer text into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer text includes tree structure logic processing information for the sports question information to be processed, and the question and answer model generates the target answer information based on the tree structure logic processing information.
[0171] Step 408: Send the target answer information to the terminal device.
[0172] In practical applications, the question-answering model is a large language model, and its application deployment requires good computing resources. The end-side device may not have the corresponding processing capabilities. Therefore, the question-answering method based on the sports table can be implemented on the cloud-side device, and the cloud-side device can receive the sports questions to be processed sent by the end-side device. The cloud-side device obtains the corresponding original sports table information based on the sports questions to be processed. And further obtain the target answer information corresponding to the sports question information to be processed, and finally return the target answer information to the end-side device.
[0173] It should be noted that the implementation of step 402 to step 406 is the same as the implementation of step 202 to step 206 described above, and will not be described in detail in the embodiments of this specification.
[0174] The method provided in the embodiment of this specification also includes:
[0175] The adjustment information sent by the receiving end side device in response to the target answer information;
[0176] Inputting the adjustment information and the target answer information into the question-answering model to obtain the adjusted answer information output by the question-answering model;
[0177] The adjustment answer information is sent to the terminal side device.
[0178] After receiving the target answer information, the terminal side may further send adjustment information for the target answer information, and the adjustment information is used to adjust the content of the target answer information. For example, the target answer information includes entity 1 and entity 2, and the adjustment information may be "please provide relevant information about entity 1".
[0179] The cloud-side device inputs the adjustment information and the target answer information into the question-answering model for further processing, obtains the adjusted answer information output by the question-answering model, and returns the adjusted answer information to the terminal-side device.
[0180] Through the method provided in the embodiments of this specification, a table screening text is generated according to the sports problem information to be processed and the original sports information table, and the original sports information table is screened using the target header information generated by the table screening text to generate a target sports information table, thereby effectively reducing the size of the original sports information table. This allows the large language model to process the table in the subsequent process, thereby reducing the amount of data processed by the large language model and better grasping the key information in the target sports information table.
[0181] In addition, the question-and-answer text generated based on the sports question information to be processed and the target sports information table includes a parsing logic prompt text, and the answer logic is constructed as a tree-like thinking chain, which helps the large language model to gradually understand the complex table content. The tree-like thinking chain simulates the step-by-step reasoning process of solving problems and provides a logical and orderly operation method. It enables the large language model to query information in complex table information, simulate the user's segmented understanding of information and provide answers. Each node in the tree-like thinking chain has its specific purpose, which simplifies the interaction between the large language model and the complex table, so that the large language model can more effectively process and understand the business data in the table.
[0182] Figure 5 A flow chart of an information processing method based on a question-answering model provided in an embodiment of the present specification is shown. The method is applied to a task platform and includes:
[0183] Step 502: receiving a task generation request sent by a terminal-side device, wherein the task generation request includes request information.
[0184] Step 504: Based on the request information, a question-and-answer model is obtained, wherein the question-and-answer model determines the target structured data based on the text information to be processed and the original structured data, and determines the target answer information based on the question-and-answer text generated from the text information to be processed and the target structured data, the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
[0185] Step 506: Generate task information based on the question-answering model, wherein the task information is used by the terminal device to perform a question-answering task based on structured data.
[0186] The task platform is an online platform that provides services or functions, allowing developers, enterprises or individual users to submit tasks, obtain resources or implement specific functions through API calls, web interfaces or other interactive methods. In the embodiments of this specification, the task platform is a cloud service platform that can provide question-and-answer services based on structured data, allowing external applications (such as content recommendations, social media, digital twin systems, etc.) to access and use its question-and-answer processing capabilities based on structured data to generate target answer information. The task platform ensures efficient and accurate response to requests from end-side devices by managing model training, updating, optimization and load balancing.
[0187] A task generation request is a specific operation request initiated by a terminal device to the task platform, which is intended to trigger the platform to perform a question-and-answer task based on structured data. A task generation request usually contains necessary parameters and request information, such as text information to be processed.
[0188] The task platform can obtain the corresponding question-answering model according to the request information. For the relevant information of the question-answering model, please refer to the relevant description in the above embodiment, which will not be repeated here.
[0189] After the task platform processes the task generation request, it generates task information based on the output of the scene localization model as a response to the end-side device. The task information can guide the end-side device to operate the question-answering model to perform the corresponding question-answering task based on structured data.
[0190] In another specific implementation manner provided in this specification, the request information includes a task scenario identifier of a question-answering task based on structured data, or a task model identifier;
[0191] Based on the request information, a question-answering model is obtained, including:
[0192] Based on the task scenario identifier, determine a target scenario template from a plurality of preset scenario templates, and based on the target scenario template, search for a question-answering model from a model library, wherein the model library stores a plurality of question-answering models;
[0193] or,
[0194] Based on the task model identifier, a question-answering model is searched from the model library.
[0195] The task scenario identifier of a question-answering task based on structured data is a label or code that uniquely identifies or classifies a question-answering task based on structured data. It helps the task platform understand to which specific task category the question-answering task based on structured data belongs.
[0196] The task scenario identifier of the question answering task based on structured data is used as a tag to distinguish and identify different question answering task models based on structured data, each of which may be designed for different data characteristics, processing logic or optimization objectives.
[0197] In practical applications, the target scenario template corresponding to the task scenario identifier can be found from multiple preset scenario templates according to the task scenario identifier, and the corresponding question-answering model can be found from the model library based on the target scenario template. Alternatively, the corresponding question-answering model can be found directly from the model library according to the task model identifier.
[0198] Figure 6 A schematic diagram of a task platform provided in an embodiment of the present specification is shown, the task platform includes a request interface 602 and a response unit 604, wherein:
[0199] The request interface 602 is used to receive a task generation request sent by a terminal device, wherein the task generation request includes request information.
[0200] A response unit 604 is used to obtain a question-and-answer model based on the request information, wherein the question-and-answer model determines the target structured data based on the text information to be processed and the original structured data, and determines the target answer information based on the question-and-answer text generated from the text information to be processed and the target structured data, the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
[0201] Corresponding to the above method embodiment, this specification also provides a question-answering device embodiment based on structured data, Figure 7 FIG. 1 shows a schematic diagram of a structured data-based question-answering device provided by an embodiment of the present specification. Figure 7 As shown, the device comprises:
[0202] The acquisition module 702 is configured to acquire the text information to be processed and the original structured data corresponding to the text information to be processed;
[0203] A screening module 704 is configured to process the text information to be processed and the original structured data based on the question-answering model to obtain target structured data;
[0204] The question and answer module 706 is configured to generate a question and answer text based on the text information to be processed and the target structured data, and input the question and answer text into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer text includes tree structure logic processing information for the text information to be processed, and the question and answer model generates the target answer information based on the tree structure logic processing information.
[0205] Optionally, the acquisition module 702 is further configured to:
[0206] receiving text information to be processed;
[0207] Parsing the text information to be processed to obtain text field information corresponding to the text information to be processed;
[0208] The original structured data corresponding to the text information to be processed is determined according to the text domain information.
[0209] Optionally, the screening module 704 is further configured to:
[0210] Generate structured data screening text according to the text information to be processed and the original structured data, and input the structured data screening text into the question-answering model to obtain target structured data identification information output by the question-answering model;
[0211] Generate target structured data according to the target structured data identification information and the original structured data.
[0212] Optionally, the screening module 704 is further configured to:
[0213] Determine the preset data filtering prompt text;
[0214] Generate a screening example text according to the original structured data, wherein the screening example text includes the original structured data identification information and the example structured data corresponding to the original structured data identification information;
[0215] A structured data screening text is generated according to the preset data screening prompt text, the screening example text and the text information to be processed.
[0216] Optionally, the screening module 704 is further configured to:
[0217] Extracting original structured data identification information from the original structured data;
[0218] Extracting example structured data from the original structured data based on a preset data quantity and the original structured data identification information;
[0219] A screening example text is generated according to the original structured data identification information and the example structured data.
[0220] Optionally, the screening module 704 is further configured to:
[0221] The target structured data is generated according to the target structured data identification information, the text information to be processed and the original structured data.
[0222] Optionally, the screening module 704 is further configured to:
[0223] Extracting data screening parameters from the text information to be processed;
[0224] Generate reference structured data according to the target structured data identification information and the original structured data;
[0225] The reference structured data is screened according to the data screening parameter to generate target structured data corresponding to the reference structured data.
[0226] Optionally, the question-answering module 706 is further configured to:
[0227] Determine the analysis logic prompt text according to the text information to be processed;
[0228] The parsing logic prompt text, the text information to be processed and the target structured data are concatenated to generate a question and answer text.
[0229] Optionally, the question-answering module 706 is further configured to:
[0230] Parsing the text information to be processed to obtain tree structure logic processing information corresponding to the text information to be processed;
[0231] According to the logic processing information, a parsing logic prompt text corresponding to the text information to be processed is generated.
[0232] Optionally, the question-answering module 706 is further configured to:
[0233] Parsing the text information to be processed to obtain at least one logical processing step corresponding to the text information to be processed and an execution order between the logical processing steps;
[0234] The tree structure logic processing information is determined according to each logic processing step information and the execution order.
[0235] Optionally, the question and answer text includes tree structure logic processing information corresponding to the text information to be processed;
[0236] The question-answering module 706 is further configured to:
[0237] The question and answer text is input into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer model splits the target structured data into at least one target structured sub-data based on the tree structure logic processing information and the text information to be processed, parses each target structured sub-data to generate reference answer information corresponding to each target structured sub-data, and generates target answer information according to the tree structure logic processing information and each reference answer information.
[0238] Through the device provided in the embodiment of this specification, the target structured data is generated according to the text information to be processed and the original structured data, which effectively reduces the volume of the original structured data, so that the large language model can better grasp the key information in the target structured data in the subsequent processing of the structured data, that is, reduce the amount of data processed by the large language model. In the process of processing the question and answer text, the question and answer model can enhance the reasoning ability of the question and answer model for the target structured data according to the tree structure logic processing information in the question and answer text, split the complex structured data into multiple structured sub-data, and determine the final target answer information according to the reference answer information of each structured sub-data.
[0239] Secondly, in the process of generating target structured data, the target structured data identification information can be determined through the text information to be processed and the original structured data, the original structured data can be screened through the target structured data identification information, and then the screened structured data can be screened again according to the text information to be processed to obtain the target structured data. Through two screenings, the original structured data can be better compressed, reducing the amount of data processed by the large language model.
[0240] In addition, the question-and-answer text generated based on the text information to be processed and the target structured data includes tree-structured logic processing information, and constructs the answer logic into a tree-like thinking chain, which helps the large language model gradually understand the complex structured data content. The tree-like thinking chain simulates the step-by-step reasoning process of solving problems and provides a logical and orderly operation method. It enables the large language model to query information in complex structured data, simulate the user's segmented understanding of information and provide answers. Each node in the tree-like thinking chain has its specific purpose, which simplifies the interaction between the large language model and complex structured data, allowing the large language model to more effectively process and understand the business data in the structured data.
[0241] The above is a schematic scheme of a question-and-answer device based on structured data of this embodiment. It should be noted that the technical scheme of the question-and-answer device based on structured data and the technical scheme of the question-and-answer method based on structured data belong to the same concept, and the details not described in detail in the technical scheme of the question-and-answer device based on structured data can be found in the description of the technical scheme of the question-and-answer method based on structured data.
[0242] See also Figure 8 , Figure 8 The structure diagram of a question-answering system based on structured data provided by an embodiment of the present specification is shown. The question-answering system based on structured data may include a client 100 and a server 200;
[0243] The client 100 is used to send text information to be processed to the server 200;
[0244] The server 200 is used to obtain the original structured data corresponding to the text information to be processed; process the text information to be processed and the original structured data based on the question-answering model to obtain the target structured data, generate a question-answering text according to the text information to be processed and the target structured data, and input the question-answering text into the question-answering model to obtain the target answer information output by the question-answering model, wherein the question-answering text includes tree structure logic processing information for the text information to be processed, and the question-answering model generates the target answer information based on the tree structure logic processing information; and send the target answer information to the client 100;
[0245] The client 100 is also used to receive the target answer information sent by the server 200.
[0246] The question-and-answer system based on structured data may include multiple clients 100 and a server 200, wherein the client 100 may be referred to as a client-side device and the server 200 may be referred to as a cloud-side device. A communication connection may be established between multiple clients 100 through the server 200. In a question-and-answer scenario based on structured data, the server 200 is used to provide a question-and-answer service based on structured data between multiple clients 100. Multiple clients 100 may serve as a sender or a receiver, respectively, and achieve communication through the server 200.
[0247] The user can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In a question-and-answer scenario based on structured data, the user can publish a data stream to the server 200 through the client 100, and the server 200 generates target answer information based on the data stream and pushes the target answer information to other clients that have established communication.
[0248] The client 100 and the server 200 are connected via a network. The network provides a medium for a communication link between the client 100 and the server 200. The network may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, etc. before being released to the server 200.
[0249] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client 100 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 200, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The client 100 can be deployed in an electronic device, and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0250] The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that provide support for models used on clients, and servers that process data sent by clients. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0251] It is worth noting that the question-answering method based on structured data provided in the embodiments of this specification is generally executed by the server, but in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the question-answering method based on structured data provided in the embodiments of this specification. In other embodiments, the question-answering method based on structured data provided in the embodiments of this specification may also be jointly executed by the client and the server.
[0252] Fig. 9 The structure block diagram of a computing device 900 provided according to an embodiment of the present specification is shown. The components of the computing device 900 include but are not limited to a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.
[0253] The computing device 900 also includes an access device 940 that enables the computing device 900 to communicate via one or more networks 960. 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 940 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is 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).
[0254] In one embodiment of the present specification, the above components of the computing device 900 and Fig. 9 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig. 9 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.
[0255] The computing device 900 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 900 may also be a mobile or stationary server.
[0256] Among them, the processor 920 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-mentioned question and answer method based on structured data, the question and answer method based on sports tables, and the information processing method based on question and answer models.
[0257] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the question-and-answer method based on structured data, the question-and-answer method based on sports tables, and the information processing method based on question-and-answer models, the description is relatively simple, and the relevant parts can be referred to the partial description of the question-and-answer method based on structured data, the question-and-answer method based on sports tables, and the information processing method based on question-and-answer models.
[0258] An embodiment of the present specification also provides a computer-readable storage medium storing a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned question-and-answer method based on structured data, the question-and-answer method based on sports tables, and the information processing method based on question-and-answer models.
[0259] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the question-and-answer method based on structured data, the question-and-answer method based on sports tables, and the information processing method based on question-and-answer models, the description is relatively simple, and the relevant parts can be referred to the partial description of the question-and-answer method based on structured data, the question-and-answer method based on sports tables, and the information processing method based on question-and-answer models.
[0260] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned question-and-answer method based on structured data, the question-and-answer method based on sports tables, and the information processing method based on question-and-answer models.
[0261] 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 question-answering method based on structured data, the question-answering method based on sports tables, and the information processing method based on question-answering models belong to the same concept. The details not described in detail in the technical scheme of the computer program product can be found in the description of the technical scheme of the question-answering method based on structured data, the question-answering method based on sports tables, and the information processing method based on question-answering models.
[0262] 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.
[0263] 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.
[0264] It should be noted that the above is a description of a specific embodiment of the present 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 accompanying 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. 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 the present specification.
[0265] 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.
[0266] 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. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A question-answering method based on structured data, comprising: Acquire the text information to be processed and the original structured data corresponding to the text information to be processed; Processing the text information to be processed and the original structured data based on the question-answering model to obtain target structured data; A question-and-answer text is generated according to the text information to be processed and the target structured data, and the question-and-answer text is input into the question-and-answer model to obtain the target answer information output by the question-and-answer model, wherein the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
2. The method according to claim 1, obtaining the text information to be processed and the original structured data corresponding to the text information to be processed, comprising: receiving text information to be processed; Parsing the text information to be processed to obtain text field information corresponding to the text information to be processed; The original structured data corresponding to the text information to be processed is determined according to the text domain information.
3. The method according to claim 1, processing the text information to be processed and the original structured data based on the question-answering model to obtain target structured data, comprising: Generate structured data screening text according to the text information to be processed and the original structured data, and input the structured data screening text into the question-answering model to obtain target structured data identification information output by the question-answering model; Generate target structured data according to the target structured data identification information and the original structured data.
4. The method according to claim 3, generating a structured data screening text according to the text information to be processed and the original structured data, comprising: Determine the preset data filtering prompt text; Generate a screening example text according to the original structured data, wherein the screening example text includes the original structured data identification information and the example structured data corresponding to the original structured data identification information; A structured data screening text is generated according to the preset data screening prompt text, the screening example text and the text information to be processed.
5. The method according to claim 4, generating screening example text according to the original structured data, comprising: Extracting original structured data identification information from the original structured data; Extracting example structured data from the original structured data based on a preset data quantity and the original structured data identification information; A screening example text is generated according to the original structured data identification information and the example structured data.
6. The method according to claim 3, generating target structured data according to the target structured data identification information and the original structured data, comprising: The target structured data is generated according to the target structured data identification information, the text information to be processed and the original structured data.
7. The method according to claim 6, generating target structured data according to the target structured data identification information, the to-be-processed text information and the original structured data, comprising: Extracting data screening parameters from the text information to be processed; Generate reference structured data according to the target structured data identification information and the original structured data; The reference structured data is screened according to the data screening parameter to generate target structured data corresponding to the reference structured data.
8. The method according to claim 1, generating a question-answer text according to the text information to be processed and the target structured data, comprising: Determine the analysis logic prompt text according to the text information to be processed; The parsing logic prompt text, the text information to be processed and the target structured data are concatenated to generate a question and answer text.
9. The method according to claim 8, wherein determining the parsing logic prompt text according to the text information to be processed comprises: Parsing the text information to be processed to obtain tree structure logic processing information corresponding to the text information to be processed; According to the logic processing information, a parsing logic prompt text corresponding to the text information to be processed is generated.
10. The method according to claim 9, parsing the text information to be processed to obtain the tree structure logic processing information corresponding to the text information to be processed, comprising: Parsing the text information to be processed to obtain at least one logical processing step corresponding to the text information to be processed and an execution order between the logical processing steps; The tree structure logic processing information is determined according to each logic processing step information and the execution order.
11. The method according to claim 1, wherein the question-answer text includes tree structure logic processing information corresponding to the text information to be processed; Inputting the question-answer text into the question-answer model to obtain target answer information output by the question-answer model includes: The question and answer text is input into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer model splits the target structured data into at least one target structured sub-data based on the tree structure logic processing information and the text information to be processed, parses each target structured sub-data to generate reference answer information corresponding to each target structured sub-data, and generates target answer information according to the tree structure logic processing information and each reference answer information.
12. A question-answering method based on a sports table, comprising: Obtaining the sports problem information to be processed and the original sports information table corresponding to the sports problem information to be processed; Processing the sports question information to be processed and the original sports information table based on the question-answering model to obtain a target sports information table; A question and answer text is generated according to the sports question information to be processed and the target sports information table, and the question and answer text is input into the question and answer model to obtain the target answer information output by the question and answer model, wherein the question and answer text includes tree structure logic processing information for the sports question information to be processed, and the question and answer model generates the target answer information based on the tree structure logic processing information.
13. A question-answering method based on a sports table, applied to a cloud-side device, comprising: The receiving end-side device sends the unprocessed sports problem information, and obtains the corresponding original sports information table according to the unprocessed sports problem information; Processing the sports question information to be processed and the original sports information table based on the question-answering model to obtain a target sports information table; Generate a question-and-answer text according to the sports question information to be processed and the target sports information table, and input the question-and-answer text into the question-and-answer model to obtain the target answer information output by the question-and-answer model, wherein the question-and-answer text includes tree structure logic processing information for the sports question information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information; The target answer information is sent to the terminal device.
14. The method of claim 13, further comprising: The adjustment information sent by the receiving end side device in response to the target answer information; Inputting the adjustment information and the target answer information into the question-answering model to obtain the adjusted answer information output by the question-answering model; The adjustment answer information is sent to the terminal side device.
15. An information processing method based on a question-answering model, applied to a task platform, comprising: A task generation request sent by a receiving end-side device, wherein the task generation request includes request information; Based on the request information, a question-answering model is obtained, wherein the question-answering model determines target structured data according to the text information to be processed and the original structured data, and determines target answer information according to a question-answering text generated from the text information to be processed and the target structured data, wherein the question-answering text includes tree structure logic processing information for the text information to be processed, and the question-answering model generates the target answer information based on the tree structure logic processing information; Task information is generated based on the question-answering model, wherein the task information is used by the terminal device to perform a question-answering task based on structured data.
16. The method of claim 15, wherein the request information includes a task scenario identifier of a question-answering task based on structured data, or a task model identifier; Based on the request information, a question-answering model is obtained, including: Based on the task scenario identifier, determine a target scenario template from a plurality of preset scenario templates, and based on the target scenario template, search for a question-answering model from a model library, wherein the model library stores a plurality of question-answering models; or, Based on the task model identifier, a question-answering model is searched from the model library.
17. A task platform, comprising a request interface and a response unit; The request interface is used to receive a task generation request sent by a terminal device, wherein the task generation request includes request information; The response unit is used to obtain a question-and-answer model based on the request information, wherein the question-and-answer model determines the target structured data according to the text information to be processed and the original structured data, and determines the target answer information according to the question-and-answer text generated by the text information to be processed and the target structured data, the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
18. A question-answering device based on structured data, comprising: An acquisition module is configured to acquire the text information to be processed and the original structured data corresponding to the text information to be processed; A screening module is configured to process the text information to be processed and the original structured data based on the question-answering model to obtain target structured data; The question-and-answer module is configured to generate a question-and-answer text based on the text information to be processed and the target structured data, and input the question-and-answer text into the question-and-answer model to obtain the target answer information output by the question-and-answer model, wherein the question-and-answer text includes tree structure logic processing information for the text information to be processed, and the question-and-answer model generates the target answer information based on the tree structure logic processing information.
19. A computing device comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 16 are implemented.
20. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 16.
21. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Table question and answer processing method, device and equipment
CN117332054A
Table question and answer optimization method and device, electronic equipment and readable storage medium
CN117874161A
Large model table-oriented question and answer method
CN117972070A
Cited By
Inference question and answer method and device based on logic mode prompt
CN120317357A
Service providing method and device and service request processing method
CN120633609A
Structured data-based question answering method and sports table-based question answering method
WO2026021318A1
