Question and answer task processing method and device, equipment, storage medium and program product

By determining the target instance with the highest similarity to the input problem in the question-answer task processing and retrieving the highest similarity LORA module from the pre-trained LORA module library for fusion processing, the problem of direct training of the model requires a large amount of data and high computing resources. Achieve the improvement of cross-task generalization performance.

CN119441453AActive Publication Date: 2025-02-14INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411285071.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-02-14
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

In the prior art, direct training of models requires a large amount of training data and consumes a lot of computing resources, making it difficult to effectively solve the problem of cross-task generalization of large language models.

Method used

By obtaining input questions and Q&A examples of Q&A tasks, determine the target instance with the highest similarity to the input questions, determine the multiple LORA modules with the highest similarity from the pre-trained low-rank adaptation LORA module library, and adopt non-gradient parameter optimization The technology integrates multiple LORA modules with the first question and answer model to obtain the second question and answer model to obtain the corresponding answer.

Benefits of technology

Parameter fusion is performed through the target instance retrieval of multiple LORA modules, which improves the possibility of the question-and-answer model using limited instance data to capture the potential specificity of input, achieves the improvement of cross-task generalization performance, and achieves this effect at a lower cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441453A_ABST
    Figure CN119441453A_ABST
Patent Text Reader

Abstract

The invention provides a question and answer task processing method and device, equipment, a storage medium and a program product, and is applied to the technical field of natural language processing. The method comprises the steps of obtaining an input question and a question and answer instance of a question and answer task; determining a target instance having the highest similarity with the input question from the question and answer instances, and determining a plurality of LORA modules having the highest similarity with the target instance from a pre-trained low-rank adaptive LORA module library; performing fusion processing on the LORA modules and the first question and answer model by adopting a non-gradient parameter optimization technology to obtain a second question and answer model, and inputting the input question into the second question and answer model to obtain a corresponding answer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing technology, and in particular to a question-answering task processing method, device, equipment, storage medium and program product. Background Art

[0002] In the field of natural language processing, large language models are usually not good at handling unseen tasks. The so-called unseen tasks are completely new tasks outside the pre-training tasks of the large language models.

[0003] In the prior art, the most direct way to solve the cross-task generalization problem of large language models is to continue pre-training the model. However, direct model training requires a large amount of training data, and due to the influence of gradient back propagation, it also consumes more computing resources. Summary of the invention

[0004] The present invention provides a question-answering task processing method, device, equipment, storage medium and program product, which are used to solve the problem in the prior art that directly training a model requires a large amount of training data and consumes a lot of computing resources.

[0005] The present invention provides a question-answering task processing method, comprising: obtaining an input question and a question-answering instance of a question-answering task; determining a target instance with the highest similarity to the input question from the question-answering instance, and determining multiple LORA modules with the highest similarity to the target instance from a pre-trained low-rank adapted LORA module library; using a non-gradient parameter optimization technology to fuse the multiple LORA modules with a first question-answering model to obtain a second question-answering model, and inputting the input question into the second question-answering model to obtain a corresponding answer.

[0006] According to a question and answer task processing method provided by the present invention, the determining of the target instance with the highest similarity to the input question from the question and answer instance includes: based on a sentence vectorization model, performing feature extraction on the input and output of the question and answer instance to obtain the instance feature vector of the question and answer instance, and performing feature extraction on the input question to obtain the input feature vector; calculating the cosine similarity between the input feature vector and each instance feature vector, and determining the question and answer instance corresponding to the instance feature vector with the highest similarity as the target instance.

[0007] According to a question-answering task processing method provided by the present invention, the multiple LORA modules with the highest similarity to the target instance are determined from a pre-trained low-rank adapted LORA module library, including: based on a sentence vectorization model, each training data in a training data set of the LORA module is vectorized, and the vector average value of the training data set is determined as the representative vector of the LORA module; the cosine similarity between the instance feature vector of the target instance and the representative vector of each LORA module is calculated; the LORA modules in the LORA module library are sorted in order of cosine similarity from high to low, and the multiple LORA modules with the highest similarity are determined.

