Dialogue abstract generation method and device based on large language model, equipment and storage medium

By extracting and combining the deletion triplets in dialogue data using a combination method of two small preset models, the cost and accuracy balance of generating medical text summary in the prior art is solved, and efficient and accurate text is achieved Summary generation.

CN119415682APending Publication Date: 2025-02-11SHENZHEN RAISOUND TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411543072.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art is difficult to balance the accuracy and cost of generating medical text summary, especially in reducing the cost of model deployment and improving the efficiency of doctors in reviewing doctor-patient communication information.

Method used

Using a combination of two small preset models, the initial triplets from the conversation data are first extracted through one model, and then the triplets are input to the second model to generate a conversation summary. This method reduces the model's parameter requirements and deployment costs by cleaning and extracting key information.

Benefits of technology

This achieves the model deployment cost required to generate text summary while maintaining the accuracy of generating summary, thereby balancing the accuracy and usage cost of generating medical text summary.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415682A_ABST
    Figure CN119415682A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of text abstract generation, in particular to a dialogue abstract generation method and device based on a large language model, equipment and a storage medium. The method comprises the steps of obtaining a first dialogue data set; cleaning the first dialogue data set to remove redundant dialogues in the first dialogue data set to obtain a second dialogue data set; inputting the second dialogue data set into a first preset model, and extracting through the first preset model to obtain a plurality of initial triples; and inputting all the initial triads into a second preset model, and combining all the initial triads through the second preset model to obtain a first dialogue abstract corresponding to the first dialogue data set. According to the method, the model deployment cost required for generating the text abstract can be reduced, and the beneficial effects of balancing the accuracy, practicability and use cost of generating the text abstract are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of text summary generation, and in particular to a conversation summary generation method, apparatus, device and storage medium based on a large language model. Background Art

[0002] Doctor-patient communication is the main basis for doctors to understand the patient's health status, determine the cause of the disease and make a symptomatic diagnosis. Patients will provide a lot of information during the conversation, including symptom description, past medical history, drug allergy history, etc. Reviewing the doctor-patient communication records is of great significance for ensuring the accuracy of diagnosis, improving treatment effects and establishing a good doctor-patient relationship. However, in actual consultations, doctor-patient conversations are usually lengthy and may contain irrelevant content, which makes it inefficient for doctors to process doctor-patient communication information after the conversation. Based on this, in order to improve the efficiency of doctors reviewing doctor-patient communication, the technology of generating conversation summaries is necessary in medical texts.

[0003] At present, although big models have made it possible to automatically generate conversation summaries, open source or closed source big models on the market can generate relatively accurate medical conversation summaries, but each has its own shortcomings, which are explained in detail below: Due to factors such as lack of transparency and potential security vulnerabilities in closed-source large models, patients’ personal privacy may be leaked. In addition, there are high call costs due to factors such as potentially high licensing fees, vendor lock-in, and limited customization and expansion. As for open source big models, due to the large computing resource requirements, high data collection and cleaning costs, large model size, high deployment difficulty, poor scalability and high maintenance costs, the deployment cost is expensive and unaffordable for many hospitals. If a smaller model is fine-tuned to simulate the generation effect of the large model, the smaller model has fewer parameters and cannot handle the dialogue summary task with many professional terms and complex logic, and there may be problems such as inaccurate capture of key information and incomplete summary.

[0004] To sum up, it is difficult for existing technologies to balance the accuracy, practicality and usage cost of generating medical text summaries. In order to promote the development of the medical field, how to reduce the model deployment cost required to generate medical text summaries and balance the accuracy, practicality and usage cost of generating medical text summaries is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the present application provides a conversation summary generation method, apparatus, device and storage medium based on a large language model, so as to reduce the model deployment cost required to generate text summaries, and achieve the beneficial effect of balancing the accuracy and practicality of generating text summaries with the cost of use.

[0006] The technical solution adopted by this application to solve its technical problem is: In a first aspect, the present application provides a method for generating a dialogue summary based on a large language model, the method comprising: Obtain a first conversation dataset; Cleaning the first conversation data set to remove redundant conversations in the first conversation data set to obtain a second conversation data set; Inputting the second conversation data set into a first preset model to extract a plurality of initial triples through the first preset model; All the initial triples are input into a second preset model, so as to combine all the initial triples through the second preset model to obtain a first conversation summary corresponding to the first conversation data set.

[0007] In a second aspect, the present application provides a conversation summary generation device based on a large language model, comprising: A data set acquisition module, used to acquire a first conversation data set; a data set cleaning module, configured to clean the first conversation data set to remove redundant conversations in the first conversation data set to obtain a second conversation data set; a triplet extraction module, configured to input the second dialogue data set into a first preset model, so as to extract a plurality of triples through the first model, each triplet being a character element, an action and an event element of a group of dialogues in the second dialogue data set; A conversation summary generation module is used to input all the initial triples into a second preset model, so as to combine all the initial triples through the second preset model to obtain a first conversation summary corresponding to the first conversation data set.

