Question reasoning method and device based on semantic understanding

CN116341564BActive Publication Date: 2026-10-27CHINA INT CAPITAL CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310321052.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2026-10-27
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

然而,在相关技术中,无论是抽取式还是生成式机器阅读理解模型,都是基于问题及相关文本或条件直接预测问题的答案,而无法解释如何基于问题和条件得出答案

Benefits of technology

[0023]在根据本申请一些实施例的基于语义理解的问题推理方法和装置中,通过利用文本语义理解模型的编码器和用于向量序列到文本的解码器构建问题推理模型,并通过问题推理模型对待处理文本(包含待处理问题和相关条件)进行语义编码、循环解码等操作来实现原始文本(即待处理文本,包含问题和条件)到解码文本序列的转换,进而基于解码文本序列得到待处理问题对应的目标文本(即推理过程)。这样不但可以得到从问题和条件到结果的逻辑推理过程,而且可以基于推理过程直接得到问题答案。与相关技术的问答系统或模型只输出推理结果相比,本申请创新性地提出了通过基于机器阅读理解的语义编码过程和基于不同解码时刻的解码过程来预测问题的推理过程和推理逻辑(例如针对数据分析等数值相关问题的数值运算逻辑式),进而水到渠成地得到推理结果,显著提升了问题答案的可解释性和推理准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116341564B_ABST
    Figure CN116341564B_ABST
Patent Text Reader

Abstract

A question reasoning method and device based on semantic understanding are disclosed. The question reasoning method comprises: constructing a question reasoning model based on a deep neural network; acquiring a to-be-processed text, the to-be-processed text comprising a first text indicating a to-be-processed question and a second text related to the to-be-processed question; inputting the to-be-processed text into an encoder of the question reasoning model to encode and output a semantic vector sequence corresponding to the to-be-processed text; inputting the semantic vector sequence into a decoder of the question reasoning model to decode and output a decoding text sequence in chronological order; and determining a target text indicating a reasoning process of the to-be-processed question according to the decoding text sequence. The question reasoning method based on semantic understanding according to some embodiments of the present application can predict the reasoning process and reasoning logic of a question, thereby improving the explainability and accuracy of a question answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing, and in particular to semantic understanding-based problem reasoning methods and apparatuses, computing devices, computer-readable storage media, and computer program products. Background Technology

[0002] Natural Language Processing (NLP) is an important area within computer science and artificial intelligence. Machine reading comprehension is a crucial task within NLP, involving using machine models to understand the text content given a question and related information, ultimately arriving at the answer to the question. Machine reading comprehension can be categorized into extractive and generative approaches based on the method of answer retrieval. Extractive approaches directly extract segments from the given text as the answer; generative approaches, on the other hand, utilize generative models to directly generate the answer.

[0003] In many fields, such as financial research data analysis, addressing problems (especially those involving logical or numerical analysis) may require more than just machine reading comprehension to arrive at an answer. It necessitates understanding the logical or numerical reasoning process behind the answer (the process connecting the question, conditions, and answer). However, current machine reading comprehension models, whether extractive or generative, directly predict the answer based on the question and related text or conditions, failing to explain how the answer is derived from those conditions. In other words, these models and algorithms only provide the result of a given question, lacking interpretability and failing to explain the reasoning process from the question and conditions to the result. Summary of the Invention

[0004] In view of this, this application provides a semantic understanding-based problem reasoning method and apparatus, computing device, computer-readable storage medium and computer program product, which are expected to alleviate or overcome some or all of the above-mentioned defects and other possible defects.

[0005] According to a first aspect of this application, a semantic understanding-based problem reasoning method is provided, comprising: constructing a problem reasoning model based on a deep neural network, the problem reasoning model including an encoder for semantic encoding and a decoder for vector decoding; obtaining text to be processed, the text to be processed including first text indicating a problem to be processed and second text related to the problem to be processed; inputting the text to be processed into the encoder of the problem reasoning model to encode and output a semantic vector sequence corresponding to the text to be processed; inputting the semantic vector sequence into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order, each decoded text in the decoded text sequence belonging to a preset set of texts related to the reasoning process, the preset set of texts related to the reasoning process being related to the second text; and determining a target text indicating the reasoning process of the problem to be processed based on the decoded text sequence.

[0006] In the problem reasoning method according to some embodiments of this application, each text in the preset reasoning process related text set indicates various preset reasoning tree parent-child relationship construction processes, wherein each preset reasoning tree parent-child relationship construction process includes a generation process from non-leaf node text as parent node to leaf node text sequence or non-leaf node text sequence as child node; and wherein, the step of determining the target text indicating the reasoning process of the problem to be processed according to the decoded text sequence includes: sequentially executing the preset reasoning tree parent-child relationship construction process indicated by each decoded text in the decoding time order corresponding to each decoded text in the decoded text sequence to construct the reasoning tree corresponding to the problem to be processed; and concatenating all leaf node texts of the reasoning tree together in depth-first traversal order to form the target text indicating the reasoning process of the problem to be processed.

[0007] In the problem reasoning method according to some embodiments of this application, the parent-child relationship construction process of the preset reasoning tree indicated by each decoded text in the decoded text sequence is executed sequentially according to the decoding time order corresponding to each decoded text in the decoded text sequence, so as to construct the reasoning tree corresponding to the problem to be processed. This includes: determining the non-leaf node text that is the parent node in the parent-child relationship construction process of the preset reasoning tree indicated by the decoded text at the initial decoding time as the root node of the reasoning tree; and, according to the decoding time order corresponding to each decoded text in the decoded text sequence, performing the following steps sequentially for each decoded text: selecting the current non-leaf node that has not yet determined its child node from the nodes of the determined non-leaf node text in the reasoning tree according to the depth-first traversal order, determining each node text in the node text sequence that is the child node in the parent-child relationship construction process of the current decoded text as the child node of the current non-leaf node in the order from left to right; and, in response to the fact that all nodes of the determined non-leaf node text in the reasoning tree have determined their child nodes, ending the reasoning tree construction process.

[0008] In a problem reasoning method according to some embodiments of this application, the problem to be processed includes a numerical reasoning problem, and the target text includes a numerical operation logic expression corresponding to the numerical reasoning problem, wherein the numerical operation includes at least one of addition, subtraction, multiplication, division, exponentiation, and root extraction for the real number field.

[0009] In a problem reasoning method according to some embodiments of this application, the problem reasoning model is trained through the following steps: acquiring a text dataset, wherein each text data in the text dataset includes a problem text and condition text related to the problem; acquiring a reference reasoning process text corresponding to each text data in the text dataset; for each text data, constructing a reference reasoning tree corresponding to the text data according to preset reasoning tree syntax rules and the corresponding reference reasoning process text; for each text data, transforming the reference reasoning tree corresponding to the text data into a reference text sequence indicating the parent-child relationship between nodes through depth-first traversal, as a sample label corresponding to the text data; inputting each text data in the text dataset into the problem reasoning model, and calculating the reasoning loss of the problem reasoning model based on the output of the problem reasoning model and the sample label corresponding to each text data; iteratively updating the parameters of the problem reasoning model based on the reasoning loss until the reasoning loss meets preset conditions.

[0010] In a problem reasoning method according to some embodiments of this application, the text to be processed is input into the encoder of the problem reasoning model to encode and output a semantic vector sequence corresponding to the text to be processed, including: performing word segmentation on the text to be processed to obtain a word sequence corresponding to the text to be processed; performing semantic understanding on each word in the word sequence to obtain a semantic vector sequence corresponding to the text to be processed, wherein each semantic vector in the semantic vector sequence corresponds one-to-one with each word in the word sequence.

[0011] In a problem reasoning method according to some embodiments of this application, the decoder includes a first decoder with a recurrent neural network structure and a second decoder with a classifier structure. The method involves inputting the semantic vector sequence into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order. This includes: transforming the semantic vector sequence into a semantic feature vector sequence corresponding to the text to be processed, such that each semantic feature vector in the semantic feature vector sequence corresponds one-to-one with each decoding moment of the decoder; inputting the semantic feature vector sequence into the first decoder to generate a decoded vector sequence corresponding to the text to be processed in a cyclic decoding manner; and inputting each decoded vector in the decoded vector sequence into the second decoder to generate a decoded text sequence corresponding to the text to be processed in a classification prediction manner.

[0012] In the problem reasoning method according to some embodiments of this application, transforming the semantic vector sequence into a semantic feature vector sequence corresponding to the text to be processed, such that each semantic feature vector in the semantic feature vector sequence corresponds one-to-one with each decoding moment of the decoder, includes: for each decoding moment of the decoder, performing the following steps in chronological order: in response to the current decoding moment being the initial decoding moment, randomly generating an attention weight sequence corresponding to the current decoding moment, and in response to the current decoding moment not being the initial decoding moment, calculating the attention weight sequence corresponding to the current decoding moment based on the semantic vector sequence and the decoding vector of the previous decoding moment, wherein each attention weight in the attention weight sequence corresponding to the current moment corresponds one-to-one with each semantic vector in the semantic vector sequence; performing a weighted summation on the semantic vector sequence based on the attention weight sequence corresponding to the current moment and its correspondence with the semantic vector sequence to obtain the semantic feature vector corresponding to the current decoding moment; and combining the semantic feature vectors corresponding to each decoding moment together in the order of the decoder's decoding moments to form a semantic feature vector sequence.

[0013] In a problem reasoning method according to some embodiments of this application, the semantic feature vector sequence is input into a first decoder to generate a decoded vector sequence corresponding to the text to be processed in a cyclic decoding manner, including: calculating the decoded vector corresponding to the initial decoding time based on the semantic feature vector corresponding to the initial decoding time; calculating the decoded vector of the current decoding time based on the semantic feature vector corresponding to the current decoding time and the decoded vector of the previous decoding time for each decoding time after the initial decoding time of the decoder; and combining the decoded vectors of each decoding time in the order of the decoding times of the decoder to obtain the decoded vector sequence corresponding to the text to be processed.

[0014] In a problem reasoning method according to some embodiments of this application, each decoded vector in the decoded vector sequence is input to a second decoder to generate a decoded text sequence corresponding to the text to be processed in a classification prediction manner. This includes: using the second decoder to predict the category to which each decoded vector in the decoded vector sequence belongs, the category being from a preset category set, the preset category set corresponding one-to-one with a preset set of reasoning process-related texts; for each decoded vector in the decoded vector sequence, determining the reasoning process-related text corresponding to the category to which the decoded vector belongs, based on the correspondence between the preset category set and the preset set of reasoning process-related texts, as the decoded text corresponding to the decoded vector; and combining the decoded texts corresponding to each decoded vector in the order of the decoding times corresponding to each decoded vector in the decoded vector sequence to form a decoded text sequence.

[0015] In a problem reasoning method according to some embodiments of this application, determining a target text indicating the reasoning process of the problem to be processed based on the decoded text sequence includes: sequentially concatenating each decoded text in the decoded text sequence to form a target text indicating the reasoning process of the problem to be processed.

[0016] In a problem reasoning method according to some embodiments of this application, the decoder includes a first decoder with a recurrent neural network structure and a second decoder with a classifier structure. The step of inputting the semantic vector sequence into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order includes: for each decoding moment of the decoder, sequentially performing the following steps according to the order of the decoding moments: in response to the current decoding moment being the initial decoding moment, randomly generating an attention weight sequence corresponding to the current decoding moment; and in response to the current decoding moment not being the initial decoding moment, calculating the attention weight sequence corresponding to the current decoding moment based on the semantic vector sequence and the decoding vector of the previous decoding moment, wherein each attention weight in the attention weight sequence corresponding to the current moment corresponds one-to-one with each vector in the semantic vector sequence; and using the attention weight sequence corresponding to the current decoding moment and... The semantic vector sequences are weighted and summed according to their correspondence to obtain the semantic feature vector corresponding to the current decoding moment. Using a first decoder, the decoding vector for the current decoding moment is calculated based on the decoded text from the previous decoding moment, the decoded vector from the previous decoding moment, and the semantic feature vector corresponding to the current decoding moment. A second decoder predicts the category to which the decoded vector belongs at the current decoding moment. This category comes from a preset category set, which corresponds one-to-one with a preset set of reasoning process-related texts. Based on the correspondence between the preset category set and the preset set of reasoning process-related texts, the reasoning process-related text corresponding to the category to which the decoded vector belongs at the current decoding moment is determined, and this text is used as the decoded text for the current decoding moment. The decoded texts corresponding to each decoding moment are combined in the order of the decoder's decoding moments to form a decoded text sequence.