[0008] According to a question-answering task processing method provided by the present invention, the multiple LORA modules are fused with the first question-answering model using non-gradient parameter optimization technology to obtain a second question-answering model, including: adjusting the fusion parameters using non-gradient parameter optimization technology, weighted addition of the multiple LORA modules according to the fusion parameters to obtain the LORA module group of the target instance; fusing the LORA module group with the first question-answering model to obtain the second question-answering model.

[0009] The present invention also provides a question-answering task processing device, comprising the following modules: an acquisition module and a processing module; the acquisition module is used to acquire input questions and question-answering instances of question-answering tasks; the processing module is used to determine a target instance with the highest similarity to the input question from the question-answering instances, and determine multiple LORA modules with the highest similarity to the target instance from a pre-trained low-rank adapted LORA module library; the multiple LORA modules are fused with a first question-answering model using non-gradient parameter optimization technology to obtain a second question-answering model, and the input question is input into the second question-answering model to obtain a corresponding answer.

[0010] According to a question and answer task processing device provided by the present invention, the processing module is used to perform feature extraction on the input and output of the question and answer instance based on a sentence vectorization model to obtain the instance feature vector of the question and answer instance, and to perform feature extraction on the input question to obtain the input feature vector; calculate the cosine similarity between the input feature vector and each instance feature vector, and determine the question and answer instance corresponding to the instance feature vector with the highest similarity as the target instance.

[0011] According to a question-answering task processing device provided by the present invention, the processing module is used to vectorize each training data in the training data set of the LORA module based on a sentence vectorization model, and determine the vector average value of the training data set as the representative vector of the LORA module; calculate the cosine similarity between the instance feature vector of the target instance and the representative vector of each LORA module; sort the LORA modules in the LORA module library in order of cosine similarity from high to low, and determine the multiple LORA modules with the highest similarity.

[0012] According to a question-and-answer task processing device provided by the present invention, the processing module is used to adjust the fusion parameters by adopting non-gradient parameter optimization technology, weightedly adding the multiple LORA modules according to the fusion parameters to obtain the LORA module group of the target instance; and fusing the LORA module group with the first question-and-answer model to obtain the second question-and-answer model.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the question-and-answer task processing method described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements any of the question-and-answer task processing methods described above.

[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the question-and-answer task processing methods described above.

[0016] The question-answering task processing method, device, equipment, storage medium and program product provided by the present invention can obtain the input question and question-answering instance of the question-answering task; determine the target instance with the highest similarity to the input question from the question-answering instance, and determine multiple LORA modules with the highest similarity to the target instance from the pre-trained low-rank adaptation LORA module library; use non-gradient parameter optimization technology to fuse the multiple LORA modules with the first question-answering model to obtain a second question-answering model, and input the input question into the second question-answering model to obtain the corresponding answer. Through this solution, since multiple effective LORA modules can be retrieved based on the target instance for parameter fusion, the possibility of the question-answering model capturing the potential specificity of the input using limited instance data can be improved, thereby achieving an improvement in cross-task generalization performance at a lower cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 This is one of the flowcharts of the question-answering task processing method provided by the present invention; Figure 2 This is the second flow chart of the question-answering task processing method provided by the present invention; Figure 3 It is a structural schematic diagram of the question-answering task processing device provided by the present invention; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0021] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0022] In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and order of execution.

[0023] The embodiments of the present application describe some exemplary embodiments for the purpose of explanation. It should be understood that the present application can be implemented in other ways that are not specifically shown in the drawings.

[0024] Low-Rank Adaptation (LORA) is a technique for efficient parameter fine-tuning in the field of natural language processing (NLP), especially in large-scale pre-trained language models. The core idea of ​​LORA is to reduce the number of parameters that need to be fine-tuned by introducing a low-rank matrix to approximate the update of model parameters.

[0025] LoraHub can take advantage of the modular nature of LoRa technology and dynamically combine LoRa modules trained on different tasks to form a powerful integrated module. This improves the performance of the model on a variety of tasks without increasing input requirements, achieving a balance between performance and energy consumption.