[0008] In a third aspect, the present application provides an electronic device, including: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, enable the electronic device to perform the above method.

[0009] In a fourth aspect, the present application provides a computer-readable storage medium, in which a program or instruction is stored. When the program or instruction is executed, the above method is implemented.

[0010] The beneficial effect of the present application is as follows: the present solution adopts a first preset model suitable for extracting dialogue triples and a second preset model suitable for generating dialogue summaries from triples. Both the first preset model and the second preset model are small models. According to the above steps, the dialogue data set is gradually analyzed, key information is extracted and integrated for processing. The complex dialogue processing task is decomposed into multiple relatively simple subtasks through the combination of two small models. In addition, considering that the direct generation of summaries by small models may lead to inaccurate capture of key information and incomplete and inaccurate summaries, the first dialogue data set obtained is first cleaned, which can not only improve the accuracy of subsequent extraction of triples, but also reduce the parameter requirements of the small model. Based on this, the present solution achieves the reduction of the model deployment cost required for generating text summaries while accurately generating summary texts, thereby achieving the beneficial effect of balancing the accuracy and practicality of generating text summaries with the cost of use. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a flowchart of a method for generating a conversation summary based on a large language model provided in an embodiment of the present application; Figure 2 It is a schematic diagram of the model reasoning process of the conversation summary generation method based on a large language model provided in an embodiment of the present application; Figure 3 It is a virtual structural diagram of a conversation summary generation device based on a large language model provided by the present application; Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0012] The present application is further described below in conjunction with the accompanying drawings and embodiments.

[0013] The following will clearly and completely describe the concept, specific structure and technical effects of the present application in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments of the present application, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the present application. In addition, all the connection / connection relationships involved in the patent do not simply refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features created in this application can be combined interactively without conflicting with each other.

[0014] Reference Figure 1 , Figure 1 is a flow chart of a method for generating a conversation summary based on a large language model provided in an embodiment of the present application. Figure 1In the steps shown, the first model and the second model are used to process data in a pipeline combination, thereby decomposing the complex dialogue processing task into multiple relatively simple subtasks, each of which performs related operations independently in the pipeline. Figure 2 , Figure 2 This is a schematic diagram of the model reasoning process of the conversation summary generation method based on a large language model provided in the embodiment of the present application. Figure 1 and Figure 2 The implementation steps of this application are described in detail: In step S1, a first conversation data set is obtained.

[0015] Specifically, real medical conversations are obtained from various scenarios such as online communication and consultation room conversations as the first conversation data set. It is worth noting that the obtained first conversation data set needs to be preprocessed in the solution provided in this application, that is, the cleaning data described below.

[0016] More specifically, for ease of explanation, the present application describes the method provided in the present application in conjunction with the following cases: Doctor-patient dialogue: Patient: Doctor, I would like to ask what I should do if I am infected with both mold and bacteria? Doctor: Hello, if it is confirmed, then both fungi and bacteria can be treated at the same time.

[0017] Patient: I would like to ask how to treat it? Patient: Will blue oxygen, neon light, and photodynamic therapy help remove the bacteria more thoroughly? Doctor: What bacteria? Patient: The doctor just said bacteria? Patient: Didn’t say what it was.

[0018] Doctor: If you need to use blue oxygen or photodynamic therapy for fungal or bacterial vaginitis, these hospitals are usually private hospitals. They will not completely remove the infection after the treatment and the cost is also very high.

[0019] Doctor: It is recommended that you go to a regular hospital for medical treatment.

[0020] Patient: I mean I went to a Grade 3 hospital in the city.

[0021] Patient: Yes, thank you doctor, but how should I treat it specifically? Patient: Should I take medication first during the first attack? Doctor: You can take fluconazole capsules, 150 mg, all at once, and then take it again after 72 hours. For vaginal suppositories, you can use Daconil suppositories, Zhengmeiting, or Canestin. Because there is a bacterial infection, you should also take some anti-inflammatory drugs, such as levofloxacin, for 2 to 3 days.

[0022] Doctor: If you have vaginitis, you can just take medicine, whether it is the first time or a recurrence.

[0023] Patient: Yes, ok, thank you, doctor.

[0024] Doctor: You’re welcome.

[0025] In step S2, the first conversation data set is cleaned to remove redundant conversations in the first conversation data set to obtain a second conversation data set.

[0026] Specifically, the first dialogue data set is cleaned, and redundant dialogues in the first dialogue data set are removed to obtain a cleaned second dialogue data set. Redundant dialogues include but are not limited to incomplete dialogues in which questions are asked but the other party does not answer, and medical irrelevant dialogues such as polite language. In combination with the above example, an incomplete dialogue such as "Patient: I would like to ask how to treat", and the doctor asks "What bacteria", that is, the patient's inquiry text on how to treat can be removed; and irrelevant texts such as "Patient: Yes, yes, thank you doctor. Doctor: You're welcome." This type of text has nothing to do with treatment and can also be removed from the summary.