[0017] In the problem reasoning method according to some embodiments of this application, a first decoder is used to calculate the decoding vector at the current decoding time based on the decoded text at the previous decoding time, the decoding vector at the previous decoding time, and the semantic feature vector corresponding to the current decoding time. This includes: vectorizing the decoded text at the previous decoding time to obtain the decoded text word vector corresponding to the previous decoding time; concatenating the decoded text word vector corresponding to the previous decoding time and the decoded vector at the previous decoding time into a first input vector, and using the semantic feature vector corresponding to the current time as a second input vector; and inputting the first input vector and the second input vector into the first decoder to calculate the decoding vector at the current decoding time.

[0018] In a problem reasoning method according to some embodiments of this application, obtaining the text to be processed includes: obtaining a first text indicating the problem to be processed and original table data corresponding to the problem to be processed; converting the original table data into text data; retrieving a second text related to the problem to be processed from the text data; and concatenating the first text and the second text to obtain the text to be processed.

[0019] According to a second aspect of this application, a semantic understanding-based problem reasoning apparatus is provided, comprising: a construction module configured to construct a problem reasoning model based on a deep neural network, the problem reasoning model including an encoder for semantic encoding and a decoder for vector decoding; an acquisition module configured to acquire text to be processed, the text to be processed including first text indicating a problem to be processed and second text related to the problem to be processed; an encoding module configured to input the text to be processed into the encoder of the problem reasoning model to encode and output a semantic vector sequence corresponding to the text to be processed; a decoding module configured to input the semantic vector sequence into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order, each decoded text in the decoded text sequence belonging to a preset set of reasoning process-related texts, the preset set of reasoning process-related texts being related to the second text; and a determination module configured to determine a target text indicating the reasoning process of the problem to be processed based on the decoded text sequence.

[0020] According to a third aspect of this application, a computing device is provided, including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform steps of a problem reasoning method according to some embodiments of this application.

[0021] According to a fourth aspect of this application, a computer-readable storage medium is provided that stores computer-readable instructions thereon, which, when executed, implement a problem reasoning method according to some embodiments of this application.

[0022] According to a fifth aspect of this application, a computer program product is provided, including computer instructions that, when executed by a processor, implement a problem reasoning method according to some embodiments of this application.

[0023] In the semantic understanding-based question reasoning method and apparatus according to some embodiments of this application, a question reasoning model is constructed by utilizing an encoder of a text semantic understanding model and a decoder for vector sequence to text. The question reasoning model performs semantic encoding and iterative decoding on the text to be processed (containing the question and related conditions) to achieve the conversion of the original text (i.e., the text to be processed, containing the question and conditions) into a decoded text sequence. Then, the target text (i.e., the reasoning process) corresponding to the question to be processed is obtained based on the decoded text sequence. This not only yields the logical reasoning process from the question and conditions to the result, but also allows for the direct deriving of the question answer based on the reasoning process. Compared to related question-answering systems or models that only output reasoning results, this application innovatively proposes predicting the reasoning process and reasoning logic (e.g., numerical operation logic for numerical problems such as data analysis) of the question through a semantic encoding process based on machine reading comprehension and a decoding process based on different decoding times, thereby naturally obtaining the reasoning result and significantly improving the interpretability of the question answer and the accuracy of the reasoning.

[0024] These and other advantages of this application will become clear from the embodiments described below, and will be illustrated with reference to the embodiments described below. Attached Figure Description

[0025] Embodiments of this application will now be described in more detail with reference to the accompanying drawings, wherein:

[0026] Figure 1 Exemplary application scenarios of a semantic understanding-based problem reasoning method according to some embodiments of this application are shown;

[0027] Figure 2 The diagram illustrates the principle block diagram of a semantic understanding-based problem reasoning method according to some embodiments of this application.

[0028] Figure 3 A flowchart illustrating a semantic understanding-based problem reasoning method according to some embodiments of this application is shown;

[0029] Figure 4 The diagram illustrates the principle of text encoding and vector decoding in a semantic understanding-based problem reasoning method according to some embodiments of this application;

[0030] Figure 5 This document illustrates an example flowchart of the text determination steps in a semantic understanding-based problem reasoning method according to some embodiments of this application.

[0031] Figure 6 This application illustrates exemplary structures of reasoning trees and their construction processes according to some embodiments;

[0032] Figure 7A flowchart illustrating the training process of a problem reasoning model according to some embodiments of this application is shown;

[0033] Figure 8 This document shows an example flowchart of a vector decoding step in a semantic understanding-based problem reasoning method according to some embodiments of this application;

[0034] Figure 9 A decoding principle diagram of the vector decoding step in a semantic understanding-based problem reasoning method according to some embodiments of this application is shown;

[0035] Figure 10 This document shows an example flowchart of a vector decoding step in a semantic understanding-based problem reasoning method according to some embodiments of this application;

[0036] Figure 11 An exemplary structural block diagram of a semantic understanding-based problem reasoning apparatus according to some embodiments of this application is shown;

[0037] Figure 12 An example block diagram of a computing device according to some embodiments of this application is illustrated schematically. Detailed Implementation

[0038] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.

[0039] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0040] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0041] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0042] It should be understood that while the terms first, second, third, etc., may be used herein to describe various components, these components should not be limited by these terms. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this application. As used herein, the terms "and / or" and similar terms include all combinations of any, multiple, and all of the associated listed items.

[0043] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing this application, and therefore cannot be used to limit the scope of protection of this application.

[0044] Before detailing the embodiments of this application, some related concepts will be explained for clarity.

[0045] 1. Inference Tree: Also known as a syntax parse tree, similar to the syntax parse tree in compiler theory (which is a tree-like description of the program code text after word segmentation based on preset syntax rules, used to intuitively parse and identify various phrases in the program code), it refers to a tree structure used to parse (the decoded output of the decoder) a text sequence according to preset inference tree syntax rules. In some embodiments of this application, the purpose of introducing an inference tree is to more intuitively and accurately parse the reasoning process of the problem to be processed from the decoded text sequence by describing the tree structure of the decoded text sequence.

[0046] 2. Problem to be processed: This refers to the problem to be solved by the semantic understanding-based problem reasoning method according to some embodiments of this application. It can include various problems, especially numerical reasoning problems or logical reasoning problems. In numerical reasoning problems, the reasoning process can include numerical operation logic expressions.

[0047] 3. Semantic understanding: In this article, it can refer to machine reading comprehension, which is the technology that enables computers to understand the semantics of natural language articles and answer related questions through algorithms or models.

[0048] Figure 1 An exemplary application scenario 100 of a semantic understanding-based problem reasoning method according to some embodiments of this application is illustrated. For example... Figure 1 As shown, application scenario 100 may include server 110, and may optionally include external database 120, network 130 and terminal device 140, wherein terminal device 140 may be controlled by user 150.

[0049] The problem reasoning scheme according to some embodiments of this application can be deployed on server 110 and implemented through server 110. Server 110 can be configured to: first, construct a problem reasoning model based on a deep neural network, the problem reasoning model including an encoder for semantic encoding and a decoder for vector decoding; second, obtain the text to be processed, the text to be processed including a first text indicating the problem to be processed and a second text related to the problem to be processed; third, input the text to be processed into the encoder of the problem reasoning model to encode and output a semantic vector sequence corresponding to the text to be processed; thereafter, input the semantic vector sequence into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order, each decoded text in the decoded text sequence belonging to a preset set of texts related to the reasoning process, the preset set of texts related to the reasoning process being related to the second text; finally, determine the target text indicating the reasoning process of the problem to be processed based on the decoded text sequence.

[0050] Exemplarily, server 110 may store and run instructions capable of executing the various methods described herein. Server 110 may be a single server or a cluster of servers, or it may be a cloud server or cluster of cloud servers capable of providing 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, CDN, and big data and artificial intelligence platforms. It should be understood that the server mentioned herein is typically a server computer with substantial memory and processor resources, but other embodiments are also possible. Furthermore, server 110 is shown only as an example; in practice, other devices or combinations of devices with computing and storage capabilities may be used alternatively or additionally to provide the corresponding services.

[0051] like Figure 1 As shown, optionally, application scenario 100 may further include an external database 120 and a network 130. Server 110 can connect to the external database 120 via network 130 to, for example, retrieve text to be processed (including first text indicating the problem to be processed and second text related to the problem to be processed) from database 120, and to, for example, store the generated reasoning process in database 120. Exemplarily, database 120 may be a standalone data storage device or group of devices, or it may be a backend data storage device or group of devices associated with other online services (such as online services providing intelligent customer service, voice assistants, etc.).

[0052] like Figure 1 As shown, optionally, application scenario 100 may further include terminal device 140, which can be connected to server 110 via network 130. Figure 1As shown, user 150 of terminal device 140 can access server 110 via network 130 through terminal device 140 to obtain services provided by server 110. For example, user 150 can input commands through the user interface provided by terminal device 140, such as through physical input devices (e.g., keyboard and / or mouse, etc.) or virtual buttons (e.g., touch screen), through voice or gesture commands, etc., to initiate a problem reasoning scheme deployed on server 110, send a problem to be processed (and / or related text), receive the generated reasoning process, etc.

[0053] Examples of network 130 include combinations of local area networks (LANs), wide area networks (WANs), personal area networks (PANs), and / or communication networks such as the Internet. Each of server 110, database 120, and terminal device 140 may include at least one communication interface (not shown) capable of communicating via network 130. Such a communication interface may be one or more of the following: any type of network interface (e.g., a network interface card (NIC)), wired or wireless (such as IEEE 802.11 Wireless LAN (WLAN)) wireless interface, Wi-MAX interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth™ interface, Near Field Communication (NFC) interface, etc.

[0054] like Figure 1 As shown, terminal device 140 can be any type of mobile computing device, including mobile computers (e.g., personal digital assistants (PDAs), laptops, notebook computers, tablet computers, netbooks, etc.), mobile phones (e.g., cellular phones, smartphones, etc.), wearable computing devices (e.g., smartwatches, head-mounted devices, including smart glasses, etc.) or other types of mobile devices. In some embodiments, terminal device 140 can also be a fixed computing device, such as a desktop computer, game console, smart TV, etc. Furthermore, when application scenario 100 includes multiple terminal devices 140, these multiple terminal devices 140 can be the same or different types of computing devices.

[0055] For example, terminal device 140 may include a display screen and a terminal application that can be interacted with by an end user via the display screen. The terminal application may be a local application, a web application, or a lightweight application (such as a mobile app or WeChat mini-program). If the terminal application is a local application that requires installation, it can be installed on the user's terminal. If the terminal application is a web application, it can be accessed through a browser. If the terminal application is a mini-program, it can be opened directly on terminal device 140 without installation by searching for relevant information (such as the application's name) or scanning its graphic code (such as a barcode or QR code).

[0056] It should be understood that although server 110, database 120, and terminal device 140 are shown and described as separate structures herein, they may also be different components of the same computing device. For example, server 110 may provide background computing functions, database 120 may provide data exchange, storage, and retrieval functions, and terminal device 140 may provide foreground functions for user interaction, such as receiving user input and providing output to the user through a terminal application. Optionally, the semantic understanding-based problem reasoning method according to some embodiments of this application is not limited to... Figure 1 The implementation shown can be implemented on the server side, or it can be implemented on the terminal device side, or it can be implemented on both the terminal device side and the server side.

