Search

CN-121979998-A - Method, device, medium and electronic equipment for assisting question-answering model output

CN121979998ACN 121979998 ACN121979998 ACN 121979998ACN-121979998-A

Abstract

The application provides a method, a device, a medium and electronic equipment for assisting in outputting a question-answering model, which relate to the field of artificial intelligence and comprise the steps of obtaining a preset text fragment question list set YW; responding to the received target problem MQ input by a user, obtaining a first target preset problem list WM according to the MQ and the YW, obtaining a corresponding first target preset text fragment list BW according to the WM and the YW, and inputting the BW and the MQ into a pre-trained question-answering model to obtain a corresponding output result. According to the application, the target question and a plurality of target text fragments are input into the pre-trained question-answering model together, and the target text fragments are used as the reference knowledge of the target question output answer, so that the accuracy of the output result is higher.

Inventors

  • FU RAO
  • LIU CHEN

Assignees

  • 香港国际新经济研究院有限公司

Dates

Publication Date
20260505
Application Date
20260228

Claims (10)

  1. 1. A method of assisting in outputting a question-answer model, the method comprising: S100, acquiring a preset text segment problem list set YW= (YW 1 ,YW 2 ,…,YW i ,…,YW n ), i=1, 2, & n, wherein n is the number of preset text segments, YW i is a preset problem list corresponding to the ith preset text segment, YW i =(YW i,1 ,YW i,2 ,…,YW i,a ,…,YW i,f(i) ), a=1, 2, & f (i), f (i) is the number of preset problems generated by the ith preset text segment according to a preset problem generation model, YW i,a is the (a) preset problem generated by the preset problem generation model according to the ith preset text segment, and each preset problem and the corresponding preset text segment have corresponding preset correlation degree; S200, responding to target questions MQ input by a user, and obtaining a first target preset question list WM= (WM 1 ,WM 2 ,…,WM j ,…,WM m ) according to the MQ and the YW, wherein j=1, 2, and m, wherein m is the number of the first target preset questions, WM j is the j-th first target preset question, and a first similarity PW j between WM j and the MQ is larger than a preset first similarity threshold; S300, obtaining a corresponding first target preset text segment list BW= (BW 1 ,BW 2 ,…,BW p ,…,BW q ), p=1, 2, and q, wherein q is the number of the first target preset text segments, BW p is the p-th first target preset text segment, a first importance degree score BWG p between BW p and MQ is larger than a preset first importance degree score threshold, and BWG p accords with the following conditions that BWG p =Σ m j=1 (PW j ·PB p,j );PB p,j is the preset correlation degree between BW p and WM j ; S400, BW and MQ are input into a pre-trained question-answering model, and corresponding output results are obtained.
  2. 2. The method of assisting question-answering model output according to claim 1, wherein S200 includes: S210, responding to a target problem MQ input by a user, and obtaining an initial preset problem list YT= (YT 1 ,YT 2 ,…,YT x ,…,YT y ) after duplication removal according to YW, wherein x=1, 2, y is the number of the initial preset problems obtained after duplication removal, and YT x is the x-th initial preset problem; S220, obtaining a target preset problem list WM= (WM 1 ,WM 2 ,…,WM j ,…,WM m ) according to the MQ and the YT.
  3. 3. The method of assisting question-answering model output according to claim 1, wherein PW j meets the following condition PM j =(MQX·WMX j )/(|MQX|·|WMX j |); The MQX is a first target feature vector obtained by vectorizing MQ according to a preset vectorization method, and the WMX j is a first feature vector obtained by vectorizing WM j according to the preset vectorization method.
  4. 4. The method of assisting question-answering model output according to claim 1, wherein S100 includes: S110, acquiring an initial database, wherein the initial database comprises initial text fragments and initial non-text fragments, and each initial non-text fragment has a corresponding fragment description; S120, obtaining text fragments corresponding to each initial non-text fragment according to fragment descriptions corresponding to each initial non-text fragment and a preset conversion method mapping table, wherein the preset conversion method mapping table comprises text conversion methods corresponding to each fragment description and each fragment description; S130, obtaining a preset text segment problem list set YW= (YW 1 ,YW 2 ,…,YW i ,…,YW n ) according to the text segment corresponding to each initial non-text segment and each initial text segment.
  5. 5. The method of assisting question-answering model output according to claim 1, wherein after step S100, the method further comprises: s500, responding to a target problem MQ input by a received user, and obtaining a first target label MQB corresponding to the MQ according to a preset label generation method; s600, if the MQB is the same as any special label in the preset special label list, the MQ is input into a pre-trained question-answering model, and a corresponding output result is obtained.
  6. 6. The method of assisting question-answering model output according to claim 5, wherein after step S500, the method further comprises: S700, if the MQB is different from each special label in the preset special label list, acquiring at least one second target label corresponding to the MQ according to a preset label library; S800, obtaining a second target preset problem list EM= (EM 1 ,EM 2 ,…,EM g ,…,EM h ) according to a preset tag library, MQ and YW, wherein g=1, 2, h, wherein h is the number of second target preset problems, EW g is the g second target preset problem, and a second similarity PE g between EM g and MQ is larger than a preset second similarity threshold; S900, obtaining a corresponding second target preset text segment list FW= (FW 1 ,FW 2 ,…,FW c ,…,FW d ) according to YW and EM; c=1, 2,. -%, d; the method comprises the steps of setting a first target preset text segment, setting a second importance degree score FWG c between FW c and MQ to be larger than a preset second importance degree score threshold value, setting FWG c to meet the following conditions that FWG c =Σ h g=1 (EM g ·PF c,g );PF c,g is preset correlation between FW c and EM g ; s1000, inputting FW and MQ into a pre-trained question-answering model to obtain a corresponding output result.
  7. 7. The method for assisting in outputting a question-answering model according to claim 6, wherein PE g meets the following condition that PE g =(MQH·EMH g )/(|MQH|·|EMH g |); The MQH is a second target feature vector obtained by vectorizing at least one second target label corresponding to the MQ and the MQ according to a preset vectorization method, and the EMH g is a second feature vector obtained by vectorizing at least one second target label corresponding to the EM g and the EM g according to the preset vectorization method.
  8. 8. An apparatus for assisting in outputting a question-answering model, the apparatus comprising: An acquisition unit, configured to acquire a preset text segment problem list set yw= (YW 1 ,YW 2 ,…,YW i ,…,YW n ); i=1, 2, & n, where n is a number of preset text segments; YW i is a preset problem list corresponding to the ith preset text segment; YW i =(YW i,1 ,YW i,2 ,…,YW i,a ,…,YW i,f(i) ); a=1, 2,; f (i) is a number of preset problems generated by the ith preset text segment according to a pre-training problem generation model, YW i,a is an a-th preset problem generated by the pre-training problem generation model according to the ith preset text segment, and each preset problem has a corresponding preset correlation with the corresponding preset text segment; The receiving unit is used for responding to the received target questions MQ input by a user, obtaining a first target preset question list WM= (WM 1 ,WM 2 ,…,WM j ,…,WM m ) according to the MQ and the YW, wherein j=1, 2..m, m is the number of the first target preset questions, WM j is the j-th first target preset question, and the first similarity PW j between WM j and the MQ is larger than a preset first similarity threshold; The obtaining unit is used for obtaining a corresponding first target preset text segment list BW= (BW 1 ,BW 2 ,…,BW p ,…,BW q ), p=1, 2, q, wherein q is the number of the first target preset text segments, BW p is the p-th first target preset text segment, a first importance degree score BWG p between BW p and MQ is larger than a preset first importance degree score threshold, and BWG p meets the following conditions that BWG p =Σ m j=1 (PW j ·PB p,j );PB p,j is the preset correlation degree between BW p and WM j ; And the output unit is used for inputting BW and MQ into the pre-trained question-answering model to obtain a corresponding output result.
  9. 9. A non-transitory computer readable storage medium having stored therein at least one instruction or at least one program loaded and executed by a processor to implement the method of any one of claims 1-7.
  10. 10. An electronic device comprising a processor and the non-transitory computer readable storage medium of claim 9.