[0027] More specifically, in the first aspect, cleaning the first conversation data set includes removing incomplete conversation content, which is described in detail below. In the embodiment of the present application, the steps include: The step of cleaning the first conversation data set to remove redundant conversations in the first conversation data set to obtain a second conversation data set includes: Traversing the first conversation data set to identify all query texts in the first conversation data set; Determine whether there is a matching answer text for each of the query texts in the first conversation data set; The inquiry texts for which there are no matching reply texts in the first dialogue data set are eliminated to obtain an intermediate dialogue data set; the intermediate dialogue data set includes multiple dialogue texts.

[0028] Specifically, the traversal step is performed on the first dialogue data set to screen and determine all inquiry texts (i.e., all interrogative sentences in the first dialogue data set) from the first dialogue data set, and then the corresponding reply text is matched for each obtained inquiry text, so as to find and remove inquiry texts in the first dialogue data set that do not have corresponding reply texts, and then the first dialogue data set that has completed the removal operation is determined as the intermediate dialogue data set. Among them, the inquiry text includes the inquiry text generated by the patient's question and / or the doctor's question, the reply text is the response text to any inquiry text, and each dialogue text contained in the intermediate dialogue data set is a text with a corresponding inquiry or a corresponding reply.

[0029] Among them, the dialogue texts in which the doctor asks questions but the patient does not answer, and the dialogue texts in which the patient asks questions but the doctor does not answer in the first dialogue set can be defined as incomplete dialogue texts, and the data set consisting of several incomplete dialogue texts is defined as an incomplete dialogue data set. The screening of the incomplete dialogue data set can be achieved by cleaning the first dialogue data set with code, inputting the first dialogue data set into a large language model for processing and then outputting it.

[0030] By adopting the above technical solution, it can be ensured that each group of dialogues in the second dialogue data set to be input into the first model after cleaning corresponds, thereby improving the accuracy of the first model in capturing key information.

[0031] Then, based on the obtained intermediate dialogue data set, it can be determined that the second dialogue data set that needs to be input into the first preset model described below needs to be determined. However, the intermediate dialogue data set currently obtained only removes the incomplete dialogue text in the first dialogue data set, and may also contain text such as polite language that is irrelevant to the current scene. This part of data is not the text data required for the dialogue summary. Therefore, the present application proposes to further process the complete dialogue data set, and the steps include: Semantic recognition is performed on the intermediate dialogue data set to remove dialogue texts that do not belong to a preset scene in the intermediate dialogue data set, thereby obtaining a second dialogue data set.

[0032] Specifically, the text meaning of each text in the intermediate conversation data set is traversed by semantic recognition, so as to find and eliminate the conversation texts in the intermediate conversation data set that are irrelevant to the preset scene. Among them, the preset scene can be preset by relevant personnel according to the scene applied by the method provided in this application. In the embodiment of the present application, the doctor-patient conversation in the consultation room is used as the preset scene, and the relevant content defined in the scene of the doctor-patient conversation in the consultation room is the relevant content in the medical field, and the relevant content in the medical field can be determined by comparing the keywords in the known medical information database, and the text other than the relevant content defined in the scene can be determined as the conversation text that does not belong to the preset scene (hereinafter referred to as irrelevant text).

[0033] More specifically, in an embodiment of the present application, it is proposed that a relevant semantic feature model can be used to implement semantic recognition of the intermediate dialogue data set to remove dialogue texts that do not belong to a preset scene in the intermediate dialogue data set, and the step of obtaining a second dialogue data set specifically includes: The intermediate dialogue data set is input into a third preset model.

[0034] Specifically, the third preset model is a semantic feature model with the function of analyzing the text semantics corresponding to each input text, which can be obtained by fine-tuning the general large language model through the preset prompt text. On this basis, the dialogue summary obtained after each execution of the summary generation method provided by this application can also be combined for feedback optimization, and the irrelevant text in the generated summary can be analyzed. By adopting the above scheme, the judgment of the third preset model on irrelevant text can be continuously optimized, and the accuracy and reliability of summary generation can be improved.

[0035] The semantics of each text in the intermediate dialogue data set is parsed by the third preset model, and dialogue texts in the intermediate dialogue data set that do not belong to the preset scene are eliminated according to the text meaning obtained by the parsing, so as to obtain the second dialogue data set.

[0036] Specifically, irrelevant text includes, but is not limited to, modal particles, small talk, polite language, and other texts that are irrelevant to treatment. In the embodiment of the present application, the third preset model first performs semantic analysis on each text in the received intermediate dialogue data set, and determines whether the corresponding text is irrelevant text based on the meaning of the text obtained by the analysis.