[0057] Figure 2 The diagram schematically illustrates a principle block diagram of a semantic understanding-based problem reasoning method according to some embodiments of this application. Figure 2 As shown, the problem reasoning method according to this application can be implemented using a problem reasoning model based on an encoder-decoder structure created based on a deep neural network. The problem reasoning model 220 may include an encoder 221 for semantically encoding the input text and a decoder 222 for decoding the semantic encoding output by the encoder 221.

[0058] like Figure 2As shown, in a semantic understanding-based question reasoning method according to some embodiments of this application, firstly, the text to be processed 210 is input into the question reasoning model 220. The text to be processed 210 includes question text 211 (i.e., a first text indicating the question to be processed) and condition text 212 related to the question to be processed (i.e., a second text used to obtain the answer to the question to be processed 211). The text to be processed 210 can be obtained by concatenating the question text 211 and the condition text 212. Secondly, after receiving the text to be processed 210, the question reasoning model 220 inputs it into the encoder 221 of the question reasoning model 220 to achieve semantic encoding. Specifically, encoder 221 may include a preprocessing model and a semantic understanding model. Specifically, after the text 210 to be processed is input into encoder 221 of the problem reasoning model 220, it is first serialized (e.g., word segmentation) and vectorized using the preprocessing model included in encoder 221. Then, it is input into the semantic understanding model of encoder 221 to obtain the semantic encoding corresponding to the text 210 to be processed (e.g., a sequence of semantic vectors corresponding to each word in the serialized text corresponding to the text to be processed). Next, encoder 221 inputs its output semantic encoding (corresponding to the text 210 to be processed) into decoder 222. Then, decoder 222 decodes the input semantic encoding in chronological order and outputs decoded text sequence 230 (e.g., a text sequence related to the reasoning process). Finally, based on decoded text sequence 230 (e.g., by sequentially concatenating the text in the sequence), the target text 240 corresponding to the reasoning process is directly output; optionally, the target text 240 can also be obtained indirectly through decoded text sequence 230, for example, as... Figure 2 As shown by the dashed arrow, the decoded text sequence 230 can be transformed into a reasoning tree 250, and then the corresponding target text 240 can be directly output from the reasoning tree 250.

[0059] Figure 3 This is a flowchart of a semantic understanding-based problem reasoning method according to some embodiments of this application. Figure 3 The semantic understanding-based problem reasoning method shown in Figure 1 In the application scenarios shown, the implementing entity can be... Figure 1 The server shown is 110.

[0060] like Figure 3 As shown, the semantic understanding-based problem reasoning method according to some embodiments of this application may include the following steps: S310, model building step; S320, text acquisition step; S330, semantic encoding step; S340, vector decoding step; S350, text determination step.

[0061] The following is combined with Figure 2The execution process of each of the above steps S310-S350 is described in detail.

[0062] In step S310 (model construction step), a problem reasoning model is constructed based on a deep neural network. This problem reasoning model may include an encoder for semantic encoding and a decoder for vector decoding.

[0063] In some embodiments, such as Figure 2 As shown in the principle block diagram, according to the concept of this application, in order to obtain the reasoning process and results of a problem to be processed, such as numerical reasoning, it is necessary to first construct a problem reasoning model. For example... Figure 2 As shown, the problem reasoning model 220 employs an encoder-decoder structure, taking the text to be processed 210 as input and the decoded text sequence 230 as output. Therefore, the problem reasoning model 220 (except for the preprocessing model in the encoder 221) can adopt a text-to-text sequence framework based on a deep neural network. In this framework, the encoder 221 converts the text to be processed 210 into a corresponding semantic vector sequence, and the decoder 222 converts the semantic vector sequence into the decoded text sequence 230. In some embodiments, the problem reasoning model 220 constructed based on a deep neural network in this paper can adopt structures such as convolutional neural networks (CNN) and recurrent neural networks (RNN). The encoder 221 and decoder 222 can adopt one or more different neural network structures, as long as they can achieve the corresponding input and output functions.

[0064] In some embodiments, the encoder 221 in the problem reasoning model 220 may include a text preprocessor and a semantic encoder. The text preprocessor may be a preprocessing tool for processing the text to be processed to adapt to the input format of the semantic encoder. This preprocessing process may include serialization or word segmentation of the text and / or vectorization of the serialized text or words. The semantic encoder may be various pre-trained semantic understanding models, such as BERT neural networks, Roberta neural networks, Albert neural networks, etc., used to convert the input text sequence (e.g., the word segmentation sequence corresponding to the text to be processed 210) and / or word vector sequence into a semantic vector sequence. The decoder 222 may include various neural network models for decoding (i.e., converting) the semantic vector sequence into a decoded text sequence in temporal order (e.g., in the order of different decoding moments), such as RNN, LSTM, GRU, etc. More specifically, the decoder 222 in the problem reasoning model 220 may include two sub-models, such as a first decoder with a recurrent neural network structure and a second decoder with a classifier structure. The first decoder can be configured to convert the semantic vector sequence output by the encoder 221 into a decoded vector sequence through recurrent decoding. The second decoder can be configured to convert the decoded vector sequence output by the first decoder into a decoded text sequence 230 through vector classification prediction. Generally, the problem reasoning model 220 can use a neural network model that has been trained with sample data and sample labels, meaning that its parameters have been fully optimized to ensure the accuracy of predictions during the reasoning process.

[0065] In step S320 (text acquisition step), the text to be processed is acquired. The text to be processed includes a first text indicating the problem to be processed and a second text related to the problem to be processed.

[0066] In this paper, the problem to be solved by the problem-solving model, i.e., the problem to be processed, can include various problems, especially numerical reasoning problems or logical reasoning problems. In numerical reasoning problems, the reasoning process can include numerical operation logic expressions, where numerical operations can include at least one of addition, subtraction, multiplication, division, exponentiation, and root extraction on the real number field. For example, numerical reasoning problems can include various types of problems related to numbers. For example, a group of children are collecting seashells on the beach. Xiaoming collected 3 seashells, Xiaozhang collected 6 seashells, and Xiaowang collected 9 seashells. How many seashells did Xiaoming and Xiaozhang collect in total? In the above word problem, the first text indicating the problem to be processed is the question in the word problem, "How many seashells did Xiaoming and Xiaozhang collect in total?", while the second text related to the problem is the condition in the word problem, "A group of children are collecting seashells on the beach. Xiaoming collected 3 seashells, Xiaozhang collected 6 seashells, and Xiaowang collected 9 seashells." Therefore, in the following text, the first text can also be called the question text, and the second text can also be called the condition text.

[0067] Generally, the text to be processed needs to include not only the text of the problem to be solved or processed (i.e., the first text indicating the problem to be processed), but also the conditional text from which the answer or reasoning process corresponding to the problem is obtained (i.e., the second text indicating the relationship to the problem to be processed). The conditional text corresponding to the problem to be processed can be obtained from relevant raw or source data, for example, through retrieval. In many fields (e.g., economics or finance), the raw data containing problem-related conditions is often stored in tabular form, while the input format of the problem reasoning model is usually text. Therefore, in obtaining the text to be processed, the tabular data must first be converted into text format. Optionally, in addition to tabular data, the raw data can be other types of non-text data, such as video data, audio data, etc. In this case, data format conversion tools can be used to process various non-text data to convert them into text format data that the problem reasoning model can read, and then input into the model to predict the problem reasoning process.

[0068] In some embodiments, S320 (text acquisition step) may include: acquiring first text indicating the problem to be processed and original table data corresponding to the problem to be processed; converting the original table data into text data; retrieving second text related to the problem to be processed from the text data; and concatenating the first text and the second text to obtain the text to be processed. The process of acquiring the text to be processed is illustrated below with a specific example.

[0069] First, obtain the initial text indicating the question to be processed, for example, suppose the question is "What is the growth rate of a company's operating revenue in 2021?"; and obtain the corresponding raw tabular data. Table 1 shows an example of the raw tabular data corresponding to the above question. As shown in Table 1, the raw tabular data involves the company's financial statements for the three years from 2019 to 2020.

[0070] Table 1 - Exemplary Original Table Data

[0071]

[0072]

[0073] Secondly, the original tabular data shown in Table 1 is converted into text format. Specifically, the financial statement data in Table 1 is converted into triples according to the corresponding column headings, row headings, and cell data. Then, for each row below the row headings in Table 1, the corresponding triples are concatenated to form a sentence. This converts the data in Table 1 into text data composed of multiple sentences. For example, the triples related to "Operating Revenue" in the second row of Table 1 include: (2019, Operating Revenue, 20971), (2020, Operating Revenue, 22975), (2021, Operating Revenue, 25067); the triples related to "Operating Costs" in the third row include: (2019, Operating Costs, 12308), (2020, Operating Costs, 13287), (2021, Operating Costs, 14387), and so on. The triples corresponding to the above rows are then converted into sentences as follows:

[0074] Sentence 1: 2019 operating revenue was 20,971, 2020 operating revenue was 22,975, and 2021 operating revenue was 25,067.

[0075] Sentence 2: Operating costs in 2019 were 12,308, operating costs in 2020 were 13,287, and operating costs in 2021 were 14,387.

[0076] ...

[0077] Sentence 6: Total profit in 2019 was 4614, total profit in 2020 was 5102, and total profit in 2021 was 5582.

[0078] Next, using retrieval techniques, sentences related to the question ("What was the growth rate of a company's operating revenue in 2021?") are searched from the above text data (i.e., sentences 1-6) (i.e., the second text). Clearly, only sentence 1 among sentences 1-6 relates to operating revenue, which is relevant to the question; therefore, sentence 1 can be selected as the second text.

[0079] Finally, the first text (“What was the growth rate of a company’s operating revenue in 2021?”) is concatenated with the second text (“2019 operating revenue 20971, 2020 operating revenue 22975, 2021 operating revenue 25067”) to obtain the text to be processed. For example, the first text can be placed first, followed by the second text, with a separator added between them. The text to be processed can then be input into the problem reasoning model 220 for processing to obtain the corresponding reasoning process.

[0080] In step S330 (semantic encoding step), the text to be processed is input into the encoder of the problem reasoning model to encode and output the semantic vector sequence corresponding to the text to be processed.

[0081] Figure 4 A schematic diagram illustrating the semantic encoding and vector decoding of text to be processed according to some embodiments of this application is shown. Figure 4 As shown, the encoder 221 in the problem reasoning model 220 may include a text preprocessor 221a and a semantic encoder 221b. The text preprocessor 221a may be a preprocessing tool for processing the text 210 to adapt to the input format of the semantic encoder; the semantic encoder 221n may be various pre-trained semantic understanding models or machine reading comprehension models.

[0082] In some embodiments, step S330 (semantic encoding step) may include: performing word segmentation on the text to be processed to obtain a word sequence corresponding to the text to be processed; performing semantic understanding on the word sequence to obtain a semantic vector sequence corresponding to the text to be processed, wherein each semantic vector in the semantic vector sequence corresponds one-to-one with each word in the word sequence.

[0083] like Figure 4 As shown, during the encoding stage of the text to be processed 210 (i.e., when it is input into the encoder 221 in the problem reasoning model 220), the text preprocessor 221a is first used to serialize it (e.g., word segmentation) to obtain the word sequence or text sequence (T1, T2, T3, ..., T) corresponding to the text to be processed. n ), where T i (i = 1, 2, ..., n) represents the i-th text in the text sequence, and n represents the total number of texts in the text sequence; secondly, the preprocessed word sequence or text sequence (T1, T2, T3, ..., T...) is used to... n The input is fed into semantic encoder 221b (assuming the input format of semantic encoder 221b is a text sequence) to perform semantic understanding and obtain the result corresponding to the text sequence (T1, T2, T3, ..., T...). n A one-to-one semantic vector sequence (H1, H2, H3, ..., H...) n Among them, H i (i = 1, 2, ..., n) represents the i-th semantic vector in the sequence of semantic vectors, and n represents the total number of semantic vectors in the sequence. For example, the text preprocessor 221a may include a word segmentation tool to segment the text to be processed into one or more words, word sequences, or text sequences. The word segmentation tool may be, for example, Jieba, HanLP, LTP, THULAC, NLPIR, etc. In addition to using word segmentation tools, the serialization process or word segmentation process of the text to be processed may optionally be implemented through other methods such as manual annotation, random segmentation, or complete segmentation into multiple single characters.

