Question and answer data processing method, answer generation method, storage medium, program product and computer equipment

By processing the attention information of question-and-answer data and converting it into target meta-attention information suitable for question-and-answer models to generate answers, the problem of low accuracy of question-and-answer models is solved, and more efficient answer generation is achieved.

CN121833890APending Publication Date: 2026-04-10CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511993368.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing question-answering models struggle to adapt to diverse and dynamic user needs, resulting in low accuracy in their output responses.

Method used

By acquiring question-and-answer data that matches the first meta-attention information, the first question-and-answer attention information of the question-and-answer data is determined, and when the information capacity is higher than a threshold, it is converted into the second question-and-answer attention information. The target meta-attention information is determined by combining the conversion relationship and the first meta-attention information to assist the question-and-answer model in generating answers.

Benefits of technology

It improves the accuracy and reliability of the question-answering model's output answers, reduces the computational power requirements and interference during answer generation, and enhances the accuracy of the answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833890A_ABST
    Figure CN121833890A_ABST
Patent Text Reader

Abstract

The invention discloses a question and answer data processing method, an answer generation method, a storage medium, a program product and computer equipment. The method comprises the steps of obtaining question and answer data matched with first meta attention information; determining first question and answer attention information of the question and answer data; under the condition that the information capacity of the first question and answer attention information is higher than an information capacity threshold value corresponding to the first element attention information, converting the first question and answer attention information into second question and answer attention information matched with the first element attention information, the first question-answer attention information and the second question-answer attention information are acquired, a conversion relation between the first question-answer attention information and the second question-answer attention information is determined, target element attention information is determined based on the conversion relation and the first element attention information, and the target element attention information is used as one of bases adopted when the question-answer model generates answers. The accuracy of answers output by the question and answer model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a question and answer data processing method, a response generation method, a storage medium, a program product and a computer device. BACKGROUND

[0002] With the development of technology, automatic question and answer systems are increasingly widely used in various industries.

[0003] In the related art, artificial intelligence technology is introduced to improve the intelligence of the automatic question and answer system. Artificial intelligence technology usually needs to use existing data as samples to train a model, so that the model can output answers in response to input questions. However, a pre-trained model is usually difficult to adapt to the dynamic needs of users, and the accuracy of the output answers is not high. SUMMARY

[0004] To solve the above technical problems, the embodiments of the present application provide a question and answer data processing method, a response generation method, a storage medium, a program product and a computer device, which can improve the accuracy of the answers output by the question and answer model.

[0005] In a first aspect, the embodiments of the present application provide a question and answer data processing method, comprising: obtaining question and answer data matched with first meta-attention information; determining first question and answer attention information of the question and answer data; in a case where an information capacity of the first question and answer attention information is higher than an information capacity threshold corresponding to the first meta-attention information, converting the first question and answer attention information into second question and answer attention information matched with the first meta-attention information, determining a conversion relationship between the first question and answer attention information and the second question and answer attention information, and determining target meta-attention information based on the conversion relationship and the first meta-attention information, wherein the target meta-attention information is used as one of the bases for the question and answer model when generating answers.

[0006] Optionally, the question and answer data includes corresponding question data and answer data. The determination of the first question and answer attention information of the question and answer data includes: determining question data attention information of the question data and answer data attention information of the answer data; determining the first question and answer attention information based on the question data attention information and the answer data attention information.

[0007] Optionally, the conversion of the first question and answer attention information into the second question and answer attention information matched with the first meta-attention information includes: pads the first question-answer attention information to form the second question-answer attention information, wherein an information capacity of the second question-answer attention information matches an information capacity of the first meta attention information.

[0008] Optionally, the determining the target meta attention information based on the conversion relationship and the first meta attention information comprises: converting the first meta attention information into second meta attention information based on the conversion relationship; generating third meta attention information based on the conversion relationship and the first meta attention information; determining the target meta attention information based on the third meta attention information, the second meta attention information and the first meta attention information.

[0009] Optionally, the determining the target meta attention information based on the third meta attention information, the second meta attention information and the first meta attention information comprises: determining a conversion error based on a difference between the third meta attention information and the second meta attention information; performing double-path correction alignment on the third meta attention information and the second meta attention information based on the conversion error to obtain compensation attention information; determining the target meta attention information based on the compensation attention information and the first meta attention information.