[0037] Then, all irrelevant texts in the intermediate conversation data set are removed, thereby adjusting the intermediate conversation data set to a second conversation data set for inputting the first preset model described below. By adopting the above technical solution, it is possible to avoid confusing the subsequent model with irrelevant texts in judging the input data, thereby improving the accuracy of the subsequent model in capturing key information.

[0038] More specifically, an embodiment of the present application proposes that after determining that a certain text in the intermediate conversation data set is irrelevant text, its corresponding reply text or inquiry text can also be determined as irrelevant text, thereby reducing the demand for data processing and improving analysis and cleaning efficiency.

[0039] In some possible embodiments, the first dialogue data set may be firstly subjected to the exclusion of irrelevant terms, and then the intermediate dialogue data set therein may be determined; or a synchronous execution method may be adopted to improve efficiency. A solution proposed in an embodiment of the present application is to firstly filter out the incomplete dialogue text in the first dialogue data set, and then remove the redundant irrelevant text part therein, thereby further reducing the computing power requirement of the model work. Relevant personnel may freely adjust the order according to actual needs, and no limitation is made here.

[0040] In step S3, the second conversation data set is input into a first preset model to extract a plurality of initial triples through the first preset model.

[0041] Specifically, the first preset model has the function of adjusting each received text into a triple. In the embodiment of the present application, after the second dialogue data set obtained after the cleaning process in the above steps is input into the first preset model, the first preset model will extract the character elements, event elements and actions connecting the character elements and event elements in each text, thereby forming a corresponding initial triple. Among them, the format of each initial triple is <character element, action, event element>, and "character element", "action" and "event element" together constitute the element information group of the initial triple.

[0042] More specifically, the specific steps of inputting the second conversation data set into the first preset model to extract a plurality of initial triples through the first preset model include: Get the preset prompt information.

[0043] Specifically, the preset prompt information is used to deepen the first preset model's understanding of the task to be processed, which includes example text data, example triples corresponding to the example text data, and example requirement information. Among them, the example text data refers to the example original text to be extracted and processed, and the example triples refer to the example triples obtained based on the corresponding extracted keywords of the example text data. It is worth noting that in order to prevent the first preset model from understanding the example content as a task item to be processed, specific tags can be used to distinguish the example content. For example, <example> and< / example> Markers to indicate the start and end of an example, as follows: Here is an example, <example> and< / example> Markers to indicate the beginning and end of an example.

[0044] <example> Example text data XXX, and the triples extracted based on this example text data are <XX person, action, XX event> < / example> More specifically, the example requirement information refers to the guide words for the output result requirement after the first preset model processes the data set, including but not limited to the extracted processing items, keyword arrangement order, format, etc. For ease of understanding, the present application provides an example of an embodiment of the requirement information: extracting triples from the second conversation data set, the triples include characters, actions, and medical-related events, and the elements in the generated triples are arranged in order, and the elements are separated by commas.

[0045] Furthermore, the second dialogue data set and the preset prompt information are input into the first preset model, so as to extract a plurality of element groups from the second dialogue data set based on the example text data and the example triples through the first preset model.

[0046] Specifically, the second dialogue data set and the preset prompt information are input into the first preset model together, so as to deepen the first preset model's understanding of the matters to be processed in the second dialogue data set through the data processing examples provided by the preset prompt information, wherein the data processing examples refer to the examples of adjusting the above-mentioned example text data to the above-mentioned example triples. Then, the first preset model fine-tuned by the preset prompt words processes the text data in the second dialogue data set and extracts a plurality of element groups therefrom, wherein one of the element groups includes a character element and an event element.

[0047] Furthermore, the action connecting the character elements and event elements in each of the element groups is determined through the first preset model, and the character elements, action elements and event elements corresponding to each of the element groups are integrated into an initial triplet according to the example requirement information and then output.

[0048] Specifically, the first preset model is used to match the action for connecting the character element and event element corresponding to each element group in the text corresponding to the element group, and the corresponding character element, event element and the action connecting the two are combined based on the above example requirement information to obtain a set of initial triples. Repeat the above process until all the extracted element groups have completed the construction of initial triples and then output. For example, this application provides a corresponding example of initial triples extracted in combination with the above first dialogue data set example, and the initial triples are as follows: (patient, asking about treatments for both fungal and bacterial infections); (Doctors recommend treating both fungi and bacteria at the same time); (patient,inquiry,the effects of blue oxygen,neon light,and photodynamic therapy); (Doctor,response, these treatments are usually performed in private hospitals, they will not completely remove the cancer, and the cost is high, so it is recommended to go to a regular hospital); (The patient indicated that he went to a Class III hospital in the city); (patient, inquiry, specific treatment method); (The doctor suggested taking fluconazole capsules, 150 mg, all at once, and then taking it again after 72 hours, vaginal suppositories of Daconazole or Zhengmeiting or Canitin, and taking levofloxacin anti-inflammatory drugs for 2-3 days); (The doctor explained that whether it is the first attack or a recurrence of vaginitis, medication can be used).