[0084] Optionally, if the input format of the semantic encoder 221b is a vector sequence, then after the text preprocessor 221a performs word segmentation on the text to be processed to obtain a text sequence or word sequence, it needs to vectorize each text or word in the obtained text sequence to obtain a word vector sequence; then input it into the semantic encoder 221b for semantic encoding. In some embodiments, step S330 (semantic encoding step) may also include: performing word segmentation on the text to be processed to obtain a word sequence corresponding to the text to be processed; vectorizing each word in the word sequence to obtain a word vector sequence corresponding to the text to be processed; performing semantic understanding on the word vector sequence to obtain a semantic vector sequence corresponding to the text to be processed, wherein each semantic vector in the semantic vector sequence corresponds one-to-one with each word vector in the word vector sequence. Exemplarily, the text preprocessor 221a may further include a word vector tool for converting text to word vectors to achieve vectorization processing of the segmented text sequence. The word vector tool may include, for example, one-hot, word2vec, GloVe, etc.

[0085] In step S340 (vector decoding step), the semantic vector sequence is input into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order. Each decoded text in the decoded text sequence belongs to a preset set of reasoning process-related texts, which is related to the second text.

[0086] According to the concept of this application, after the text to be processed is encoded, the corresponding semantic vector sequence needs to be decoded to generate a decoded text sequence, thereby deriving the reasoning process of the problem to be processed. In order to obtain the reasoning process, the decoded text in the decoded text sequence should be related to the reasoning process of the problem to be processed. Therefore, the decoded text sequence related to the reasoning process of the problem to be processed can be obtained by using a recurrent decoding plus classification prediction method (e.g., through recurrent neural networks and classifiers).

[0087] Specifically, before the decoding operation, a pre-defined set of reasoning process-related texts needs to be pre-defined, to which each decoded text in the decoded text sequence belongs. This set can be pre-determined based on the specific application scenario (e.g., numerical calculation, logical reasoning) and the conditional text (i.e., the second text) in the text to be processed. For example, for numerical calculation problems, in some embodiments, the elements in the reasoning process-related text set can be limited to operators related to specific numerical operation logic, such as "+", "-", "*", " / ", "^", "√", etc., as well as various numbers appearing in the second text. In this way, the decoded text sequence formed by each decoded text from this reasoning process-related text set can be formed by, for example, text concatenation, using numbers and operators. In other embodiments, the elements in the reasoning process-related text set can also be limited to reasoning tree construction steps or reasoning construction rules related to the reasoning process (e.g., the parent-child relationship construction process of non-leaf node texts in the reasoning tree). In this way, the decoded text sequence composed of decoded texts belonging to the reasoning process-related text set can indicate the reasoning tree construction process, thereby obtaining the reasoning tree, and finally using the reasoning tree to directly obtain the reasoning process.

[0088] During the decoding process, the input semantic vector sequence is first transformed into a semantic feature vector sequence suitable for the input format of a decoder (e.g., a decoder with a recurrent neural network structure) that is time-sequentially decoded. That is, each semantic feature vector in the semantic feature vector sequence corresponds one-to-one with each decoding moment of the decoder. Then, the semantic feature vector sequence is transformed into a decoded vector sequence through a recurrent decoding method. Finally, the decoded vector sequence is transformed into a decoded text sequence through a classification prediction method.

[0089] like Figure 4 As shown, the text to be processed 210 is processed by a text preprocessor 221a and a semantic encoder 221b to obtain a semantic vector sequence (H1, H2, H3, ..., H...). n After that, the problem reasoning method enters the vector decoding stage.

[0090] In the vector decoding stage, firstly, the semantic vector sequence (H1, H2, H3, ..., H...) is... n (For example, using an attention mechanism) transforms into a sequence of semantic feature vectors (K1, K2, K3, ..., K2) that are suitable for the input format of the first decoder 222a in decoder 222. m ), where K i(i = 1, 2, ..., m) represents the i-th semantic feature vector in the semantic feature vector sequence, and m represents the total number of semantic feature vectors in the semantic feature vector sequence. m is the same as the number of decoding moments in the first decoder 222a, thus ensuring that the semantic feature vector sequence (K1, K2, K3, ..., K...) is... m Each m corresponds to a specific decoding moment. Here, m and n can be the same or different.

[0091] Secondly, such as Figure 4 As shown, the semantic feature vector sequence (K1, K2, K3, ..., K...) m Each semantic feature vector in the sequence is sequentially input into the first decoder 222a at the corresponding decoding time to be decoded, thereby obtaining the decoded vector sequence (S1, S2, S3, ..., S...). m ). Among them, S i (i = 1, 2, ..., m) represents the i-th decoded vector in the decoded vector sequence, which corresponds to the i-th decoding time of the first decoder 222a. Therefore, in this paper, S j It can also be called the decoding vector at the i-th decoding moment.

[0092] Again, such as Figure 4 As shown, the decoding vector sequence (S1, S2, S3, ..., S...) m Each semantic feature vector in the sequence (e.g., according to the decoding time sequence of its corresponding first decoder) is input into a second decoder 222b, such as a classifier model, to obtain the sequence of decoded vectors (S1, S2, S3, ..., S...) through classification prediction. m The decoded text sequence (A1, A2, A3, ..., A...) corresponds one-to-one. m ).

[0093] For example, the first decoder 222a may include a model based on a recurrent neural network structure, such as RNN, LSTM, GRU, etc.; the second decoder 222b may include various classifier models, such as random forest classifier models, XGBoost (eXtreme Gradient Boosting) models, LightGBM (Light Gradient Boosting Machine) models, etc.

[0094] In step S350 (text determination step), the target text indicating the reasoning process of the problem to be processed is determined based on the decoded text sequence.

[0095] In some embodiments, when the problem to be processed is a numerical calculation or numerical reasoning problem, the target text indicating the reasoning process can be a numerical operation logic expression, wherein the numerical operation can include, but is not limited to, at least one of addition, subtraction, multiplication, division, exponentiation, and root extraction for the real number field. For example, in the above-mentioned problem "What is the growth rate of a company's operating revenue in 2021" and the corresponding conditions "2019 operating revenue 20971, 2020 operating revenue 22975, 2021 operating revenue 25067", the numerical operation logic expression indicating the reasoning process is: "(25067-22975) / 22975". Furthermore, for non-numerical problems, the target text can be one or more logical reasoning statements expressed in words to represent the logical reasoning process from the conditions to the final answer to the problem.

[0096] In some embodiments, step S350 (text determination step) may include: concatenating the decoded texts in the decoded text sequence sequentially to form target text indicating the reasoning process of the problem to be processed. As mentioned above, the preset set of texts related to the reasoning process can be determined in advance based on the specific application scenario (e.g., numerical calculation, logical reasoning, etc.) and the conditional text (i.e., the second text) in the text to be processed. For example, for numerical calculation problems, the elements in the set of texts related to the reasoning process to which the decoded text belongs may include operators such as "+", "-", "*", " / ", "^", "√", "(", ")", etc., as well as various numbers appearing in the second text. Therefore, concatenating the decoded texts corresponding to different decoding times in the decoded text sequence sequentially can form a numerical operation logic expression composed of numbers and operators, i.e., the target text. There may be unreasonable situations, such as the presence of two consecutive operators "+" and "-" in the decoded text sequence. In this case, the above situation can be avoided by setting preset rules, such as automatically deleting the second operator "-", which will not be elaborated here.

[0097] To eliminate the possibility of unreasonable or abnormal target text resulting from directly concatenating decoded text sequences, we can consider converting the decoded text sequence into a reasoning tree (similar to a parse tree) structure, and then using the reasoning tree to derive the final target text. As mentioned above, to derive the target text through the sequence-to-reasoning tree conversion, the elements in the related text set of the reasoning process to which the decoded text belongs need to be limited to reasoning tree construction steps or reasoning construction rules, such as root node text, leaf node text, and parent-child relationships between node texts. Thus, each decoded text belonging to the related text set of the reasoning process can represent a construction step of the reasoning tree. Therefore, concatenating the decoded texts in sequence can indicate the entire construction process of the reasoning tree, thereby deriving the reasoning tree from the decoded text. Finally, the reasoning process can be directly obtained using the reasoning tree; for example, concatenating the leaf nodes in depth-first traversal order yields the final target text. For details on the process of using reasoning tree construction to convert decoded text sequences into target text, please refer to [link to relevant documentation]. Figure 5 and Figure 6 And its related descriptions.

[0098] In the semantic understanding-based question reasoning method according to some embodiments of this application, a question reasoning model is constructed by utilizing an encoder containing a semantic understanding model and a decoder for vector sequence to text. The question reasoning model performs semantic encoding and iterative decoding on the text to be processed (containing the question and related conditions) to convert the original text (i.e., the text to be processed, containing the question and conditions) into a decoded text sequence. Then, based on the decoded text sequence, the target text corresponding to the question to be processed (i.e., the reasoning process) is obtained. This not only yields the logical reasoning process from the question and conditions to the result, but also allows for the direct deriving of the question answer based on the reasoning process. Compared to related question-answering systems or models that only output reasoning results, this application innovatively proposes predicting the reasoning process and reasoning logic (e.g., numerical operation logic for numerical problems such as data analysis) of the question through a semantic encoding process based on machine reading comprehension and a decoding process based on different decoding times, thus naturally obtaining the reasoning result. This method has strong interpretability and improves reasoning accuracy.

[0099] Figure 5 An example flowchart illustrating text determination steps according to some embodiments of this application is shown.

[0100] In some embodiments, in order to construct a reasoning tree structure by decoding a text sequence and directly obtain the target text through the reasoning tree, each text in the preset reasoning process related text set can respectively indicate various preset reasoning tree parent-child relationship construction processes, wherein each preset reasoning tree parent-child relationship construction process includes a process of generating a sequence of leaf node texts or non-leaf node texts that serve as child nodes from non-leaf node texts that serve as parent nodes. The preset reasoning tree parent-child relationship construction process can be determined according to preset reasoning syntax rules and second text.

[0101] Table 2 shows examples of preset inference tree syntax rules for numerical computation or numerical analysis problems. As shown in Table 2, the preset node texts of the inference tree include Exp1, Exp2, Exp3, optl, opt2, +, -, *, / , and Num. Here, Exp1 represents the first type of expression (multiplication and division), Exp2 represents the second type of expression (addition and subtraction), Exp3 represents the third type of expression (number), optl represents the first type of operator (i.e., the plus sign "+" or the minus sign "-"), opt2 represents the second type of operator (the multiplication sign "*" or the division sign " / "), and Num represents a number (which is specifically determined according to the conditions in the text to be processed; therefore, Num usually includes two or more specific numbers). In Table 2, "|" represents "or," and "→" represents "generate." The rules in Table 2 represent the parent-child relationships between the preset node texts of the inference tree and the order in which the node texts are constructed. For example, the first rule states that the node text Exp1 can generate three parallel node texts Exp1, opt2, and Exp2, or it can generate a single node text Exp2. In other words, Exp1 is a non-leaf node text (because it (as a parent node) can generate other node texts (child nodes)), and the child nodes generated by it as a parent node text fall into two categories: either three child node texts or one child node text. According to the rules shown in Table 2, it can be concluded that in this reasoning tree, leaf node texts include +, -, *, / , and Num, because these node texts cannot generate other node texts; correspondingly, non-leaf node texts include Exp1, Exp2, Exp3, opt1, and opt2. It should be noted that the leaf node texts corresponding to the leaf nodes in the reasoning tree can be used to generate target texts that indicate the reasoning process of the problem to be solved.

[0102] Table 2 - Examples of Reasoning Tree Construction Rules

[0103] 1 Exp1→Exp1 opt2 Exp2|Exp2 2 Opt1→+|- 3 Exp2→Exp2 opt1 Exp3|Exp3 4 Opt2→*| / 5 Exp3→Exp1|Num