[0010] In a second aspect, an answer generation method is provided, comprising: obtaining a question; inputting the question into a question-answer model to obtain an answer output by the question-answer model; The question-answer model is configured to generate the answer based on the question and the obtained target meta attention information, and the target meta attention information is obtained according to the question-answer data processing method of any one of the first aspect.

[0011] Optionally, the question-answer model comprises a convolutional neural network (CNN) model and an attention deep learning model. The CNN model is configured to convert the question into embedding information using grouped normalization. The attention deep learning model is configured to generate the answer output by the question-answer model based on the target meta attention information and the embedding information in response to the embedding information.

[0012] Thirdly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the above-mentioned embodiments.

[0013] Fourthly, embodiments of this application provide a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method described in any of the above-described embodiments.

[0014] Fifthly, embodiments of this application provide a computer device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the preceding claims.

[0015] In summary, the embodiments of this application have at least the following beneficial effects: In this embodiment, question-and-answer data matching the first meta-attention information is acquired; first question-and-answer attention information of the question-and-answer data is determined; when the information capacity of the first question-and-answer attention information is higher than the information capacity threshold corresponding to the first meta-attention information, the first question-and-answer attention information is converted into second question-and-answer attention information matching the first meta-attention information, and the conversion relationship between the first question-and-answer attention information and the second question-and-answer attention information is determined; and, based on the conversion relationship and the first meta-attention information, target meta-attention information is determined, wherein the target meta-attention information is used as one of the bases adopted by the question-and-answer model when generating answers. Thus, by processing the first meta-attention information and its matching question-and-answer data, target meta-attention information used to assist the question-and-answer model in generating answers can be obtained, thereby improving the accuracy of the answers output by the question-and-answer model. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the question-and-answer data processing method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the matrix corresponding to the first-order attention information provided in the embodiments of this application; Figure 3 This is a schematic diagram of attention information filling provided in an embodiment of this application; Figure 4 This is a schematic diagram of the answer generation method provided in an embodiment of this application; Figure 5 This is a schematic diagram of the CNN model provided in the embodiments of this application; Figure 6 This is a schematic diagram of the attention deep learning model provided in the embodiments of this application; Figure 7This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments / examples are only a part of the embodiments / examples of this application, and not all of the embodiments / examples. Based on the embodiments / examples in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0018] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "multiple" means two or more. In the description of this application, the term "comprising" and its variations are open-ended, meaning "including but not limited to." The term "based on" means "at least partially based on." The term "according to" means "at least partially according to." The term "one embodiment / example" means "at least one embodiment / example"; the term "another embodiment / example" means "at least one additional embodiment / example"; the term "some embodiments / examples" means "at least some embodiments / examples."

[0019] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0020] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the application. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0021] Firstly, see [the following] Figure 1The diagram shows a flowchart of a question-and-answer data processing method provided in an embodiment of this application. This question-and-answer data processing method can be applied to a computer device with data processing capabilities. The method includes S101-S103, as detailed below.

[0022] S101, Obtain question-and-answer data that matches the first-order attention information.

[0023] In some examples, the first meta-attention information may include attention information generated based on sample question-and-answer data, and / or target meta-attention information obtained in the previous cycle.

[0024] In some examples, the question-and-answer data may include data in one or more modalities, which may include at least one of the following: text modality, audio modality, video modality, image modality, etc., which are not specifically limited in this application embodiment.

[0025] In some examples, the question-answering data may include at least one question-answer pair that is semantically similar to the first-order attention information, and each question-answer pair may include question information and its corresponding answer information.

[0026] In some examples, the “attention information” described in any one or more embodiments of this application can be determined by the corresponding “attention head vector (or simply head vector)”.

[0027] In some examples, the sample question-and-answer data used to determine the first-order attention information may include at least one question and at least one answer corresponding to that question, represented by the question head vector corresponding to the i-th question. The answer head vector corresponding to the i-th answer is represented as follows: For example, the question head vector corresponding to each question can be... Constructing a question attention matrix The answer header vector corresponding to each answer. Constructing an attention matrix for the answer Thus, the first-order attention information can include the question attention matrix. and the attention matrix of the answer Alternatively, the first-order attention information can be derived from the question attention matrix. and the attention matrix of the answer Obtained by combination.