[0049] Specifically, take the initial triple example (patient, inquiry, treatment method for both mold and bacterial infection) as an example, which corresponds to the text "Patient: Doctor, I want to ask what should I do if I am infected by both mold and bacteria?" in the first dialogue dataset example above, where "patient" is a character element, "what should I do if I am infected by both mold and bacteria" is an event element, and "ask" is a verb connecting the two.

[0050] More specifically, in the input second dialogue data set, the text of the dialogue may lack the content of "action". For example, corresponding to the example of the first dialogue data set above, "Patient: But how to treat specifically", the text data only includes the character element "patient" and the event element "how to treat specifically", and lacks the verb connecting the two. In this case, a word set covering most of the verbs involved in the medical field is preset to facilitate verb selection. In an embodiment of the present application, after finding a set of character elements and event elements, the corresponding verb is matched from the word set as "action". For example, based on the character element "patient" and the event element "how to treat specifically", the verb "ask" is matched from the word set for connection, and the text data can be obtained as "the patient asks how to treat specifically". The obtained text data is input into the first preset model, and the final triple is: (patient, ask, specific treatment method). Among them, the word set can be pre-input into the first preset model so that the first preset model has the function of automatically matching verbs.

[0051] In step S4, all the initial triples are input into a second preset model, so as to combine all the initial triples through the second preset model to obtain a first conversation summary corresponding to the first conversation data set.

[0052] Specifically, the second preset model has the function of combining the element information in the input several initial triples and finally outputting the corresponding first conversation summary. The present application also uses specific guide words to fine-tune the second preset model to inform the second preset model of what task responsibilities it needs to complete, specifically including the following steps: A summary prompt template is obtained, and a summary prompt text is generated according to all the extracted initial triples and the summary prompt template.

[0053] Specifically, the summary prompt template is used to prompt the second preset model of the task items to be processed. For example, "Generate a concise and accurate summary based on the following dialogue triples" can be used as a prompt word; on the other hand, the summary prompt template is also used to provide a clear structured framework for the second preset model, and each extracted triple is itself structured information. Therefore, under the guidance of the summary prompt template, several groups of summary prompt texts can be generated. Among them, each group of summary texts corresponds to a group of triple text contents.

[0054] The summary prompt text is input into the second preset model to obtain a conversation summary corresponding to the first conversation data set.

[0055] Specifically, the obtained summary prompt text is combined through the second preset model to obtain the conversation summary corresponding to the final required first conversation data set. For ease of understanding, the embodiment of the present application provides the following summary text example in combination with the first conversation data set example provided above and the generated initial triple example, as follows: Abstract: The patient asked about the treatment of both fungal and bacterial infections. The doctor suggested treating both infections at the same time, and pointed out that blue oxygen and photodynamic therapy were performed in private hospitals and were not very effective, and suggested going to a regular hospital. The patient said that she went to a tertiary hospital, and the doctor gave a specific treatment plan, including taking fluconazole capsules, vaginal suppositories, and levofloxacin anti-inflammatory drugs, and explained that vaginitis can be treated with drugs regardless of the first attack or recurrence.

[0056] Furthermore, in the first conversation summary obtained based on the above steps, since the first conversation summary is obtained based on multiple initial triples extracted from the second conversation data set, there may be triples with completely identical or similar element information groups in the multiple initial triples obtained, and these triples may confuse the output of the model, resulting in the generated summary text failing to meet the requirement of being concise and clear. In order to address this problem and ensure that the generated conversation summary is clear, complete, and concise, an embodiment provided in the present application discloses a method for processing triples with completely identical or similar element information groups, which is specifically described below: A time label corresponding to each of the initial triples is obtained, and all the initial triples are inserted into a preset triple queue in the order of the time labels.

[0057] Specifically, the time label is the generation time corresponding to each initial triplet. The so-called generation time is determined by the order of the dialogue texts corresponding to the initial triplet in the second dialogue dataset. The second dialogue dataset is obtained by removing redundancy from the first dialogue dataset obtained based on real dialogues in multiple scenarios. That is, the time label depends on the order of the time when the dialogue texts corresponding to the initial triplet are generated, reflecting the order of the speaker's dialogue. By introducing the time label, the subsequent generation of the dialogue summary can be more timely and the context connection can be more accurate.

[0058] More specifically, the time labels of each initial triple are sorted from front to back, and a preset triple queue is set, which is used to receive the initial triples with the earliest time labels among all triples outside the queue one by one, until all initial triples are inserted into the preset triple queue, so as to obtain all initial triples with the text data sequence attribute. The preset triple queue can be a data structure, such as a linked list, an array or other types of collections.