[0104] Table 3 shows examples of preset inference process-related text sets corresponding to the inference tree syntax rules shown in Table 2. As shown in Table 3, the preset inference process-related text sets are predetermined based on the preset inference tree syntax rules. As shown in Table 3, elements 1 and 2 in the inference process-related text set are determined based on syntax rule 1 in Table 2, elements 3 and 4 correspond to syntax rule 2, and so on. Due to the presence of "|" (or), the 5 syntax rules shown in Table 2 can determine the 10 elements of the inference process-related text set shown in Table 3. Thus, the inference process-related text set shown in Table 3 includes all possible generation processes from non-leaf node text to its child node text, with each element indicating a construction process from a non-leaf node to its child node. It should be noted that the text of elements 1-9 in Table 3 is concrete and fixed text, while element 10 represents abstract text, the concrete text of which is determined based on the specific number represented by Num. Therefore, element 10 may actually correspond to multiple texts. For example, in the second text example mentioned above, “2019 operating revenue 20971, 2020 operating revenue 22975, 2021 operating revenue 25067”, the relevant numbers include three 20971, 22975, and 25067. Therefore, Num corresponds to these three numbers, and the specific text corresponding to element 10 includes “Node Exp3 generates leaf node 20971”, “Node Exp3 generates leaf node 22975”, and “Node Exp3 generates leaf node 25067”.

[0105] Table 3 - Examples of Text Sets Related to Pre-defined Reasoning Processes

[0106]

[0107] When the set of text related to the preset reasoning process includes various preset parent-child relationship construction processes for reasoning trees, each decoded text, as an element in the set of text related to the preset reasoning process, can indicate the corresponding parent-child relationship construction process. Therefore, a reasoning tree can be constructed based on the parent-child relationship construction process indicated by each decoded text in the decoded text sequence.

[0108] like Figure 5 As shown, step S350 (text determination step) may include:

[0109] S350a, according to the decoding time order corresponding to each decoded text in the decoded text sequence, execute the preset reasoning tree parent-child relationship construction process indicated by each decoded text in sequence, so as to construct the reasoning tree corresponding to the problem to be processed;

[0110] S350b concatenates the text of all leaf nodes of the reasoning tree in depth-first traversal order to form the target text that indicates the reasoning process of the problem to be solved.

[0111] Figure 2 The text set indicating the reasoning process related to the parent-child relationship of the preset reasoning tree contains text that indicates both the parent-child relationship and the node type of each parent and child node. That is, parent nodes correspond to non-leaf node text, while child node sequences may correspond to either non-leaf node text or leaf node text (e.g., +, -, *, / , or Num). Therefore, as described in S350a, the reasoning tree corresponding to the problem to be processed can be constructed from the root node through depth-first traversal based on the corresponding preset reasoning tree parent-child relationship construction process indicated by each decoded text. Optionally, the reasoning tree can also be constructed through breadth-first traversal based on the preset reasoning tree parent-child relationship construction process indicated by the decoded text. After the reasoning tree is constructed, as described above, the leaf node text corresponding to each leaf node in the reasoning tree can be used to constitute the target text. Therefore, as described in S350b, all leaf node texts of the reasoning tree can be directly concatenated in depth-first traversal order to form the target text indicating the entire reasoning process.

[0112] In the scheme of determining the target text by converting a decoded text sequence into a reasoning tree, after encoding and decoding the text to be processed using a problem-based reasoning model, the decoded text sequence is directly converted into a reasoning tree structure based on the parent-child relationship construction process indicated by the decoded text sequence output by the model (i.e., the content of each element in the preset reasoning process-related text set, which can be determined based on preset reasoning tree syntax rules and second text). This reasoning tree structure is then used to determine the target text indicating the reasoning process (i.e., leaf nodes concatenated by depth-first traversal). This allows for effective constraints on the output space (e.g., the reasonableness of the output results) of the model prediction using the preset reasoning process-related text and tree structure attributes, thereby improving the accuracy of predicting the reasoning process using the problem-based reasoning model. The problem-based reasoning scheme of this application can be applied to financial research report analysis and financial digital reasoning technology, providing a highly interpretable and accurate numerical reasoning process or numerical operation logic formula.

[0113] In some embodiments, S350a (constructing the parent-child relationship of the preset inference tree indicated by each decoded text in the decoding time sequence according to the decoding time sequence of each decoded text in the decoded text sequence, so as to construct the inference tree corresponding to the problem to be processed) may include:

[0114] The non-leaf node text that serves as the parent node during the construction of the parent-child relationship of the preset reasoning tree indicated by the decoded text at the initial decoding moment is determined as the root node of the reasoning tree;

[0115] According to the decoding time order of each decoded text in the decoded text sequence, for each decoded text, the following steps are performed in sequence: in the order of depth-first traversal, select the current non-leaf node that has not yet determined its child nodes from the nodes of the text that has been determined as non-leaf nodes in the inference tree; determine each node text in the node text sequence that is a child node in the preset inference tree parent-child relationship construction process indicated by the current decoded text as the child node of the current non-leaf node in the order from left to right.

[0116] The reasoning tree construction process ends when all nodes in the reasoning tree that are determined to be non-leaf nodes have determined their child nodes.

[0117] Figure 6 Exemplary structures and construction processes of reasoning trees according to some embodiments of this application are illustrated. Regarding the problem "What is the growth rate of a company's operating revenue in 2021?" and the corresponding conditions "2019 operating revenue 20971, 2020 operating revenue 22975, 2021 operating revenue 25067", Table 4 shows the decoded text sequence output by the vector sequence decoding process as (A1, A2, A3, ..., A...). m The first 10 decoded texts (corresponding to the first 10 decoding moments) in the text.

[0118] Table 4 - Examples of Decoded Text Sequences

[0119] <![CDATA[A1]]> Node Exp1 generates non-leaf nodes Exp1, opt2, and Exp2. <![CDATA[A2]]> Node Exp1 generates a non-leaf node Exp2; <![CDATA[A3]]> Node Exp2 generates non-leaf nodes Exp2, opt1, and Exp3; <![CDATA[A4]]> Node Exp2 generates a non-leaf node Exp3; <![CDATA[A5]]> Node Exp3 generates leaf node 25067; <![CDATA[A6]]> Node Opt1 generates leaf nodes; <![CDATA[A7]]> Node Exp3 generates leaf node 22975; <![CDATA[A8]]> Node Opt2 generates leaf nodes / ; <![CDATA[A9]]> Node Exp2 generates a non-leaf node Exp3; <![CDATA[A 10 ]]> Node Exp3 generates leaf node 22975.