[0028] Due to subsequent targeting , The processing procedures performed are similar, and for ease of description, they will be referred to as matrices thereafter. to indicate or (It's not hard to understand, matrix) Other subscripts can also be used to represent the matrix. In different states at different processing stages, and similarly for question-and-answer data processing, it is also possible to use... , (To represent the question attention matrix and answer attention matrix corresponding to the question-answer data), and also in the form of vectors. to indicate or (Similarly, vectors) It can also include other subscripts to represent the vector. (Different states at different processing stages).

[0029] In addition, the following Let represent the matrix corresponding to the first-order attention information.

[0030] S102, determine the first question-and-answer attention information of the question-and-answer data.

[0031] In some examples, the extraction described above can be referenced. , The method to obtain the question and answer data , This forms the first question-and-answer attention information.

[0032] S103, when the information capacity of the first question-answering attention information is higher than the information capacity threshold corresponding to the first meta-attention information, the first question-answering attention information is converted into second question-answering attention information that matches the first meta-attention information, and the conversion relationship between the first question-answering attention information and the second question-answering attention information is determined. Based on the conversion relationship and the first meta-attention information, target meta-attention information is determined, wherein the target meta-attention information is used as one of the bases adopted by the question-answering model when generating answers.

[0033] What can be understood here is that if the attention information of the question-and-answer data that matches the first-order attention information is directly added to the first-order attention information to form the target-order attention information (for example, converting each question in the question-and-answer data into a corresponding head vector and concatenating it with the question attention matrix of the first-order attention information), then... In this process, each answer in the question-and-answer data is converted into a corresponding head vector and concatenated with the answer attention matrix of the first-order attention information. In the case of excessively complex target attention information, the amount of information in the target attention information can easily increase continuously. Once it reaches a certain level, the computational power required to access this target attention information becomes unreasonably large. Furthermore, overly complex target attention information can lead to excessive interference during answer generation, affecting the accuracy and reliability of the generated answer. For more details, please refer to... Figure 2 Assuming vector It is a head vector of the question-answering data, which needs to be added to the matrix corresponding to the first-order attention information. The corresponding meta-attention information is recalculated based on the new matrix (for example, the self-attention output corresponding to each head vector in the new matrix is ​​calculated separately to obtain the self-attention outputs corresponding to the new i+1 head vectors, which are then concatenated and weighted to obtain the recalculated meta-attention information). It can be seen that in this scheme, a set of data (one head vector) is added to the matrix at once, thus regenerating the matrix... It adds an extra order after each iteration, which has a huge impact on the computational performance in actual operations, making it difficult to implement in a real production environment.

[0034] Accordingly, in this embodiment, after the information capacity of the first question-and-answer attention information accumulates to a certain level (above the information capacity threshold), the first meta-attention information is used as the conversion target to convert the first question-and-answer attention information into the second question-and-answer attention information. The target meta-attention information is then regenerated by combining the conversion relationship with the first meta-attention information, so that the target meta-attention information can carry the features of the first question-and-answer attention information. This facilitates iterative optimization of the meta-attention information. Compared with directly adding the first question-and-answer attention information to the first meta-attention information, which can easily lead to an excessive amount of information in the meta-attention information, the method in this embodiment does not require adding too much information directly to the meta-attention information. This reduces the computing power required to call the target meta-attention information and also reduces interference from the target meta-attention information when generating answers, thereby improving the accuracy and reliability of the generated answers.

[0035] For ease of description, the following embodiments of this application will be referred to as To represent the question attention matrix corresponding to the "question-answer data" and / or the attention matrix of the answers corresponding to the "question-answer data" .

[0036] In some examples, for matrices, the information capacity of the matrix can be measured by its dimension. Therefore, this information capacity threshold can be determined by the matrix corresponding to the first-order attention information. medium matrix The dimension is obtained by multiplying it by a preset ratio (less than 1). It can represent or Thus, it can be determined by judgment The information capacity of the first question-and-answer attention information is determined by whether the dimension of the information exceeds the information capacity threshold. For example, the preset ratio can be 10%.

[0037] In one optional implementation, the question-and-answer data includes corresponding question data and answer data; The first question-answering attention information for determining the question-answering data includes: Determine the question data attention information of the question data and the answer data attention information of the answer data; Based on the question data attention information and the answer data attention information, the first question-answer attention information is determined.

[0038] In some examples, the question data may include at least one question, and the answer data may include at least one answer. The at least one question and the at least one answer can correspond one-to-one. The attention information of the question data can be represented by an attention matrix composed of the head vectors corresponding to the at least one question, and the attention information of the answer data can be represented by an attention matrix composed of the head vectors corresponding to the at least one answer. Then, the first question-and-answer attention information can be obtained by concatenating the attention matrices corresponding to the question data attention information and the answer data attention information respectively.

[0039] In an optional implementation, converting the first question-answering attention information into second question-answering attention information that matches the first meta-attention information includes: The first question-and-answer attention information is filled to form the second question-and-answer attention information, wherein the information capacity of the second question-and-answer attention information is matched with the information capacity of the first meta-attention information.

[0040] In some examples, attention information corresponding to the first question answer can be... and (This will be used consistently from now on) (to represent) to fill in, so that the matrix corresponding to the second question-and-answer attention information formed after filling is... The dimension can be matched to the matrix corresponding to the first-order attention information. The dimensions, for example, can be seen in [reference 1]. Figure 3 Assuming matrix If each head vector h contains the same number of elements, then at this time... The dimension can actually be understood as being determined by the number of rows in the matrix, that is, by the number of head vectors h. Let there be i head vectors h. Accordingly, assume... The number of elements contained in each head vector h is also equal to The number of elements contained in any head vector h is then With the corresponding (For example, when) express At that time, the corresponding express The dimensional differences between the question attention matrices (related to questions) can be compared by the number of rows, which can be made... The dimension equals The dimension, so that The dimension can be matched to the matrix corresponding to the first-order attention information. The dimension. The information to be filled can be from an empty dataset. .

[0041] In some examples, the attention information corresponding to the first question answer The attention information corresponding to the second question and answer The conversion between them can be expressed by the following formula: Thus, a matrix can be used. This is used to represent the above transformation relationship.

[0042] In one optional implementation, determining the target meta-attention information based on the transformation relationship and the first meta-attention information includes: Based on the transformation relationship, the first meta-attention information is transformed into the second meta-attention information; Based on the transformation relationship and the first-order attention information, the third-order attention information is generated; The target attention information is determined based on the third-dimensional attention information, the second-dimensional attention information, and the first-dimensional attention information.

[0043] In some examples, the matrix corresponding to the relationship can be transformed. To obtain the matrix corresponding to the first-order attention information Converted into second-order attention information The specific formula is as follows: .

[0044] However, in reality, and There will generally be some errors between them, so these errors can be processed to obtain more accurate results. Here, we can assume that the matrix corresponding to the transformation relationship... The matrix corresponding to the first-order attention information Direct multiplication yields the matrix corresponding to the third-order attention information. and combined , and The target element attention information is obtained through computation.

[0045] In one optional implementation, determining the target meta-attention information based on the third-meta-attention information, the second-meta-attention information, and the first-meta-attention information includes: Based on the difference between the third-order attention information and the second-order attention information, the conversion error is determined; Based on the conversion error, the third-order attention information and the second-order attention information are corrected and aligned in a dual-path manner to obtain compensated attention information. Based on the compensated attention information and the first meta-attention information, the target meta-attention information is determined.

[0046] In some examples, it is assumed that the above error takes the value of ,but: .

[0047] In this way, it can be (Right now The difference between them) is used as the conversion error, and is used as a correction value for... and Perform dual-path correction alignment to obtain compensated attention information (For example) (Originally obtained after correction)

[0048] In some examples, dual-path correction alignment can refer to utilizing... As correction values, respectively for and These two data paths (dual paths) are adjusted to achieve the following: and They can be approximately equal to achieve corrected alignment. For example, they can be approximated as equal. Subtract correction value To obtain the first revision and use Add correction value To obtain the first revision And compare with the initial revision Compared with the first revision If the two paths are equal (or the error is within a reasonable threshold range), then the corrected dual paths can be considered aligned. If not, the correction process can be iterated until the corrected dual paths are aligned. The corrected path obtained after alignment is then used. As compensation for attention information .

[0049] In some examples, compensatory attention information can be used. The matrix corresponding to the first-order attention information The matrices are added together to obtain the matrix corresponding to the target element attention information, and thus the target element attention information is obtained.

[0050] Secondly, see Figure 4 The diagram shows a flowchart of an answer generation method provided in an embodiment of this application. The answer generation method can be applied to a computer device with data processing capabilities. The method includes steps S401-S402, as detailed below.

[0051] S401, Problem Found.

[0052] S402, input the question into the question-answering model and obtain the answer output by the question-answering model.

[0053] The question-answering model is used to generate the answer based on the question and the obtained target meta-attention information, wherein the target meta-attention information is obtained according to the question-answering data processing method described in any one of the first aspects above.

[0054] In one optional implementation, the question-answering model includes a CNN (Convolutional Neural Network) model and an attention-based deep learning model; The CNN model is used to convert the problem into embedded information using grouping normalization; The attention deep learning model is used to respond to the embedding information and generate the answer output by the question answering model based on the target meta-attention information and the embedding information.

[0055] In some examples, see Figure 5This diagram illustrates a CNN model provided in an embodiment of this application. This CNN model can be implemented based on Group Normalization. Group Normalization can be used to indicate that the output or input channels of a certain convolutional layer in a CNN are grouped, and the relevant information of the output or input channels is statistically analyzed within each group. Specifically, this CNN model can be an optimized structure that combines a convolutional neural network (CNN) with Group Normalization. Its core idea is to group the channel dimensions after the output of the convolutional layer and perform statistical normalization within each group, thereby improving the stability and generalization ability of the model training. Here, G(1), G(n-1), and G(n) represent the 1st group, the (n-1)th group, and the nth group, respectively. A "group" refers to n groups (groups) into which all output channels are divided, and each group contains a certain number of consecutive channels. Each set represents a set of channels; for example, S(n-1) is the set of channels corresponding to the (n-1)th group, and S(n) is the set of channels corresponding to the nth group.

[0056] In some examples, see Figure 6This diagram illustrates an attention deep learning model provided in an embodiment of this application. This attention deep learning model can be an improved Transformer model, receiving Input Embeddings from a CNN model. It may include Dynamic Multi-Head Attention. Specifically, this attention deep learning model can be an improved Transformer based on an encoder-decoder structure, its core feature being the introduction of a Dynamic Multi-Head Attention mechanism to enhance the model's adaptive modeling ability for input sequences. Positional Encoding can be used to add positional information to the Input Embedding, enabling the model to perceive sequence order. Dynamic Multi-Head Attention can be used to iteratively optimize the target meta-attention information according to any one of the methods described in the first aspect above (e.g., using the previous target meta-attention information as the current first meta-attention information). A Feed Forward network is used to introduce nonlinear transformations at each position through an independent two-layer fully connected network. Add&Norm represents residual connections and layer normalization. Adding residual connections and layer normalization after the attention module and feedforward network helps improve gradient propagation and training stability. Masked Multi-Head Attention can be used in the decoder to prevent the current position from seeing future information, thus improving the accuracy of the autoregressive generation process. Multi-Head Attention, the standard multi-head attention used in the encoder, can be used to capture global dependencies in the input sequence. Output Embedding can be used to convert the decoder output into embedding vectors in the vocabulary space. Linear layers and Softmax layers can be used to project the final output to a dimension equal to the vocabulary size, and the probability distribution of each word is obtained through Softmax. Output Probabilities are the probability distribution of the model's predicted next word.

[0057] Thirdly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the above-mentioned embodiments.

[0058] Fourthly, embodiments of this application provide a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method described in any of the above-described embodiments.

[0059] Fifthly, embodiments of this application provide a computer device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the preceding claims.

[0060] See Figure 7 The computer device in this embodiment includes a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701, such as a question-and-answer data processing program and an answer generation program. When the processor 701 executes the computer program, it implements the steps in the various question-and-answer data processing methods and answer generation methods described above, for example... Figure 1 Steps S101-S103 shown or Figure 4 The steps S401-S402 are shown.

[0061] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 702 and executed by the processor 701 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the computer device.

[0062] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor 701 and a memory 702. Those skilled in the art will understand that the schematic diagram is merely an example of a computer device and does not constitute a limitation on the computer device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.

[0063] The processor 701 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or processor 701 can be any conventional processor. The processor 701 is the control center of the computer device, connecting various parts of the entire computer device through various interfaces and lines.

[0064] The memory 702 can be used to store the computer programs and / or modules. The processor 701 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 702 and calling the data stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0065] Wherein, if the modules / units integrated into the computer device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a non-transitory computer-readable storage medium. When the computer program is executed by the processor 701, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0066] In summary, the embodiments of this application have at least the following beneficial effects: In this embodiment, question-and-answer data matching the first meta-attention information is acquired; first question-and-answer attention information of the question-and-answer data is determined; when the information capacity of the first question-and-answer attention information is higher than the information capacity threshold corresponding to the first meta-attention information, the first question-and-answer attention information is converted into second question-and-answer attention information matching the first meta-attention information, and the conversion relationship between the first question-and-answer attention information and the second question-and-answer attention information is determined; and, based on the conversion relationship and the first meta-attention information, target meta-attention information is determined, wherein the target meta-attention information is used as one of the bases adopted by the question-and-answer model when generating answers. Thus, by processing the first meta-attention information and its matching question-and-answer data, target meta-attention information used to assist the question-and-answer model in generating answers can be obtained, thereby improving the accuracy of the answers output by the question-and-answer model.