[0059] For example, take the two initial triples "patient, asked about the treatment methods for both mold and bacterial infections" and "patient, indicated that he went to the city's top three hospitals" as examples. Since the text order of the former triple corresponding to "Patient: Doctor, I want to ask what to do if I am infected with both mold and bacteria?" in the second dialogue dataset precedes the text order of the latter triple corresponding to "Patient: I want to say that I went to the city's top three hospitals." in the second dialogue dataset, the time label corresponding to the former triple precedes the time label corresponding to the latter triple.

[0060] Furthermore, the initial triplet ranked first in the preset triplet queue is used as the summary triplet.

[0061] Specifically, the summary triplet refers to an initial triplet that can be used to subsequently generate a second conversation summary. In this step, since the initial triples in the preset triplet queue have been inserted into the queue based on their time tags and the order is determined, the initial triplet with the earliest time tag can be obtained by extracting the first-ranked initial triplet from the preset triplet queue.

[0062] Furthermore, it is detected whether there is an overlapping triplet corresponding to the summary triplet in the preset triplet queue.

[0063] Understandably, the corresponding element information group in each initial triple includes "character element", "action element" and "event element". Among them, the character element is the corresponding speaker in the dialogue text (this part can be realized by using speaker separation technology in speech recognition to mark the corresponding speaker in front of each dialogue text); the action element is used to connect the character element and the event element. For a specific scenario, in this step, the current summary triple is matched with each initial triple in the preset triple queue for text matching, and all initial triples in the preset triple queue that are the same as the element information group of the currently verified summary triple are found, and these initial triples are defined as overlapping triples. Furthermore, the overlapping triples defined in this application include two categories. The first category is that the three elements in the element information group are exactly the same, that is, the character element, action and event element are all the same. The second category is that the character elements and actions are the same, and the meaning of the events represented by the event elements is the same, with only differences in the text description that do not affect the meaning. For example, "Do you have a history of drug allergy" and "Have you ever had drug allergy before?" These two sentences have the same meaning but different descriptions. The initial triples extracted from these two sentences will be considered the same.

[0064] Furthermore, overlapping triples corresponding to the summary triplet are removed from the preset triplet queue, the summary triplet is extracted from the preset triplet queue to the summary generation queue, and the preset triplet queue is updated.

[0065] Specifically, after the text matching verification is performed on the current summary triple, all the overlapping triples are removed from the preset triple queue for updating and saving, thereby ensuring that the element information group of the current summary triple is unique, and then the summary triple is moved to the preset summary generation queue. The summary generation queue is a collection of summary triples that can be used to subsequently generate the second conversation summary, which can be a data structure, such as a linked list, an array, or other types of collections.

[0066] Further, the step of taking the initial triplet ranked first in the preset triplet queue as the summary triplet is returned to be executed until there is no initial triplet in the preset triplet queue, and all summary triples in the summary generation queue are input into the second preset model to obtain a second conversation summary output by the second preset model.

[0067] Specifically, the step of taking the first-ranked initial triple in the preset triple queue as the summary triple is returned, that is, the process of extracting the first-ranked initial triple into the preset triple queue, verifying the text matching, and moving it to the summary generation queue as a summary triple is entered into the next round. The above process is repeated until all the initial triples in the preset triple queue are removed or extracted into the summary generation queue, and all the summary triples in the summary generation queue are input into the second preset model to generate the second conversation summary, thereby ensuring the uniqueness of each summary triple element placed in the summary generation queue in the element information group.

[0068] Understandably, assuming that there are eight initial triples in the preset triple queue, it is detected that the overlapping triple corresponding to the initial triple currently ranked first is the initial triple ranked sixth. In this way, after the initial triple ranked sixth is removed from the preset triple queue, and the initial triple ranked first is extracted to the summary generation queue, the preset triple queue has been updated, that is, at this time, there are only six initial triples in the preset triple queue. Then, when returning to execute the step of using the initial triple ranked first in the preset triple queue as the summary triple, the initial triple ranked first at this time is the initial triple ranked second, not the original initial triple ranked first. Therefore, after each execution of removing the overlapping triples corresponding to the summary triple, and extracting the summary triple from the preset triple queue to the summary generation queue, the preset triple queue is updated.

[0069] It can be seen that compared with the first conversation summary generated in the above step S4, the second conversation summary takes into account the order of the conversations and eliminates possible duplicate content in the initial triples. Compared with the first conversation summary generated, it is clearer and more concise, and has stronger readability and logic.

[0070] More specifically, after removing the overlapping triples in the triples by the above method, there may be a situation where the element information groups are not completely identical but have similar semantics. If this part of the content is retained, the generated second conversation summary will be redundant and repeated. Based on this, this embodiment proposes that in the above step of detecting whether there are overlapping triples corresponding to the summary triples in the preset triple queue, in addition to detecting whether the element information groups are completely identical, the situation of semantically similar element information groups is also detected, specifically including: The element information groups of the initial triples except the summary triplet in the preset triplet queue are compared with the element information group of the summary triplet.