[0120] like Figure 6 As shown in Table 4, regarding (A1, A2, A3, ..., A... 10 The process of constructing the parent-child relationship of the corresponding preset reasoning tree is as follows:

[0121] First, such as Figure 6 As shown by the dashed arrow, Exp1, which is the parent node in the process of constructing the parent-child relationship indicated by the decoded text A1 at the initial decoding moment, is determined as the root node of the reasoning tree.

[0122] Secondly, according to Figure 6 The sequence numbers (i.e., decoding times) of each decoded text shown, along with their corresponding arrows, are used to sequentially generate all nodes of the reasoning tree except for the root node. Specifically:

[0123] The first step (corresponding to the decoded text A1) is to select the current non-leaf node in the depth-first traversal order. That is, from the nodes of the text that have been determined to be non-leaf nodes in the inference tree (i.e., the root node Exp1), select the current non-leaf node whose child nodes have not yet been determined. Then, the preset parent-child relationship construction process of the inference tree indicated by the current decoded text A1 will be performed for the current non-leaf node Exp1. That is, the text of each node in the non-leaf node text sequence (Exp1, opt2, Exp2) that is the child node will be determined as the three child nodes Exp1, opt2, and Exp2 of the non-leaf node text of the current non-leaf node Expl in the order from left to right.

[0124] The second step (corresponding to the decoded text A2) involves selecting the current non-leaf node in the depth-first traversal order. This means selecting the current non-leaf node whose child nodes have not yet been determined from the nodes of the inference tree that have been determined as non-leaf nodes (i.e., the root node Exp1 and its child nodes Exp1, opt2, and Exp2). Then, the preset inference tree parent-child relationship construction process indicated by the current decoded text A2 will be executed for the current non-leaf node Exp1. That is, the non-leaf node text Exp2, which is the child node, will be determined as a child node Exp2 of the current non-leaf node Exp1.

[0125] The third step (corresponding to the decoded text A3) is to select the current non-leaf node as the child node Exp2 of the leftmost child node Exp1 of the root node, and then execute the parent-child relationship construction process indicated by A3 to obtain the three child nodes Exp2, opt1 and Exp3 of the current non-leaf node Exp2 from left to right.

[0126] And so on, steps four through ten (corresponding to decoded text A4-A respectively) 10 Based on A4-A respectively 10 Construct the corresponding nodes, such as Figure 6 The decoded text markers and arrows are shown. (See example.) Figure 6 As shown, the order of each decoded text in the decoded text sequence or the order of its corresponding decoding moments is consistent with the node construction order of the inference tree. That is, the current non-leaf node is determined in general according to the depth-first traversal order, and then its child nodes are generated from the current non-leaf node according to the parent-child relationship construction process corresponding to the current decoded text.

[0127] Secondly, after step ten, all nodes in the inference tree that have been identified as non-leaf node text, except for their child nodes, have identified their child nodes (i.e., all leaf nodes in the current inference tree correspond to leaf node text), indicating that the inference tree has been constructed and the inference construction process can be terminated. At this point, if the decoded text sequence (A1, A2, A3, ..., A...) is... mIf m is greater than 10, then the decoded text after the 11th (if it exists) can be ignored.

[0128] Finally, as Figure 6 As shown, the leaf nodes in the constructed reasoning tree are concatenated in depth-first traversal order to obtain the target text indicating the reasoning process, i.e., the corresponding numerical operation logic expression is: "(25067-22975) / 22975". The parentheses ensure that sub-expressions formed by leaf nodes under the same subtree are evaluated first to avoid logical errors. It should be noted that the parentheses can be omitted when the operations of sub-expressions formed by leaf nodes under the same subtree are unaffected. For example, in the above example, after changing "-" to "*", the corresponding parentheses can be omitted, i.e., it is represented as "25067*22975 / 22975".

[0129] Figure 7 A flowchart illustrating the training process of a problem reasoning model according to some embodiments of this application is shown. Figure 7 As shown, the problem reasoning model according to some embodiments of this application can be trained through the following steps:

[0130] S710, Obtain a text dataset, wherein each text data in the text dataset includes a question text and conditional text related to the question;

[0131] S720, Obtain the reference reasoning process text corresponding to each text data in the text dataset;

[0132] S730: For each piece of text data, based on the preset inference tree syntax rules and the corresponding reference inference process text, constructs the reference inference tree corresponding to that text data.

[0133] S740, for each text data, the reference reasoning tree corresponding to the text data is transformed into a reference text sequence indicating the parent-child relationship between nodes by depth-first traversal, which serves as the sample label corresponding to the text data;

[0134] S750, each text data in the text dataset is input into the question reasoning model, and the reasoning loss of the question reasoning model is calculated based on the output of the question reasoning model and the sample label corresponding to each text data.

[0135] S760, Based on the inference loss, the parameters of the problem inference model are iteratively updated until the target loss meets the preset conditions.

[0136] For example, if the text to be processed, consisting of the question "What is the growth rate of a company's operating revenue in 2021?" and the corresponding conditions "2019 operating revenue 20971, 2020 operating revenue 22975, 2021 operating revenue 25067", is used as training text data, then its corresponding sample labels can be constructed through the following process:

[0137] First, it is necessary to obtain the corresponding reference reasoning process text, namely the numerical operation logic formula "(25067-22975) / 22975".

[0138] Secondly, based on the preset reasoning tree syntax rules shown in Table 1 and the reference reasoning process text "(25067-22975) / 22975" mentioned above, construct the corresponding problem to be processed, such as... Figure 6 The reference inference tree is shown below. First, the expression "(25067-22975) / 22975" is divided into the word sequence "25067", "-", "22975", " / ", and "22975". Then, from the overall perspective, this expression is a division operation, so the root node of the inference tree can be Exp1 (because it corresponds to a multiplication and division expression). Next, child nodes of Exp1 are generated according to the preset inference tree syntax rules. Then, child nodes of each child node are constructed in the same way according to the preset inference tree syntax rules until leaf nodes are generated, so that each leaf node of the inference tree corresponds one-to-one with each word of the expression.

[0139] Next, the reference reasoning tree is transformed into a reference text sequence indicating the parent-child relationship between nodes through depth-first traversal, which serves as the sample label corresponding to the text data, such as the decoded text sequence shown in Table 4.

[0140] After constructing sample labels, supervised training can be used to calculate the inference loss based on the difference between the model output corresponding to the input text data and the sample labels. Finally, the model parameters are adjusted and optimized based on the inference loss until the preset conditions are met.

[0141] Figure 8 An example flow diagram illustrating vector decoding steps according to some embodiments of this application is shown. Figure 8 As shown, step S340 (vector decoding step) may include the following steps: S340a-S340c.

[0142] Figure 9 The schematic diagram illustrates a cyclic decoding process for vector decoding steps according to some embodiments of this application. Figure 9 In, with Figure 4 In comparison, a recurrent neural network (RNN) replaced the first decoder 222a, and a classifier replaced the second decoder 222b. Figure 9This mainly illustrates the cyclic decoding process at the t-th decoding time, because the entire decoding process is performed cyclically according to the order of different decoding times. For example, as... Figure 9 As shown, firstly, from the semantic vector (H1, H2, H3, ..., H... n The semantic feature vector K at time t needs to be obtained through an attention mechanism (i.e., weighted summation). t Subsequently, K t The decoding vector S at the (t-1)th decoding time. t-1 (and, such as) Figure 9 The dashed arrow indicates the optional decoded text A at the t-th decoding time. t The corresponding decoded text vector a t-1 Input an RNN to output the decoded vector S at the t-th decoding time. t Finally, S t Input the classifier to obtain the decoded text A at the t-th decoding time. t .

[0143] The following reference Figure 4 and Figure 9 Detailed description Figure 8 The above steps S340a-S340c.

[0144] In step S340a, the semantic vector sequence is transformed into a semantic feature vector sequence corresponding to the text to be processed, so that each semantic feature vector in the semantic feature vector sequence corresponds one-to-one with each decoding moment of the first decoder.

[0145] like Figure 4 As shown, before performing vector decoding, the semantic vector sequence (H1, H2, H3, ..., H2) output by the semantic encoder 221b can be processed using an attention mechanism. n The semantic feature vector sequence (K1, K2, K3, ..., K) is transformed into a format suitable for the input format of the first decoder 222a in decoder 222. m In the input information of a neural network model, the attention mechanism can be used to select key information for processing, thereby improving the efficiency and accuracy of the neural network. For example, in the decoding stage of a problem-solving model, each vector in the input semantic vector sequence corresponds to a word segment in the text to be processed. However, the degree of correlation between these words and the problem to be processed varies. Therefore, weights are used to reflect the importance of different semantic vectors in solving the problem, thereby improving the efficiency and accuracy of the model's prediction and reasoning process. It should be noted that this application is not limited to the sequence transformation method based on the attention mechanism described above, but sequence transformation can also be performed through other methods.

[0146] In some embodiments, step S340a may include:

[0147] For each decoding moment of the decoder, the following steps are performed in chronological order: If the current decoding moment is the initial decoding moment, a random attention weight sequence is generated corresponding to the current decoding moment; if the current decoding moment is not the initial decoding moment, the attention weight sequence corresponding to the current decoding moment is calculated based on the semantic vector sequence and the decoding vector corresponding to the previous decoding moment, wherein each attention weight in the attention weight sequence corresponds one-to-one with each semantic vector in the semantic vector sequence; based on the attention weight sequence and its correspondence with the semantic vector sequence, the semantic vector sequence is weighted and summed to obtain the semantic feature vector corresponding to the current decoding moment.

[0148] According to the order of the decoding times of the decoder, the semantic feature vectors corresponding to each decoding time are combined together to form a semantic feature vector sequence.

[0149] like Figure 9 As shown, at the t-th decoding time (not the initial decoding time), the semantic vector sequence (H1, H2, H3, ..., H2) output by encoder 221 can be used as a basis. n ) and the attention weight sequence corresponding to the current decoding time (b t1 b t2 b t3 , ..., b tn The semantic feature vector Kt corresponding to the current decoding time is calculated using the following weighted sum formula (1):

[0150]

[0151] In formula (1), And e ti =a(S t-1 H i ), where S t-1 Let be the decoding vector at the (t-1)th decoding time, and let a() represent the attention mechanism alignment function.

[0152] In step S340b, the semantic feature vector sequence is input into the first decoder to generate the decoding vector sequence corresponding to the text to be processed in a loop decoding manner.

[0153] In some embodiments, S340b includes: for the initial decoding time of the decoder, calculating the decoding vector corresponding to the initial decoding time based on the semantic feature vector corresponding to the initial decoding time; for each decoding time after the initial decoding time of the decoder, calculating the decoding vector corresponding to the current decoding time based on the semantic feature vector corresponding to the current decoding time and the decoding vector corresponding to the previous decoding time; and combining the decoding vectors of each decoding time in the order of the decoder's various times to obtain the decoding vector sequence corresponding to the text to be processed.

[0154] like Figure 4 As shown, the semantic feature vector sequence (K1, K2, K3, ..., K...) m When each semantic feature vector in the decoder is sequentially input into the first decoder 222a for decoding at the corresponding decoding time, the decoder first calculates the decoded vector S1 corresponding to the initial decoding time based on the semantic vector K1 corresponding to the initial decoding time (i.e., the decoding time corresponding to K1); then, for each non-initial decoding time, such as the t-th decoding time, the decoder calculates the decoded vector S1 based on the semantic feature vector K1 corresponding to the current decoding time. t and the decoding vector S corresponding to the previous decoding time (i.e., the (t-1)th decoding time). t-1 Calculate the decoding vector S corresponding to the current decoding time (i.e., the t-th decoding time). t Finally, the decoding vectors corresponding to each decoding moment are combined to form a decoding vector sequence (S1, S2, S3, ..., S...). m ).

[0155] The above method for calculating the decoding vector can be expressed by the following formula (2):

[0156] S t =f RNN (K t S t-1 (2)

[0157] In formula (2) f RNN S represents the first decoder (e.g., a recurrent neural network, RNN). t Let S represent the decoding vector at the t-th decoding time. t-1 K represents the decoding vector at the (t-1)th decoding time. t This represents the semantic feature vector corresponding to the t-th decoding time.

[0158] In step S340c, each decoding vector in the decoding vector sequence is input to the second decoder to generate the decoding text sequence corresponding to the text to be processed in a classification prediction manner.

[0159] In some embodiments, step S340c may include: using the second decoder to predict the category to which each decoded vector in the decoded vector sequence belongs, the category being derived from a preset category set, the preset category set corresponding one-to-one with a preset inference process-related text set; for each decoded vector in the decoded vector sequence, determining the inference process-related text corresponding to the category to which the decoded vector belongs, based on the correspondence between the preset category set and the preset inference process-related text set, as the decoded text corresponding to the decoded vector; and combining the decoded texts corresponding to each decoded vector together to form a decoded text sequence according to the decoding time order of each decoded vector in the decoded vector sequence.

[0160] like Figure 4 As shown, the decoding vector sequence (S1, S2, S3, ..., S...) m Each decoded vector in the sequence is sequentially input into a second decoder 222b, such as a classifier model, to obtain the sequence of decoded vectors (S1, S2, S3, ..., S...) through classification prediction. m The decoded text sequence (A1, A2, A3, ..., A...) corresponds one-to-one. m In some embodiments, the second decoder 222b may employ a classifier, thus enabling the decoding of the vector sequence (S1, S2, S3, ..., S...). m Each decoded vector in the algorithm is classified, and the preset category set corresponds one-to-one with the inference process-related text set (as shown in Table 3). Therefore, the inference process-related text corresponding to the category of each decoded vector can be used as the decoded text corresponding to that decoded vector, thus enabling it to be used to predict the inference process of the problem to be solved. Finally, the decoded texts are concatenated together according to the order of their respective decoding times to obtain the decoded text sequence (A1, A2, A3, ..., A...). m ).

[0161] For example, as mentioned above, regarding the problem "What is the growth rate of a company's operating revenue in 2021?" and the corresponding conditions "2019 operating revenue 20971, 2020 operating revenue 22975, 2021 operating revenue 25067", Table 4 shows the corresponding decoded text sequence (A1, A2, A3, ..., A...) output by the problem reasoning model. m Examples of the first 10 decoded texts (corresponding to the first 10 decoding moments) in the text.

[0162] Figure 10 Showing with Figure 9 Example flowcharts of vector decoding steps according to some embodiments of this application are provided. Figure 10 As shown, step S340 may include:

[0163] S1001, take the initial decoding time of the decoder as the current decoding time;

[0164] S1002, determine whether the current time is the initial decoding time. If yes, go to S1003; otherwise, go to S1004.

[0165] S1003, in response to the current decoding time being the initial decoding time, randomly generate the attention weight sequence for the current decoding time, and each attention weight in the attention weight sequence corresponding to the current decoding time corresponds one-to-one with each vector in the semantic vector sequence;

[0166] S1004, in response to the fact that the current decoding time is not the initial decoding time, an attention weight sequence corresponding to the current decoding time is generated based on the semantic vector sequence and the decoding vector of the previous decoding time. Each attention weight in the attention weight sequence corresponding to the current decoding time corresponds one-to-one with each vector in the semantic vector sequence.

[0167] S1005, using the correspondence between the attention weight sequence and the semantic vector sequence at the current decoding time, the semantic vector sequence is weighted and summed to obtain the semantic feature vector at the current decoding time;

[0168] S1006, In response to the fact that the current decoding time is not the initial decoding time, the first decoder is used to calculate the decoding vector of the current decoding time based on the decoded text of the previous decoding time, the decoding vector of the previous decoding time, and the semantic feature vector corresponding to the current decoding time.

[0169] S1007, Input the decoding vector at the current decoding moment into the second decoder to predict the category to which the decoding vector at the current decoding moment belongs. This category comes from a preset category set that corresponds one-to-one with the preset inference process related text set.

[0170] S1008, Based on the correspondence between the preset category set and the preset inference process related text set, determine the inference process related text corresponding to the category to which the decoding vector belongs at the current decoding moment, and use it as the decoding text at the current decoding moment;

[0171] S1009, determine if the current time is the last decoding time. If yes, go to 1011; otherwise, go to S1010.

[0172] S1010, update the current decoding time to the next decoding time of the decoder, and proceed to S1002.

[0173] S1011, combine the decoded text corresponding to each decoding time according to the decoding time order to form a decoded text sequence.

[0174] like Figure 9 As shown, in Figure 10 In the example flow shown, S1003-S1005 are based on the semantic feature vector sequence (H1, H2, H3, ..., H...) through an attention mechanism. n The process of calculating the input vector, i.e. the semantic feature vector, at each decoding time by weighted sum of the vectors in the equation. As shown in S1003, for the initial decoding time, the attention weight sequence can be randomly generated; while for other non-initial decoding times, as shown in S1004, the semantic feature vector at the current time can be determined based on the decoding vector and semantic feature vector sequence of the previous decoding time.

[0175] Step S1006 relates to the decoding process of the first decoder (e.g., a recurrent neural network, RNN) at a non-initial decoding time. Specifically, in some embodiments, step S1006 may include: vectorizing the decoded text at the previous decoding time to obtain the decoded text word vector corresponding to the previous decoding time; concatenating the decoded text word vector corresponding to the previous decoding time and the decoded vector at the previous decoding time into a first input vector, and using the semantic feature vector corresponding to the current time as a second input vector; and inputting the first input vector and the second input vector into the recurrent neural network to calculate the decoded vector at the current decoding time.

[0176] like Figure 9 As shown, at the t-th decoding time, the decoded text A from the previous decoding time is... t-1 The corresponding vectorized representation (i.e., decoded text word vectors) a t-1 The decoding vector S at the previous decoding time step t-1 and the semantic feature vector K corresponding to the current decoding time. t Input the RNN (i.e., the first decoder) and compute the decoded vector S at the current decoding time. t Here, due to input format requirements, text A is decoded before being input into the RNN or the first decoder. t-1 The corresponding word vectors are then converted into decoded text word vectors a through vectorization. t-1 Then, the decoding vector at the current time (i.e., the t-th decoding time) is obtained by formula (3) as follows:

[0177] S t =f RNN ([a t-1 K t ], S t-1 (3)

[0178] In formula (3), S t The decoding vector at the t-th decoding moment, a t-1 The decoded text A represents the text at the (t-1)th decoding time. t-1 The corresponding decoded text word vector, Kt f represents the semantic feature vector corresponding to the t-th decoding time. RNN [] denotes the first decoder or RNN model, and [] denotes vector concatenation and union operations.

[0179] Compared with the decoding vector calculation method shown in formula (2), the decoding vector calculation method based on formula (3) adds the decoded text word vector a to the first decoder input. t-1 This allows the decoded vector output at the current moment to consider not only the decoded vector S output by the first decoder at the previous decoding moment. t-1 Also taking into account the decoded text A output by the second decoder at the previous decoding moment t-1 This allows the model input to incorporate more diverse and relevant features (such as contextual features), which benefits the output of the first decoder, i.e., the decoding vector S at the current decoding moment. t This more accurately reflects the overall semantic features of the text to be processed, especially the relationship between the problem to be processed (i.e., the first text) and the conditions (i.e., the second text), as well as the correlation features between the decoded texts. This makes the final output sequence of decoded text and / or target text more precisely reflect the reasoning process of the problem to be processed.

[0180] Figure 10 Steps S1007-S1008 shown involve the conversion process from the decoded vector to the decoded text at the current moment. For example... Figure 9 As shown, for the t-th decoding time, the decoding vector S output by the RNN (i.e., the first decoder) at the current decoding time is... t The input is given to the classifier (i.e., the second decoder) to determine S through classification prediction. t The category is determined, and based on the one-to-one correspondence between the preset category set to which the category belongs and the preset inference process related text set (as shown in the table), the decoded text A is determined. t Therefore A t It can reflect the relevant characteristics of the reasoning process corresponding to the problem to be solved.

[0181] Figure 11 This is an exemplary structural block diagram of a semantic understanding-based problem reasoning apparatus 1100 according to some embodiments of this application. Figure 11 As shown, the semantic understanding-based problem reasoning device 1100 may include a construction module 1110, an acquisition module 1120, an encoding module 1130, a decoding module 1140, and a determination module 1150.

[0182] The construction module 1110 can be configured to construct a problem reasoning model based on a deep neural network. The problem reasoning model includes an encoder for semantic encoding and a decoder for vector decoding. The acquisition module 1120 can be configured to acquire text to be processed, which includes first text indicating the problem to be processed and second text related to the problem to be processed. The encoding module 1130 can be configured to input the text to be processed into the encoder of the problem reasoning model to encode and output a semantic vector sequence corresponding to the text to be processed. The decoding module 1140 can be configured to input the semantic vector sequence into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order. Each decoded text in the decoded text sequence belongs to a preset set of texts related to the reasoning process, which is related to the second text. The determination module 1150 can be configured to determine the target text indicating the reasoning process of the problem to be processed based on the decoded text sequence.

[0183] It should be noted that the various modules described above can be implemented in software, hardware, or a combination of both. Multiple different modules can be implemented in the same software or hardware architecture, or a single module can be implemented by multiple different software or hardware architectures.

[0184] In the semantic understanding-based question reasoning apparatus according to some embodiments of this application, a question reasoning model is constructed by utilizing an encoder of a text semantic understanding model and a decoder for vector sequence to text. The question reasoning model performs semantic encoding and iterative decoding on the text to be processed (containing the question and related conditions) to achieve the conversion of the original text (i.e., the text to be processed, containing the question and conditions) into a decoded text sequence. Then, the target text (i.e., the reasoning process) corresponding to the question to be processed is obtained based on the decoded text sequence. This not only yields the logical reasoning process from the question and conditions to the result, but also allows for the direct deriving of the question answer based on the reasoning process. Compared to related question-answering systems or models that only output reasoning results, this application innovatively proposes predicting the reasoning process and reasoning logic (e.g., numerical operation logic for numerical problems such as data analysis) of the question through a semantic encoding process based on machine reading comprehension and a decoding process based on different decoding times, thereby naturally obtaining the reasoning result and significantly improving the interpretability of the question answer and the accuracy of the reasoning.

[0185] Figure 12An example block diagram of a computing device 1200 according to some embodiments of this application is illustrated schematically. The computing device 1200 may represent a device for implementing the various apparatuses or modules described herein and / or performing the various methods described herein. The computing device 1200 may be, for example, a server, desktop computer, laptop computer, tablet, smartphone, smartwatch, wearable device, or any other suitable computing device or computing system, which may include various levels of devices ranging from full-resource devices with large storage and processing resources to low-resource devices with limited storage and / or processing resources. In some embodiments, the above regarding... Figure 11 The semantic understanding-based problem reasoning apparatus 1100 described can be implemented in one or more computing devices 1200.

[0186] like Figure 12 As shown, the example computing device 1200 includes a processing system 1201 communicatively coupled to each other, one or more computer-readable media 1202, and one or more I / O interfaces 1203. Although not shown, the computing device 1200 may also include a system bus or other data and command transfer system that couples the various components to each other. The system bus may include any or a combination of different bus architectures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and / or a processor or local bus utilizing any of the various bus architectures. Alternatively, it may also include control and data lines.

[0187] Processing system 1201 represents the functionality of performing one or more operations using hardware. Therefore, processing system 1201 is illustrated as including hardware elements 1204 that can be configured as processors, function blocks, etc. This may include other logic devices implemented in hardware as application-specific integrated circuits (ASICs) or formed using one or more semiconductors. Hardware element 1204 is not limited by the materials in which it is formed or the processing mechanism employed therein. For example, a processor may consist of semiconductors and / or transistors (e.g., integrated circuits (ICs)). In such a context, processor-executable instructions may be electronically executable instructions.

[0188] Computer-readable medium 1202 is illustrated as including memory / storage device 1205. Memory / storage device 1205 represents a memory / storage device associated with one or more computer-readable media. Memory / storage device 1205 may include volatile media (such as random access memory (RAM)) and / or non-volatile media (such as read-only memory (ROM), flash memory, optical disk, magnetic disk, etc.). Memory / storage device 1205 may include fixed media (e.g., RAM, ROM, fixed hard disk drive, etc.) and removable media (e.g., flash memory, removable hard disk drive, optical disk, etc.). Exemplarily, memory / storage device 1205 may be used to store data such as text to be processed, first text, second text, raw tabular data, target text, etc., mentioned in the above embodiments. Computer-readable medium 1202 may be configured in various other ways as further described below.

[0189] One or more I / O (input / output) interfaces 1203 represent the functionality that allows a user to type commands and information into the computing device 1200 and also allows information to be displayed to the user and / or sent to other components or devices using various input / output devices. Examples of input devices include keyboards, cursor control devices (e.g., mice), microphones (e.g., for voice input), scanners, touch functionality (e.g., capacitive or other sensors configured to detect physical touch), cameras (e.g., capable of detecting non-touch-related movements as gestures using visible or invisible wavelengths (such as infrared frequencies), network interface cards (NICs), receivers, and so on). Examples of output devices include display devices, speakers, printers, haptic-responsive devices, network interface cards (NICs), transmitters, and so on.

[0190] The computing device 1200 also includes a problem reasoning strategy 1206. The problem reasoning strategy 1206 can be stored as computing program instructions in the memory / storage device 1205, or it can be hardware or firmware. The problem reasoning strategy 1206, together with the processing system 1201, etc., can implement [the following]: Figure 11 The description covers all the functions of each module of the semantic understanding-based problem reasoning device 1100.

[0191] This document describes various technologies in the general context of software, hardware, components, or program modules. Generally, these modules include routines, programs, objects, elements, components, data structures, etc., that perform specific tasks or implement specific abstract data types. The terms "module," "function," etc., as used herein generally refer to software, firmware, hardware, or a combination thereof. The technologies described herein are platform-independent, meaning that these technologies can be implemented on a variety of computing platforms with various processors.

[0192] Implementations of the described modules and technologies may be stored on or transmitted across some form of computer-readable medium. The computer-readable medium may include a variety of media accessible by the computing device 1200. By way of example and not limitation, the computer-readable medium may include "computer-readable storage media" and "computer-readable signal media".

[0193] In contrast to simple signal transmission, carrier waves, or signals themselves, a "computer-readable storage medium" refers to a medium and / or device capable of persistently storing information, and / or a tangible storage device. Therefore, a computer-readable storage medium refers to a non-signal-bearing medium. Computer-readable storage media include hardware such as volatile and non-volatile, removable and non-removable media and / or storage devices implemented using methods or techniques suitable for storing information (such as computer-readable instructions, data structures, program modules, logic elements / circuits, or other data). Examples of computer-readable storage media may include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, DVD or other optical storage devices, hard disks, magnetic tape cassettes, magnetic tapes, disk storage devices or other magnetic storage devices, or other storage devices, tangible media, or articles of art suitable for storing desired information and accessible by a computer.

[0194] "Computer-readable signal medium" refers to a signal-bearing medium configured to transmit instructions, such as via a network, to computing device 1200. A signal medium typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, data signal, or other transmission mechanism. Signal media also includes any information transmission medium. By way of example and not limitation, signal media includes wired media such as wired networks or direct connections, and wireless media such as acoustic, RF, infrared, and other wireless media.

[0195] As previously described, hardware element 1204 and computer-readable medium 1202 represent instructions, modules, programmable device logic, and / or fixed device logic implemented in hardware, which in some embodiments can be used to implement at least some aspects of the techniques described herein. Hardware elements may include components of integrated circuits or systems-on-a-chip, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), and other implementations or other hardware devices in silicon. In this context, hardware elements can serve as processing devices for executing program tasks defined by instructions, modules, and / or logic embodied by the hardware element, and as hardware devices for storing instructions for execution, such as the previously described computer-readable storage medium.

[0196] The foregoing combinations can also be used to implement the various techniques and modules described herein. Therefore, software, hardware, or program modules and other program modules can be implemented as one or more instructions and / or logic embodied on some form of computer-readable storage medium and / or by one or more hardware elements 1204. The computing device 1200 can be configured to implement specific instructions and / or functions corresponding to the software and / or hardware modules. Thus, modules can be implemented at least partially in hardware as modules executable as software by the computing device 1200, for example, by using the computer-readable storage medium and / or hardware elements 1204 of the processing system. Instructions and / or functions can be executed / operated by, for example, one or more computing devices 1200 and / or processing system 1201 to implement the techniques, modules, and examples described herein.

[0197] The techniques described herein can be supported by these various configurations of computing device 1200, and are not limited to specific examples of the techniques described herein.

[0198] In particular, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer programs. For example, embodiments of this application provide a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing at least one step in the method embodiments of this application.

[0199] In some embodiments of this application, one or more computer-readable storage media are provided, on which computer-readable instructions are stored. When executed, these computer-readable instructions implement a semantic understanding-based problem reasoning method according to some embodiments of this application. Each step of the semantic understanding-based problem reasoning method according to some embodiments of this application can be programmed into computer-readable instructions and stored in the computer-readable storage medium. When such a computer-readable storage medium is read or accessed by a computing device or computer, the computer-readable instructions therein are executed by a processor on the computing device or computer to implement the method described according to some embodiments of this application.

[0200] In the description of this specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0201] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed (including substantially simultaneously or in reverse order depending on the functions involved), as will be understood by those skilled in the art to which embodiments of this application pertain.