[0067] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary hardware platforms, or it can be implemented entirely by hardware. Based on this understanding, all or part of the technical solutions of this application that contribute to the background technology can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0068] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.

Claims

1. A question-and-answer data processing method, characterized in that, include: Obtain question-and-answer data that matches the first-order attention information; Determine the first question-and-answer attention information of the question-and-answer data; If the information capacity of the first question-answering attention information is higher than the information capacity threshold corresponding to the first meta-attention information, the first question-answering attention information is converted into second question-answering attention information that matches the first meta-attention information, and the conversion relationship between the first question-answering attention information and the second question-answering attention information is determined. Based on the conversion relationship and the first meta-attention information, target meta-attention information is determined, wherein the target meta-attention information is used as one of the bases adopted by the question-answering model when generating answers.

2. The method according to claim 1, characterized in that, The question-and-answer data includes corresponding question data and answer data; The first question-answering attention information for determining the question-answering data includes: Determine the question data attention information of the question data and the answer data attention information of the answer data; Based on the question data attention information and the answer data attention information, the first question-answer attention information is determined.

3. The method according to claim 1, characterized in that, The step of converting the first question-answering attention information into second question-answering attention information that matches the first meta-attention information includes: The first question-and-answer attention information is filled to form the second question-and-answer attention information, wherein the information capacity of the second question-and-answer attention information is matched with the information capacity of the first meta-attention information.