Description

Method, device, medium and electronic equipment for assisting question-answering model output Technical Field The application relates to the field of artificial intelligence, in particular to a method, a device, a medium and electronic equipment for assisting in outputting a question-answering model. Background In the current field of intelligent question-answering systems, with the rapid development of Natural Language Processing (NLP) technology, question-answering models have become an important component in various applications, especially in knowledge-answering scenarios that require high specialization, such as law, medicine, finance, etc. The question-answer requirements in these fields often place extremely high demands on accuracy and specificity. However, although the existing question-answering model has been optimized by various technical means such as word expansion, field adaptability training and the like, the accuracy of the answer is still difficult to reach a satisfactory level. Therefore, a method for improving the accuracy of the output result of the question-answering model in the specialized question-answering field is needed. Disclosure of Invention Aiming at the technical problems, the application provides a method, a device, a medium and electronic equipment for assisting in outputting a question-answering model, which at least partially solve the problems existing in the prior art. In a first aspect of the present application, there is provided a method of assisting in outputting a question-answer model, the method comprising the steps of: S100, acquiring a preset text segment problem list set YW= (YW 1,YW2,…,YWi,…,YWn), i=1, 2, & n, wherein n is the number of preset text segments, YW i is a preset problem list corresponding to the ith preset text segment, YW i=(YWi,1,YWi,2,…,YWi,a,…,YWi,f(i)), a=1, 2, & f (i), f (i) is the number of preset problems generated by the ith preset text segment according to a preset problem generation model, YW i,a is the a preset problem generated by the preset problem generation model according to the ith preset text segment, and each preset problem and the corresponding preset text segment have corresponding preset correlation degree. S200, responding to target questions MQ input by a user, obtaining a first target preset question list WM= (WM 1,WM2,…,WMj,…,WMm) according to the MQ and the YW, wherein j=1, 2, and m, wherein m is the number of the first target preset questions, WM j is the j first target preset questions, and a first similarity PW j between WM j and the MQ is larger than a preset first similarity threshold. S300, obtaining a corresponding first target preset text segment list BW= (BW 1,BW2,…,BWp,…,BWq), p=1, 2, and q, wherein q is the number of the first target preset text segments, BW p is the p-th first target preset text segment, a first importance degree score BWG p between BW p and MQ is larger than a preset first importance degree score threshold, and BWG p meets the following conditions that BWG p=Σmj=1(PWj·PBp,j);PBp,j is the preset correlation degree between BW p and WM j. S400, BW and MQ are input into a pre-trained question-answering model, and corresponding output results are obtained. In a second aspect of the present application, there is provided an apparatus for assisting in outputting a question-answering model, the apparatus comprising: An acquisition unit, configured to acquire a preset text segment problem list set yw= (YW 1,YW2,…,YWi,…,YWn); i=1, 2, & n, where n is a number of preset text segments; YW i is a preset problem list corresponding to the ith preset text segment; YW i=(YWi,1,YWi,2,…,YWi,a,…,YWi,f(i)); a=1, 2,; f (i) is a number of preset problems generated by the ith preset text segment according to a pre-training problem generation model, YW i,a is an a-th preset problem generated by the pre-training problem generation model according to the ith preset text segment, and each preset problem has a corresponding preset correlation with the corresponding preset text segment; The receiving unit is used for responding to the received target questions MQ input by a user, obtaining a first target preset question list WM= (WM 1,WM2,…,WMj,…,WMm) according to the MQ and the YW, wherein j=1, 2..m, m is the number of the first target preset questions, WM j is the j-th first target preset question, and the first similarity PW j between WM j and the MQ is larger than a preset first similarity threshold; The obtaining unit is used for obtaining a corresponding first target preset text segment list BW= (BW 1,BW2,…,BWp,…,BWq), p=1, 2, q, wherein q is the number of the first target preset text segments, BW p is the p-th first target preset text segment, a first importance degree score BWG p between BW p and MQ is larger than a preset first importance degree score threshold, and BWG p meets the following conditions that BWG p=Σmj=1(PWj·PBp,j);PBp,j is the preset correlation degree between BW p and WM j; And the output unit