[0026] However, when selecting Lora modules from the trained Lora library for task adaptation combination, LoraHub's strategy is to randomly select modules from the trained Lora library. On the one hand, this random selection may cause the selected tasks to be completely irrelevant, resulting in significant performance differences in the same task when randomly selected multiple times, showing poor stability; on the other hand, when training instances, LoraHub does not take into account the differences between individual instances, which prevents the possibility of capturing the potential specificity of the input with limited instance data, limiting the performance of LoraHub.

[0027] In order to solve the above problems, Figure 1 As shown, the embodiment of the present application provides a question-answering task processing method, which can be applied to a question-answering task processing device. The question-answering task processing method may include S101-S103: S101. The question-answering task processing device obtains an input question and a question-answering instance of a question-answering task.

[0028] Optionally, the question-answering task processing device may obtain a small number of question-answering instances of the question-answering task, and the input question may be an unknown question, that is, a completely new task outside the pre-training task of the first question-answering model.

[0029] S102. The question-answering task processing device determines a target instance with the highest similarity to the input question from the question-answering instance, and determines multiple LoRa modules with the highest similarity to the target instance from a pre-trained low-rank adapted LoRa module library.

[0030] Optionally, the question and answer task processing device determines a target instance with the highest similarity to the input question from the question and answer instance, including: based on a sentence vectorization model, performing feature extraction on the input and output of the question and answer instance to obtain an instance feature vector of the question and answer instance, and performing feature extraction on the input question to obtain an input feature vector; calculating the cosine similarity between the input feature vector and each instance feature vector, and determining the question and answer instance corresponding to the instance feature vector with the highest similarity as the target instance.

[0031] Optionally, the question and answer task processing device determines multiple LORA modules with the highest similarity to the target instance from a pre-trained low-rank adapted LORA module library, including: based on a sentence vectorization model, vectorizing each training data in the training data set of the LORA module, and determining the vector average of the training data set as the representative vector of the LORA module; calculating the cosine similarity between the instance feature vector of the target instance and the representative vector of each LORA module; sorting the LORA modules in the LORA module library in order of cosine similarity from high to low, and determining the multiple LORA modules with the highest similarity.

[0032] Specifically, Figure 2 As shown, the question-answering task processing device can first determine the input feature vector corresponding to the input question, the instance feature vector corresponding to the question-answering instance, and the representative vector corresponding to each LORA module in the LORA module library; then use the cosine similarity to calculate the similarity between the instance feature vector and the input feature vector one by one, so as to determine the target instance that is most similar to the input feature vector; then, use the cosine similarity to calculate the similarity between the instance feature vector of the target instance and the representative vector of each LORA module, and finally select multiple LORA modules that match the target instance in descending order of similarity.

[0033] S103. The question-answering task processing device uses non-gradient parameter optimization technology to fuse the multiple LORA modules with the first question-answering model to obtain a second question-answering model, and inputs the input question into the second question-answering model to obtain a corresponding answer.

[0034] Optionally, the question and answer task processing device uses non-gradient parameter optimization technology to fuse the multiple LORA modules with the first question and answer model to obtain a second question and answer model, including: using non-gradient parameter optimization technology to adjust the fusion parameters, weighted addition of the multiple LORA modules according to the fusion parameters to obtain the LORA module group of the target instance; fusing the LORA module group with the first question and answer model to obtain the second question and answer model.

[0035] Specifically, the question-answering task processing device can use the LoraHub method, adopt non-gradient parameter optimization technology to adjust the fusion parameters, and add the LORA modules according to the weighted fusion parameters to obtain the LORA module group of the target instance. After that, the question-answering task processing device can fuse the LORA module group, the target instance and the first question-answering model to obtain the second question-answering model. Finally, the input question is input into the second question-answering model to obtain the corresponding answer to the question.

[0036] It should be noted that when there are many input questions, the question-answering task processing device can perform batch reasoning on the input questions based on the question-answering instances. Through the solution of this application, the processing capability of the question-answering model on unseen tasks can be effectively improved, while the balance between performance and energy consumption can be maintained relative to full-scale fine-tuning.