4. The method according to claim 1, characterized in that, The step of determining the target meta-attention information based on the transformation relationship and the first meta-attention information includes: Based on the transformation relationship, the first meta-attention information is transformed into the second meta-attention information; Based on the transformation relationship and the first-order attention information, the third-order attention information is generated; The target attention information is determined based on the third-dimensional attention information, the second-dimensional attention information, and the first-dimensional attention information.

5. The method according to claim 4, characterized in that, The step of determining the target meta-attention information based on the third-meta-attention information, the second-meta-attention information, and the first-meta-attention information includes: Based on the difference between the third-order attention information and the second-order attention information, the conversion error is determined; Based on the conversion error, the third-order attention information and the second-order attention information are corrected and aligned in a dual-path manner to obtain compensated attention information. Based on the compensated attention information and the first meta-attention information, the target meta-attention information is determined.

6. A method for generating answers, characterized in that, include: Get the question; The question is input into the question-answering model, and the answer is output by the question-answering model. The question-answering model is used to generate the answer based on the question and the obtained target meta-attention information, wherein the target meta-attention information is obtained by the question-answering data processing method according to any one of claims 1-5.

7. The method according to claim 6, characterized in that, The question-answering model includes a convolutional neural network (CNN) model and an attention-based deep learning model. The CNN model is used to convert the problem into embedded information using grouping normalization; The attention deep learning model is used to respond to the embedding information and generate the answer output by the question answering model based on the target meta-attention information and the embedding information.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-7.

9. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method described in any one of claims 1-7.

10. A computer device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the method of any one of claims 1-7.