[0202] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0203] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0204] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by hardware associated with program instructions. The program can be stored in a computer-readable storage medium, and when executed, the program includes performing one or a combination of the steps of the method embodiments.

[0205] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

Claims

1. A problem reasoning method based on semantic understanding, comprising: A problem reasoning model is constructed based on a deep neural network, which includes an encoder for semantic encoding and a decoder for vector decoding. Obtain the text to be processed, which includes a first text indicating the problem to be processed and a second text related to the problem to be processed; The text to be processed is input into the encoder of the problem reasoning model to encode and output the semantic vector sequence corresponding to the text to be processed; The semantic vector sequence is input into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order. Each decoded text in the decoded text sequence belongs to a preset set of texts related to the reasoning process, and the preset set of texts related to the reasoning process is related to the second text. Based on the decoded text sequence, the target text indicating the reasoning process of the problem to be addressed is determined. Among them, each text in the preset reasoning process related text set indicates a construction process of various preset reasoning tree parent-child relationships determined according to preset reasoning tree syntax rules and the second text. Each preset reasoning tree parent-child relationship construction process includes the generation process from non-leaf node text as parent node to leaf node text sequence or non-leaf node text sequence as child node; and The step of determining the target text indicating the reasoning process of the problem to be processed based on the decoded text sequence includes: According to the decoding time sequence of each decoded text in the decoded text sequence, the preset parent-child relationship construction process indicated by each decoded text is executed sequentially to construct the reasoning tree corresponding to the problem to be processed; Following a depth-first traversal order, all leaf node texts of the inference tree are concatenated together to form target text indicating the reasoning process of the problem to be solved.