[0037] In the embodiment of the present application, since multiple effective LORA modules can be retrieved based on the target instance for parameter fusion, the possibility of the question-answering model capturing the potential specificity of the input using limited instance data can be improved, thereby achieving an improvement in cross-task generalization performance at a lower cost.

[0038] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0039] The question-answering task processing method provided in the embodiment of the present application can be executed by a question-answering task processing device or a control module for question-answering task processing in the question-answering task processing device. In the embodiment of the present application, the question-answering task processing device provided in the embodiment of the present application is illustrated by taking the question-answering task processing method executed by the question-answering task processing device as an example.

[0040] It should be noted that the embodiment of the present application can divide the question-answering task processing device into functional modules according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0041] like Figure 3 As shown, an embodiment of the present application provides a question-answering task processing device 300. The question-answering task processing device 300 includes: an acquisition module 301 and a processing module 302. The acquisition module 301 can be used to acquire input questions and question-answering instances of the question-answering task; the processing module 302 is used to determine the target instance with the highest similarity to the input question from the question-answering instance, and to determine multiple LORA modules with the highest similarity to the target instance from the pre-trained low-rank adapted LORA module library; the multiple LORA modules are fused with the first question-answering model using non-gradient parameter optimization technology to obtain a second question-answering model, and the input question is input into the second question-answering model to obtain the corresponding answer.

[0042] Optionally, the processing module 502 is used to perform feature extraction on the input and output of the question and answer instance based on a sentence vectorization model to obtain the instance feature vector of the question and answer instance, and to perform feature extraction on the input question to obtain the input feature vector; calculate the cosine similarity between the input feature vector and each instance feature vector, and determine the question and answer instance corresponding to the instance feature vector with the highest similarity as the target instance.

[0043] Optionally, the processing module 502 is used to vectorize each training data in the training data set of the LORA module based on the sentence vectorization model, and determine the vector average of the training data set as the representative vector of the LORA module; calculate the cosine similarity between the instance feature vector of the target instance and the representative vector of each LORA module; sort the LORA modules in the LORA module library in order of cosine similarity from high to low, and determine the multiple LORA modules with the highest similarity.

[0044] Optionally, the processing module 502 is used to adjust the fusion parameters using non-gradient parameter optimization technology, weightedly add the multiple LORA modules according to the fusion parameters to obtain the LORA module group of the target instance; and fuse the LORA module group with the first question and answer model to obtain the second question and answer model.

[0045] In the embodiment of the present application, since multiple effective LORA modules can be retrieved based on the target instance for parameter fusion, the possibility of the question-answering model capturing the potential specificity of the input using limited instance data can be improved, thereby achieving an improvement in cross-task generalization performance at a lower cost.

[0046] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the question-answering task processing method, which includes: obtaining the input question and question-answering instance of the question-answering task; determining the target instance with the highest similarity to the input question from the question-answering instance, and determining multiple LORA modules with the highest similarity to the target instance from the pre-trained low-rank adaptation LORA module library; using non-gradient parameter optimization technology to fuse the multiple LORA modules with the first question-answering model to obtain a second question-answering model, and inputting the input question into the second question-answering model to obtain a corresponding answer.

[0047] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0048] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the question-answering task processing method provided by the above methods, and the method includes: obtaining the input question and question-answering instance of the question-answering task; determining a target instance with the highest similarity to the input question from the question-answering instance, and determining multiple LORA modules with the highest similarity to the target instance from a pre-trained low-rank adapted LORA module library; using non-gradient parameter optimization technology to fuse the multiple LORA modules with the first question-answering model to obtain a second question-answering model, and inputting the input question into the second question-answering model to obtain a corresponding answer.

[0049] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the question-answering task processing method provided by the above-mentioned methods, the method comprising: obtaining an input question and a question-answering instance of a question-answering task; determining a target instance with the highest similarity to the input question from the question-answering instance, and determining multiple LORA modules with the highest similarity to the target instance from a pre-trained low-rank adapted LORA module library; using non-gradient parameter optimization technology to fuse the multiple LORA modules with the first question-answering model to obtain a second question-answering model, and inputting the input question into the second question-answering model to obtain a corresponding answer.