[0071] The initial triplet having the same three element information as the summary triplet is recorded as the overlapping triplet.

[0072] Specifically, one of the element information groups contains three element information, one of which is an event element. In the embodiment of the present application, the element information group includes three element information: character element, action element and event element. The initial triplet with exactly the same three element information is directly determined as an overlapping triplet.

[0073] Further, the initial triplet having the same two element information as those in the element information group of the summary triplet except the event element is recorded as the triplet to be compared.

[0074] Specifically, for the initial triples with the same element information other than the event element, further comparison is required, and they are first recorded as triples to be compared. For example, assuming that the element information group includes three element information: person element, action and event element, for the two initial triples "(doctor, advice, don't go to private hospital)" and "(doctor, advice, go to public hospital)", the person element "doctor" and the action "advice" are the same, but the event element is different. Therefore, if one of the two is used as a summary triple, the other triple is recorded as a triple to be compared.

[0075] Furthermore, the semantic similarity between the event element of the triple to be compared and the event element of the summary triple is determined, and the semantic similarity is compared with a preset similarity threshold.

[0076] Specifically, the semantics of the event elements of the triples to be compared and the semantics of the event elements of the summary triples are parsed to determine the semantic similarity of all the triples to be compared with the summary triples, and then the obtained semantic similarity is compared with the preset similarity threshold. This process can be performed using a relevant semantic feature model, and the semantic similarity threshold can be determined by the relevant personnel through fine-tuning of the semantic feature model based on actual needs.

[0077] Furthermore, when the semantic similarity exceeds the preset similarity threshold, the triples to be compared are recorded as the overlapping triples.

[0078] Specifically, the obtained semantic similarity is compared with a preset similarity threshold, and if the semantic similarity exceeds the preset similarity threshold, the triple to be compared is recorded as an overlapping triple. The initial triple recorded as an overlapping triple is removed from the preset triple queue in the above manner, which will not be repeated here.

[0079] Reference Figure 2 , Figure 2 This is a specific flow chart of the conversation summary generation method based on a large language model provided in an embodiment of the present application. The steps involved have been mentioned in the above content and will not be repeated here.

[0080] Reference Figure 3 , Figure 3 is a virtual structural diagram of a conversation summary generation device based on a large language model provided by the present application. In a second aspect, the present application provides a conversation summary generation device based on a large language model, including: The data set acquisition module 100 is used to acquire a first conversation data set; A data set cleaning module 200, configured to clean the first conversation data set to remove redundant conversations in the first conversation data set to obtain a second conversation data set; A triple extraction module 300, configured to input the second conversation data set into a first preset model, so as to extract a plurality of initial triples through the first preset model; The conversation summary generation module 400 is used to input all the initial triples into a second preset model, so as to combine all the initial triples through the second preset model to obtain a first conversation summary corresponding to the first conversation data set.

[0081] The conversation summary generation device based on a large language model described in the embodiment of the present application can execute the conversation summary generation method based on a large language model provided in the above embodiment. The conversation summary generation device based on a large language model has the corresponding functional steps and beneficial effects of the conversation summary generation method based on a large language model described in the above embodiment. Please refer to the above embodiment of the conversation summary generation method based on a large language model for details. The embodiment of the present application will not be repeated here.

[0082] The present application also provides an electronic device. Figure 4 , Figure 4It is a structural diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include a processor and a memory, wherein the processor and the memory may be connected via a bus or other means. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned various types of chips. The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as the program instructions / modules corresponding to the method for generating a dialogue summary based on a large language model in the embodiment of the present application. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, the method for generating a dialogue summary based on a large language model in the above method embodiment is realized.

[0083] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. The one or more modules are stored in the memory, and when executed by the processor, the method for generating a dialogue summary based on a large language model in the above-mentioned method embodiment is executed. The specific details of the above-mentioned electronic device can be understood by corresponding to the corresponding descriptions and effects in the above-mentioned method embodiment, and will not be repeated here. Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and the program, when executed, may include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.

[0084] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0085] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: the claimed application requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims, the inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present application.

[0086] It should be noted that the above-mentioned embodiments illustrate rather than limit the invention and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims.

Claims

1. A method for generating a conversation summary based on a large language model, characterized in that: The method comprises: Obtain a first conversation dataset; Cleaning the first conversation data set to remove redundant conversations in the first conversation data set to obtain a second conversation data set; Inputting the second conversation data set into a first preset model to extract a plurality of initial triples through the first preset model; All the initial triples are input into a second preset model, so as to combine all the initial triples through the second preset model to obtain a first conversation summary corresponding to the first conversation data set.