2. The method according to claim 1, wherein, The process of constructing the parent-child relationship of the preset inference tree indicated by each decoded text in the decoding time sequence to build the inference tree corresponding to the problem to be processed includes: The non-leaf node text that serves as the parent node during the construction of the parent-child relationship of the preset reasoning tree indicated by the decoded text at the initial decoding moment is determined as the root node of the reasoning tree; According to the decoding time sequence corresponding to each decoded text in the decoded text sequence, the following steps are performed sequentially for each decoded text: Following the depth-first traversal order, select the current non-leaf node from the nodes of the text that have been determined to be non-leaf nodes in the reasoning tree, and select the current non-leaf node whose child nodes have not yet been determined. In the process of constructing the parent-child relationship of the preset reasoning tree indicated by the current decoded text, each node text in the node text sequence that is a child node is determined as a child node of the current non-leaf node in order from left to right. The reasoning tree construction process ends when all nodes in the reasoning tree that are determined to be non-leaf nodes have determined their child nodes.

3. The method according to claim 1 or 2, wherein, The problem to be processed includes a numerical reasoning problem, and the target text includes a numerical operation logic expression corresponding to the numerical reasoning problem, wherein the numerical operation includes at least one of addition, subtraction, multiplication, division, exponentiation, and root extraction for the real number field.

4. The method according to claim 1, wherein, The problem reasoning model is trained through the following steps: Obtain a text dataset, wherein each text data in the text dataset includes a question text and conditional text related to the question; Obtain the reference reasoning process text corresponding to each text data in the text dataset; For each piece of text data, a reference reasoning tree is constructed based on the preset reasoning tree syntax rules and the corresponding reference reasoning process text. For each text data, the reference reasoning tree corresponding to the text data is transformed into a reference text sequence indicating the parent-child relationship between nodes by depth-first traversal, which serves as the sample label corresponding to the text data. Each text data in the text dataset is input into the question reasoning model, and the reasoning loss of the question reasoning model is calculated based on the output of the question reasoning model and the sample label corresponding to each text data. Based on the inference loss, the parameters of the problem inference model are iteratively updated until the inference loss meets the preset conditions.

5. The method according to claim 1, wherein, The step of inputting the text to be processed into the encoder of the problem reasoning model to encode and output the semantic vector sequence corresponding to the text to be processed includes: The text to be processed is segmented into words to obtain the word sequence corresponding to the text to be processed; Semantic understanding is performed on each word in the word sequence to obtain a semantic vector sequence corresponding to the text to be processed, wherein each semantic vector in the semantic vector sequence corresponds one-to-one with each word in the word sequence.

6. The method according to claim 1, wherein, The decoder includes a first decoder with a recurrent neural network structure and a second decoder with a classifier structure, and The step of inputting the semantic vector sequence into the decoder of the question reasoning model to decode and output the decoded text sequence in chronological order includes: The semantic vector sequence is transformed into a semantic feature vector sequence corresponding to the text to be processed, such that each semantic feature vector in the semantic feature vector sequence corresponds one-to-one with each decoding moment of the decoder; The semantic feature vector sequence is input into the first decoder to generate the decoded vector sequence corresponding to the text to be processed in a loop decoding manner; Each decoding vector in the decoding vector sequence is input into the second decoder to generate the decoded text sequence corresponding to the text to be processed in a classification prediction manner.

7. The method according to claim 6, wherein, The step of transforming the semantic vector sequence into a semantic feature vector sequence corresponding to the text to be processed, such that each semantic feature vector in the semantic feature vector sequence corresponds one-to-one with each decoding moment of the decoder, includes: For each decoding moment of the decoder, the following steps are performed in chronological order: In response to the current decoding time being the initial decoding time, an attention weight sequence corresponding to the current decoding time is randomly generated. In response to the current decoding time not being the initial decoding time, an attention weight sequence corresponding to the current decoding time is calculated based on the semantic vector sequence and the decoding vector of the previous decoding time. Each attention weight in the attention weight sequence corresponding to the current decoding time corresponds one-to-one with each semantic vector in the semantic vector sequence. Based on the attention weight sequence corresponding to the current decoding time and its correspondence with the semantic vector sequence, the semantic vector sequence is weighted and summed to obtain the semantic feature vector corresponding to the current decoding time. The semantic feature vectors corresponding to each decoding moment are combined in the order of the decoding time to form a semantic feature vector sequence.

8. The method according to claim 6, wherein, The step of inputting the semantic feature vector sequence into the first decoder to generate the decoded vector sequence corresponding to the text to be processed in a cyclic decoding manner includes: Calculate the decoding vector corresponding to the initial decoding time based on the semantic feature vector at the initial decoding time; For each decoding time after the initial decoding time of the decoder, the decoding vector of the current decoding time is calculated based on the semantic feature vector corresponding to the current decoding time and the decoding vector of the previous decoding time. The decoding vectors of each decoding moment are combined in the order of the decoding moments of the decoder to obtain the decoding vector sequence corresponding to the text to be processed.

9. The method according to claim 6, wherein, The step of inputting each decoded vector in the decoded vector sequence into the second decoder to generate the decoded text sequence corresponding to the text to be processed according to the classification prediction method includes: The second decoder is used to predict the category to which each decoded vector in the decoded vector sequence belongs. The category comes from a preset category set, and the preset category set corresponds one-to-one with the preset inference process related text set. For each decoding vector in the decoding vector sequence, the reasoning process related text corresponding to the category to which the decoding vector belongs is determined according to the correspondence between the preset category set and the preset reasoning process related text set, and is used as the decoding text corresponding to the decoding vector; According to the order of the decoding times corresponding to each decoding vector in the decoding vector sequence, the decoded text corresponding to each decoding vector is combined together to form a decoded text sequence.

10. The method according to claim 1, wherein, The step of determining the target text indicating the reasoning process of the problem to be processed based on the decoded text sequence includes: The decoded texts in the decoded text sequence are concatenated in sequence to form target text that indicates the reasoning process of the problem to be solved.

11. The method according to claim 1, wherein, The decoder includes a first decoder with a recurrent neural network structure and a second decoder with a classifier structure, and The step of inputting the semantic vector sequence into the decoder of the question reasoning model to decode and output the decoded text sequence in chronological order includes: For each decoding moment of the decoder, the following steps are performed sequentially according to the order of the decoding moments: In response to the current decoding time being the initial decoding time, an attention weight sequence corresponding to the current decoding time is randomly generated. In response to the current decoding time not being the initial decoding time, an attention weight sequence corresponding to the current decoding time is calculated based on the semantic vector sequence and the decoding vector of the previous decoding time, wherein each attention weight in the attention weight sequence corresponding to the current decoding time corresponds one-to-one with each vector in the semantic vector sequence. By utilizing the correspondence between the attention weight sequence corresponding to the current decoding time and the semantic vector sequence, the semantic vector sequence is weighted and summed to obtain the semantic feature vector corresponding to the current decoding time; Using the first decoder, the decoding vector at the current decoding time is calculated based on the decoded text at the previous decoding time, the decoding vector at the previous decoding time, and the semantic feature vector at the current decoding time. The second decoder is used to predict the category to which the decoding vector belongs at the current decoding moment. The category comes from a preset category set, and the preset category set corresponds one-to-one with the preset inference process related text set. Based on the correspondence between the preset category set and the preset inference process related text set, the inference process related text corresponding to the category to which the decoding vector belongs at the current decoding moment is determined, and used as the decoding text at the current decoding moment; According to the order of the decoding times of the decoder, the decoded text corresponding to each decoding time is combined together to form a decoded text sequence.

12. The method according to claim 11, wherein, The step of using the first decoder to calculate the decoding vector at the current decoding time based on the decoded text at the previous decoding time, the decoding vector at the previous decoding time, and the semantic feature vector corresponding to the current decoding time includes: The decoded text from the previous decoding time is vectorized to obtain the word vectors of the decoded text corresponding to the previous decoding time. The decoded text word vector corresponding to the previous decoding time and the decoded vector of the previous decoding time are concatenated into a first input vector, and the semantic feature vector corresponding to the current decoding time is used as a second input vector. The first input vector and the second input vector are input into the first decoder to calculate the decoded vector at the current decoding time.

13. The method according to claim 1, wherein, The process of obtaining the text to be processed includes: Obtain the first text indicating the problem to be processed and the original table data corresponding to the problem to be processed; Convert the original table data into text data; Retrieve a second text related to the problem to be addressed from the text data; The first and second texts are concatenated to obtain the text to be processed.

14. A problem reasoning device based on semantic understanding, comprising: A building module configured to construct a problem reasoning model based on a deep neural network, the problem reasoning model including an encoder for semantic encoding and a decoder for vector decoding; An acquisition module is configured to acquire text to be processed, the text to be processed including a first text indicating a problem to be processed and a second text related to the problem to be processed; An encoding module is configured to input the text to be processed into the encoder of the problem reasoning model to encode and output a semantic vector sequence corresponding to the text to be processed; A decoding module is configured to input the semantic vector sequence into the decoder of the problem reasoning model to decode and output a decoded text sequence in chronological order. Each decoded text in the decoded text sequence belongs to a preset set of texts related to the reasoning process, and the preset set of texts related to the reasoning process is related to the second text. A determination module is configured to determine, based on the decoded text sequence, target text that indicates the reasoning process of the problem to be processed. Among them, each text in the preset reasoning process related text set indicates a construction process of various preset reasoning tree parent-child relationships determined according to preset reasoning tree syntax rules and the second text. Each preset reasoning tree parent-child relationship construction process includes the generation process from non-leaf node text as parent node to leaf node text sequence or non-leaf node text sequence as child node; and The step of determining the target text indicating the reasoning process of the problem to be processed based on the decoded text sequence includes: According to the decoding time sequence of each decoded text in the decoded text sequence, the preset parent-child relationship construction process indicated by each decoded text is executed sequentially to construct the reasoning tree corresponding to the problem to be processed; Following a depth-first traversal order, all leaf node texts of the inference tree are concatenated together to form target text indicating the reasoning process of the problem to be solved.

15. A computing device, comprising: Memory and processor The memory contains a computer program that, when executed by the processor, causes the processor to perform the method of any one of claims 1-13.

16. A computer-readable storage medium storing computer-readable instructions thereon, which, when executed, implement the method of any one of claims 1-13.

17. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-13.

Citation Information

Patent Citations

  • Problem generation method and device, equipment and storage medium

    CN110162613A