[0050] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0051] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A question-answering task processing method, characterized in that: include: Get the input questions and question-answering instances for the question-answering task; Determine a target instance with the highest similarity to the input question from the question-and-answer instance, and determine multiple LoRa modules with the highest similarity to the target instance from a pre-trained low-rank adaptation LoRa module library; The multiple LORA modules are fused with the first question-answering model using non-gradient parameter optimization technology to obtain a second question-answering model, and the input question is input into the second question-answering model to obtain a corresponding answer.

2. The question-answering task processing method according to claim 1, characterized in that: Determining the target instance with the highest similarity to the input question from the question and answer instance includes: Based on the sentence vectorization model, feature extraction is performed on the input and output of the question and answer instance to obtain an instance feature vector of the question and answer instance, and feature extraction is performed on the input question to obtain an input feature vector; The cosine similarity between the input feature vector and each instance feature vector is calculated, and the question-answering instance corresponding to the instance feature vector with the highest similarity is determined as the target instance.

3. The question-answering task processing method according to claim 2, characterized in that: The step of determining multiple LoRa modules with the highest similarity to the target instance from the pre-trained low-rank adaptation LoRa module library includes: Based on the sentence vectorization model, each training data in the training data set of the LORA module is vectorized, and the vector average value of the training data set is determined as the representative vector of the LORA module; Calculate the cosine similarity between the instance feature vector of the target instance and the representative vector of each LORA module; The LoRa modules in the LoRa module library are sorted in descending order according to the cosine similarity, and the multiple LoRa modules with the highest similarity are determined.

4. The question-answering task processing method according to claim 1, characterized in that: The non-gradient parameter optimization technology is used to fuse the multiple LORA modules with the first question-answering model to obtain a second question-answering model, including: The fusion parameters are adjusted by using non-gradient parameter optimization technology, and the multiple LORA modules are weightedly added according to the fusion parameters to obtain the LORA module group of the target instance; The LORA module group is integrated with the first question-answering model to obtain the second question-answering model.

5. A question-answering task processing device, characterized in that: include: Acquisition module and processing module; The acquisition module is used to acquire input questions and question-answering instances of the question-answering task; The processing module is used to determine the target instance with the highest similarity to the input question from the question and answer instance, and determine multiple LORA modules with the highest similarity to the target instance from the pre-trained low-rank adapted LORA module library; use non-gradient parameter optimization technology to fuse the multiple LORA modules with the first question and answer model to obtain a second question and answer model, and input the input question into the second question and answer model to obtain a corresponding answer.

6. The question-answering task processing device according to claim 5, characterized in that: The processing module is used to perform feature extraction on the input and output of the question and answer instance based on a sentence vectorization model to obtain the instance feature vector of the question and answer instance, and to perform feature extraction on the input question to obtain the input feature vector; calculate the cosine similarity between the input feature vector and each instance feature vector, and determine the question and answer instance corresponding to the instance feature vector with the highest similarity as the target instance.

7. The question-answering task processing device according to claim 6, characterized in that: The processing module is used to vectorize each training data in the training data set of the LORA module based on the sentence vectorization model, and determine the vector average of the training data set as the representative vector of the LORA module; calculate the cosine similarity between the instance feature vector of the target instance and the representative vector of each LORA module; sort the LORA modules in the LORA module library in order from high to low cosine similarity, and determine the multiple LORA modules with the highest similarity.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the question-answering task processing method according to any one of claims 1 to 4 is implemented.

9. 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, the question-answering task processing method as described in any one of claims 1 to 4 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the question-answering task processing method as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Automatic question answering method, automatic question answering system and method for constructing question answering case base

    CN103049433A

  • Method for automatically extracting Traditional Chinese Medicine acupuncture entity relationship

    CN105389470A

  • Model training and argument detection method, device, electronic equipment and storage medium

    CN113779159A

  • Text classification method and device, computer equipment and storage medium

    CN115129864A

  • Unbiased dynamic scene graph generation method based on multi-task learning framework

    CN115565098A