2. The method for generating a conversation summary based on a large language model according to claim 1, characterized in that: The step of cleaning the first conversation data set to remove redundant conversations in the first conversation data set to obtain a second conversation data set includes: Traversing the first conversation data set to identify all query texts in the first conversation data set; Determine whether there is a matching answer text for each of the query texts in the first conversation data set; Eliminating the inquiry texts for which there are no matching answer texts in the first dialogue data set to obtain an intermediate dialogue data set; the intermediate dialogue data set includes multiple dialogue texts; Semantic recognition is performed on the intermediate dialogue data set to remove dialogue texts that do not belong to a preset scene in the intermediate dialogue data set, thereby obtaining a second dialogue data set.

3. The method for generating a conversation summary based on a large language model according to claim 2, characterized in that: The performing semantic recognition on the intermediate dialogue data set to remove dialogue texts that do not belong to a preset scene in the intermediate dialogue data set to obtain a second dialogue data set includes: Inputting the intermediate dialogue data set into a third preset model; The semantics of each text in the intermediate dialogue data set is parsed by the third preset model, and dialogue texts in the intermediate dialogue data set that do not belong to the preset scene are eliminated according to the text meaning obtained by the parsing, so as to obtain the second dialogue data set.

4. The method for generating a conversation summary based on a large language model according to claim 1, characterized in that: One of the initial triples corresponds to one element information group; After inputting the second conversation data set into the first preset model to extract a plurality of initial triples through the first preset model, the method includes: Obtaining a time label corresponding to each of the initial triples, and inserting all the initial triples into a preset triple queue in the order of the time labels; Taking the first-ranked initial triplet in the preset triplet queue as the summary triplet; Detecting whether there is an overlapping triplet corresponding to the summary triplet in the preset triplet queue; the overlapping triplet refers to other initial triplet in the preset triplet queue that has the same element information group as the element information group of the summary triplet; Eliminate overlapping triples corresponding to the summary triplet in the preset triplet queue, extract the summary triplet from the preset triplet queue to the summary generation queue, and update the preset triplet queue; Return to the step of taking the initial triplet ranked first in the preset triplet queue as the summary triplet until there is no initial triplet in the preset triplet queue, input all summary triples in the summary generation queue into the second preset model, and obtain the second conversation summary output by the second preset model.

5. The method for generating a conversation summary based on a large language model according to claim 4, characterized in that: One of the element information groups includes three element information, one of which is an event element; The detecting whether there is an overlapping triplet corresponding to the summary triplet in the preset triplet queue comprises: Comparing the element information group of the initial triples except the summary triplet in the preset triplet queue with the element information group of the summary triplet; Recording the initial triplet that has the same three element information as the summary triplet as the overlapping triplet, and recording the initial triplet that has the same two element information as the other two element information in the element information group of the summary triplet except the event element as the triplet to be compared; Determine the semantic similarity between the event element of the triple to be compared and the event element of the summary triple, and compare the semantic similarity with a preset similarity threshold; When the semantic similarity exceeds the preset similarity threshold, the triples to be compared are recorded as the overlapping triples.

6. The method for generating a conversation summary based on a large language model according to claim 1, characterized in that: The step of inputting the second conversation data set into the first preset model to extract a plurality of initial triples through the first preset model comprises: Acquire preset prompt information; the preset prompt information includes sample text data, sample triples corresponding to the sample text data, and sample requirement information; Inputting the second dialogue data set and the preset prompt information into the first preset model, so as to extract a plurality of element groups from the second dialogue data set based on the sample text data and the sample triples through the first preset model; one of the element groups includes a character element and an event element; The action elements connecting the character elements and event elements in each of the element groups are determined through the first preset model, and the character elements, action elements and event elements corresponding to each of the element groups are integrated into initial triples according to the example requirement information and then output.

7. The method for generating a conversation summary based on a large language model according to claim 1, characterized in that: The step of combining all the extracted initial triples by using the second preset model to obtain a conversation summary corresponding to the first conversation data set includes: Acquire a summary prompt template, and generate a summary prompt text according to all the extracted initial triples and the summary prompt template; The summary prompt text is input into the second preset model to obtain a conversation summary corresponding to the first conversation data set.

8. A conversation summary generation device based on a large language model, characterized in that: include: A data set acquisition module, used to acquire a first conversation data set; a data set cleaning module, configured to clean the first conversation data set to remove redundant conversations in the first conversation data set to obtain a second conversation data set; a triplet extraction module, configured to input the second conversation data set into a first preset model, so as to extract a plurality of initial triples through the first preset model; A conversation summary generation module is used to input all the initial triples into a second preset model, so as to combine all the initial triples through the second preset model to obtain a first conversation summary corresponding to the first conversation data set.

9. An electronic device, characterized in that: include: one or more processors; one or more memories; and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a program or an instruction, and when the program or the instruction is executed, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Modularized man-machine collaborative decision-making method and device based on multiple agents

    CN120705416A

  • A multi-agent based modular human-machine collaborative decision-making method and device

    CN120705416B