[go: up one dir, main page]

TWI866860B - A method and device for generating summary master-slave dialogue information - Google Patents

A method and device for generating summary master-slave dialogue information Download PDF

Info

Publication number
TWI866860B
TWI866860B TW113117933A TW113117933A TWI866860B TW I866860 B TWI866860 B TW I866860B TW 113117933 A TW113117933 A TW 113117933A TW 113117933 A TW113117933 A TW 113117933A TW I866860 B TWI866860 B TW I866860B
Authority
TW
Taiwan
Prior art keywords
dialogue
category
role
master
slave
Prior art date
Application number
TW113117933A
Other languages
Chinese (zh)
Other versions
TW202546686A (en
Inventor
李學真
黃無名
Original Assignee
紙飛機服務科技股份有限公司
李學真
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 紙飛機服務科技股份有限公司, 李學真 filed Critical 紙飛機服務科技股份有限公司
Priority to TW113117933A priority Critical patent/TWI866860B/en
Application granted granted Critical
Publication of TWI866860B publication Critical patent/TWI866860B/en
Publication of TW202546686A publication Critical patent/TW202546686A/en

Links

Landscapes

  • Machine Translation (AREA)

Abstract

本發明提供了一種摘要主從式對話資訊生成方法及其裝置,該方法可應用於處理主從式對話技術領域,包括以下步驟:取得對話資訊;進行對話角色標記,形成具有角色標記之角色對話語句;將該角色對話資訊過濾;對該過濾後之該角色對話資訊進行特徵提取,生成角色對話的特徵向量;通過將該角色對話的特徵向量處理,得到對應複數個類別之類別訊息預測概率分布向量;確定類別摘要語句,透過將個別該角色對話語句在該複數個類別中各該類別的該類別訊息預測概率值與各該類別的類別訊息概率閥值比較,確定該個別該角色對話語句屬於該類別之類別訊息;以及生成類別摘要訊息。本發明提供的方法,能夠提高摘要資訊生成的準確性,避免了從角色對話資訊提取到每個類別的摘要資訊造成的重要資訊遺漏的問題,也使運算更快速、節省運算資源。例如,在長照機構的場景中,可以有效地將居服員與受照顧者的對話資訊摘要化,以便於後續的照護服務。The present invention provides a method and device for generating summary master-slave dialogue information. The method can be applied to the technical field of processing master-slave dialogue, and includes the following steps: obtaining dialogue information; performing dialogue role labeling to form role dialogue sentences with role labels; filtering the role dialogue information; performing feature extraction on the filtered role dialogue information to generate a feature vector of the role dialogue; obtaining a category message prediction probability distribution vector corresponding to a plurality of categories by processing the feature vector of the role dialogue; determining a category summary sentence by comparing the category message prediction probability value of the individual role dialogue sentence in each of the plurality of categories with the category message probability threshold value of each of the categories to determine that the individual role dialogue sentence belongs to the category message of the category; and generating a category summary message. The method provided by the present invention can improve the accuracy of summary information generation, avoid the problem of missing important information caused by extracting the role dialogue information into summary information of each category, and make the calculation faster and save calculation resources. For example, in the scenario of a long-term care institution, the dialogue information between the resident attendant and the cared person can be effectively summarized to facilitate subsequent care services.

Description

一種摘要主從式對話資訊生成方法及其裝置A method and device for generating summary master-slave dialogue information

本發明屬於處理對話的摘要資訊生成技術領域,尤其關於主從式對話的摘要資訊生成方法及其裝置。The present invention belongs to the field of summary information generation technology for processing dialogues, and in particular to a summary information generation method and device for master-slave dialogues.

對話摘要在許多應用場景中發揮了重要作用,特別是主從式互動對話的情境,例如在台灣的長期照護機構中,達成對話摘要任務的重點是從居服員(主方)和受照顧的個案(從方)之間的對話中歸納出需求摘要和解決方案之相關摘要,歸納出的訊息有助於幫助有相似問題的個案提供相關照護服務,同時有利於輔助長照機構做出合適的解決方案和提供合理的照護策略。Conversation summaries play an important role in many application scenarios, especially in master-slave interactive dialogue scenarios. For example, in long-term care institutions in Taiwan, the key to completing the dialogue summary task is to summarize the needs summary and solution summary from the dialogue between the resident attendant (master) and the cared-for case (slave). The summarized information helps provide relevant care services to cases with similar problems, and is also helpful in assisting long-term care institutions to make appropriate solutions and provide reasonable care strategies.

目前,對話摘要生成方法主要是基於Seq2Seq神經網路模型的生成式方法,該方法一般是從頭開始遞迴生成的,因此存在解碼效率低落的問題,並且不能很好地對輸入文本進行有效複用,存在生成的需求摘要和解決方案摘要品質較差,容易遺漏對照護方面的對話中關鍵訊息的問題。再者,目前並沒有特別針對主從式對話的情境之特點形成摘要之方法。因此,我們需要開發更有效的對話摘要生成方法,特別是在主從式互動對話的情況下使用,以提高對話摘要的品質和準確性及速度,更好地服務於台灣的長期照護機構。At present, the method for generating dialogue summaries is mainly based on the generative method of Seq2Seq neural network model. This method is generally generated recursively from scratch, so there is a problem of low decoding efficiency, and it is not good to effectively reuse the input text. There is a problem that the generated demand summary and solution summary are of poor quality and it is easy to miss the key information in the care dialogue. Furthermore, there is currently no method to form a summary specifically for the characteristics of the master-slave dialogue situation. Therefore, we need to develop a more effective dialogue summary generation method, especially for use in the case of master-slave interactive dialogue, to improve the quality, accuracy and speed of dialogue summaries, and better serve Taiwan's long-term care institutions.

本發明應用實例提供了一種主從式對話的摘要訊息生成方法及相關裝置,旨在解決現有技術中主從式對話的生成的摘要訊息品質和準確性及速度不足的問題。The application example of the present invention provides a method and related device for generating summary information of a master-slave dialogue, aiming to solve the problems of insufficient quality, accuracy and speed of generating summary information of a master-slave dialogue in the prior art.

本發明的一方面提供一種摘要訊息生成方法,該方法包括以下步驟: 取得對話資訊,該對話資訊包括複數個對話語句; 進行對話角色標記,比對辨識出一包含主方關鍵字之該對話語句,並將該對話語句所對應之聲紋特徵資料之角色標記為一主方,其餘該對話語句所對應之聲紋特徵資料之角色標記為一從方,使各該對話語句形成具有角色標記之角色對話語句,所有該些角色對話語句構成角色對話資訊; 將該角色對話資訊過濾,以辨別各該角色對話資訊內之各該角色對話語句歸屬於該主方或該從方; 對該過濾後之該角色對話資訊中每一該角色對話語句進行特徵提取,生成角色對話的特徵向量; 通過將該角色對話的特徵向量輸入多分支序列標注模型處理,得到對應複數個類別之類別訊息預測概率分布向量,每個該類別訊息預測概率分布向量包括對應各該角色對話語句的類別訊息預測概率值,各該類別訊息預測概率值用於表徵各該角色對話語句屬該類別的可能性; 確定類別摘要語句,透過將個別該角色對話語句在該複數個類別中各該類別的該類別訊息預測概率值與各該類別的類別訊息概率閥值比較,若大於(或等於)該類別訊息概率閥值,則確定該個別該角色對話語句屬於該類別之類別訊息;以及 生成類別摘要訊息,將屬於各該類別之該角色對話語句進行拼接,以生成複數個類別摘要訊息。 One aspect of the present invention provides a summary message generation method, which includes the following steps: Acquire dialogue information, the dialogue information includes a plurality of dialogue sentences; Perform dialogue role tagging, compare and identify a dialogue sentence containing a master keyword, and tag the role of the voiceprint feature data corresponding to the dialogue sentence as a master, and tag the role of the voiceprint feature data corresponding to the remaining dialogue sentences as a slave, so that each dialogue sentence forms a role dialogue sentence with a role tag, and all of these role dialogue sentences constitute role dialogue information; Filter the role dialogue information to identify each role dialogue sentence in the role dialogue information as belonging to the master or the slave; Extract features from each character dialogue sentence in the filtered character dialogue information to generate a feature vector of the character dialogue; By inputting the feature vector of the character dialogue into a multi-branch sequence annotation model for processing, a category message prediction probability distribution vector corresponding to a plurality of categories is obtained, each category message prediction probability distribution vector includes a category message prediction probability value corresponding to each character dialogue sentence, and each category message prediction probability value is used to characterize the possibility that each character dialogue sentence belongs to the category; Determine the category summary statement by comparing the predicted probability value of the category message of each of the multiple categories of the individual character dialogue statement with the category message probability threshold of each category. If it is greater than (or equal to) the category message probability threshold, determine that the individual character dialogue statement belongs to the category message of the category; and Generate category summary messages by splicing the character dialogue statements belonging to each category to generate multiple category summary messages.

其中,該進行對話角色標記之步驟,更包括: 將該主方或該從方其中之一的預先儲存聲紋特徵資料與該對話資訊中各該語句語音進行比對辨識,比對辨識後若與該主方相符合,標記為該主方,比對辨識後若與該主方不符合,標記為該從方;或比對辨識後若與該從方相符合,標記為該從方,比對辨識後若與該從方不符合,標記為該主方。 The step of marking the dialogue role further includes: Comparing and identifying the pre-stored voiceprint feature data of one of the master or the slave with the speech voice in the dialogue information, if it matches the master after the comparison and identification, it is marked as the master, if it does not match the master after the comparison and identification, it is marked as the slave; or if it matches the slave after the comparison and identification, it is marked as the slave, if it does not match the slave after the comparison and identification, it is marked as the master.

其中,更包含非該主方與非該從方之附屬角色之對話,而該將該角色對話資訊過濾之步驟,包括: 對於該非主方與非從方之附屬角色的該角色對話語句決定刪除或保留。 It also includes the dialogue between the non-master and the non-slave subordinate characters, and the step of filtering the character dialogue information includes: Deciding to delete or retain the character dialogue sentences between the non-master and the non-slave subordinate characters.

其中,該將該角色對話資訊過濾之步驟,包括: 計算該附屬角色之該角色對話語句數與其所附屬之該主方或該從方的該角色對話語句數之比例,並透過一預定閥值相比較以決定是否刪除或保留。 The step of filtering the character dialogue information includes: Calculating the ratio of the number of character dialogue sentences of the subordinate character to the number of character dialogue sentences of the master or slave to which it is subordinate, and comparing them through a predetermined threshold to determine whether to delete or retain.

其中,該確定類別摘要語句之步驟,包括:當一該主方之該角色對話語句確定屬於某一類別時,則其後立即出現之該從方之該角色對話語句不經該概率閥值比較運算而直接歸屬於同為該類別之該類別訊息,或者其後立即出現複數之該從方之該角色對話語句,只選擇其部分語句進行該概率閥值比較判別,且若結果亦屬於該類別之該類別訊息,則其餘未選擇之部分語句直接歸屬於同為該類別之該類別訊息,不再進行該概率閥值比較判別。Among them, the step of determining the category summary sentence includes: when the role dialogue sentence of the master party is determined to belong to a certain category, the role dialogue sentence of the slave party that appears immediately thereafter is directly attributed to the category message of the same category without the probability valve comparison operation, or when multiple role dialogue sentences of the slave party appear immediately thereafter, only part of the sentences are selected for the probability valve comparison judgment, and if the result also belongs to the category message of the category, the remaining unselected part of the sentences are directly attributed to the category message of the same category, and the probability valve comparison judgment is no longer performed.

本發明的另一方面則提供一種主從式對話資訊生成之裝置,可運作於一電腦或行動裝置設備,該裝置包括: 語句聲源轉換模組,將對話語句聲源轉換為文字檔; 對話角色標記模組,比對辨識出一包含主方關鍵字之該角色對話語句,並將該角色對話語句所對應之聲紋特徵資料之角色標記為一主方,其餘該角色對話語句所對應之聲紋特徵資料之角色標記為一從方,使各該角色對話語句形成具有角色標記之角色對話語句,所有該些角色對話語句構成角色對話資訊; 過濾模組,將該角色對話資訊過濾,以辨別各該角色對話資訊內之各該角色對話語句歸屬於該主方或該從方; 特徵提取模組,對該過濾後之該角色對話資訊中每一該角色對話語句進行特徵提取,生成角色對話的特徵向量; 概率分布向量預測模組,通過對該角色對話的特徵向量處理,得到對應複數個類別的類別訊息預測概率分布向量,每個該類別訊息預測概率分布向量包括對應各該角色對話語句的類別訊息預測概率值,各該類別訊息預測概率值用於表徵各該角色對話語句屬該類別的可能性; 類別摘要語句確定模組,透過將個別該角色對話語句在該複數個類別中各該類別的該類別訊息預測概率值與各該類別的類別訊息概率閥值比較,若大於(或等於)該類別訊息概率閥值,則確定該個別該角色對話語句屬於該類別之類別訊息;以及 類別摘要訊息生成模組,將屬於各該類別之各該角色對話語句進行拼接,生成複數個類別摘要訊息。 Another aspect of the present invention provides a device for generating master-slave dialogue information, which can be operated on a computer or mobile device, and the device includes: A speech sound source conversion module, which converts the dialogue sentence sound source into a text file; A dialogue role marking module, which compares and identifies a role dialogue sentence containing a master keyword, and marks the role of the voiceprint feature data corresponding to the role dialogue sentence as a master, and marks the role of the voiceprint feature data corresponding to the rest of the role dialogue sentences as a slave, so that each role dialogue sentence forms a role dialogue sentence with a role mark, and all these role dialogue sentences constitute role dialogue information; A filtering module filters the character dialogue information to identify whether each character dialogue sentence in each character dialogue information belongs to the master or the slave; A feature extraction module extracts features from each character dialogue sentence in the filtered character dialogue information to generate a feature vector of the character dialogue; A probability distribution vector prediction module processes the feature vector of the character dialogue to obtain a category message prediction probability distribution vector corresponding to a plurality of categories, each category message prediction probability distribution vector includes a category message prediction probability value corresponding to each character dialogue sentence, and each category message prediction probability value is used to characterize the possibility that each character dialogue sentence belongs to the category; The category summary statement determination module compares the predicted probability value of the category message of each of the multiple categories of the individual character dialogue statement with the category message probability threshold of each category. If the predicted probability value is greater than (or equal to) the category message probability threshold, the individual character dialogue statement is determined to belong to the category message of the category; and the category summary message generation module splices the character dialogue statements belonging to each category to generate multiple category summary messages.

其中,該對話角色標記模組更包括將該主方或該從方其中之一的預先儲存聲紋特徵資料與該對話資訊中各該語句語音進行比對辨識,比對辨識後若與該主方相符合,標記為該主方,比對辨識後若與該主方不符合,標記為該從方;或比對辨識後若與該從方相符合,標記為該從方,比對辨識後若與該從方不符合,標記為該主方。The dialogue role marking module further includes comparing and identifying the pre-stored voiceprint feature data of one of the master or the slave with the speech voice in the dialogue information. If the voiceprint feature data matches the master after the comparison and identification, the master is marked as the master. If the voiceprint feature data does not match the master after the comparison and identification, the slave is marked as the slave. Or if the voiceprint feature data matches the slave after the comparison and identification, the slave is marked as the slave. If the voiceprint feature data does not match the slave after the comparison and identification, the master is marked as the slave.

其中,更包含非該主方與非該從方之附屬角色之對話,而該過濾模組進行該將該角色對話資訊過濾之步驟包括: 對於該非主方與非從方之附屬角色的該角色對話語句決定刪除或保留。 It also includes the dialogue between the subordinate characters who are not the master and the slave, and the filtering module performs the step of filtering the role dialogue information including: Decide whether to delete or retain the role dialogue sentences between the subordinate characters who are not the master and the slave.

其中,該過濾模組計算該附屬角色之該角色對話語句數與其所附屬之該主方或該從方的該角色對話語句數之比例,並透過一預定閥值相比較以決定是否刪除或保留。The filtering module calculates the ratio of the number of dialogue sentences of the subordinate character to the number of dialogue sentences of the master or slave to which the subordinate character belongs, and compares them with a predetermined threshold value to determine whether to delete or retain.

其中,該類別摘要語句確定模組設定為於當一該主方之該角色對話語句確定屬於某一類別時,則其後立即出現之該從方之該角色對話語句不經該概率閥值比較運算而直接歸屬於同為該類別之該類別訊息,或者其後立即出現複數之該從方之該角色對話語句,只選擇其部分語句進行該概率閥值比較判別,且若結果亦屬於該類別之該類別訊息,則其餘未選擇之部分語句直接歸屬於同為該類別之該類別訊息,不再進行該概率閥值比較判別。Among them, the category summary sentence determination module is set to, when the role dialogue sentence of the master party is determined to belong to a certain category, the role dialogue sentence of the slave party that appears immediately thereafter is directly attributed to the category message of the same category without the probability valve comparison operation, or if multiple role dialogue sentences of the slave party appear immediately thereafter, only some of the sentences are selected for the probability valve comparison judgment, and if the result also belongs to the category message of the category, then the remaining unselected part of the sentences are directly attributed to the category message of the same category, and the probability valve comparison judgment is no longer performed.

其中,該摘要主從式對話資訊生成之裝置,更包括: 資料庫,包括: 語音資料庫,儲存有或可用以儲存至少該主方與該從方之一的語音資料;以及 角色判斷器關鍵字庫,儲存有與該主方角色相關之關鍵字或該主方及/或該從方之人名為關鍵字。 The device for generating summary master-slave dialogue information further includes: Database, including: Voice database, storing or being used to store voice data of at least one of the master and the slave; and Role determiner keyword database, storing keywords related to the role of the master or the names of the master and/or the slave as keywords.

其中,該對話角色標記模組更包括角色判斷器,進行該關鍵字之比對辨識。The dialogue role marking module further includes a role determiner to perform keyword comparison and identification.

本發明的另一方面提供了一種電腦設備,包括: 記憶體、收發器、處理器以及匯流排系統;其中,記憶體用於儲存程式;處理器用於執行記憶體中的程式,包括執行上述各方面的方法;匯流排系統用於連接記憶體以及處理器,以使記憶體以及處理器進行通信。本發明的另一方面提供了一種電腦可讀儲存介質,電腦可讀儲存介質中儲存有指令,當其在電腦上運行時,使得電腦執行上述各方面的方法。Another aspect of the present invention provides a computer device, including: a memory, a transceiver, a processor, and a bus system; wherein the memory is used to store programs; the processor is used to execute the programs in the memory, including executing the methods of the above aspects; the bus system is used to connect the memory and the processor so that the memory and the processor communicate. Another aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when the instructions are run on the computer, the computer executes the methods of the above aspects.

本發明的另一方面提供了一種電腦程式產品或電腦程式,該電腦程式產品或電腦程式包括電腦指令,該電腦指令儲存在電腦可讀儲存介質中。電腦設備的處理器從電腦可讀儲存介質讀取該電腦指令,處理器執行該電腦指令,使得該電腦設備執行上述各方面所提供的方法。Another aspect of the present invention provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided by the above aspects.

從以上技術方法可以看出,本發明應用實例在主從式對話的情境具有顯著的優點,例如長照場域。本發明提供了一種針對主從式對話的摘要訊息生成方法及相關裝置,尤其特別適用於居服員或社工(主方)與受照顧個案(從方)之間的交流。From the above technical methods, it can be seen that the application examples of the present invention have significant advantages in the context of master-slave dialogue, such as long-term care. The present invention provides a summary message generation method and related devices for master-slave dialogue, which are particularly suitable for communication between resident attendants or social workers (master) and cared-for cases (slave).

在長照場域中,它能夠有效地從居服員或社工與受照顧個案之間的對話中提取出關鍵訊息,如(主方)服務品質、(從方)健康狀況、及(從方)個案反饋之其他服務需求等,並生成結構化的摘要。這對於提高長照服務的溝通效率、記錄和追蹤個案狀況、以及提供個性化的護理建議至關重要。In the long-term care field, it can effectively extract key information from the dialogue between residents or social workers and cared cases, such as service quality (main party), health status (slave party), and other service needs reported by the case (slave party), and generate a structured summary. This is crucial to improving the communication efficiency of long-term care services, recording and tracking case status, and providing personalized care recommendations.

總之,本發明應用實例通過上述方法並有效地生成各類別的摘要訊息,特別適用於主從式對話的情境,例如長照場域中的對話摘要生成,從而提升了對話摘要的品質和準確性及速度,增加了實用性。In summary, the application example of the present invention uses the above method to effectively generate summary messages of various categories, which is particularly suitable for scenarios of master-slave dialogues, such as dialogue summary generation in long-term care settings, thereby improving the quality, accuracy and speed of dialogue summaries and increasing practicality.

本發明實施例中術語“或”,描述關聯對象的關聯關係,表示可以存在三種關係,例如,A或B,可以表示:單獨存在A,同時存在A和B,單獨存在B這三種情况。字符“/”一般表示前後關聯對象是一種“或”的關係。In the embodiments of the present invention, the term "or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.

本發明實施例中術語“多個”是指兩個或兩個以上,其它量詞與之類似。In the embodiments of the present invention, the term "plurality" refers to two or more, and other quantifiers are similar.

下面將結合本發明實施例中的附圖,對本發明實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本發明一部分實施例,並不是全部的實施例。基於本發明中的實施例,本領域具通常知識者在沒有做出進步性改良前提下所獲得的所有其他實施例,都屬本發明保護的範圍。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making progressive improvements are within the scope of protection of the present invention.

其中,方法和裝置是基於同一構思的,由於方法和裝置解決問題的原理相似,因此裝置和方法的實施可以相互參見,重複之處不再贅述。The method and the device are based on the same concept. Since the principles of the method and the device for solving problems are similar, the implementation of the device and the method can refer to each other, and the repetitions will not be repeated.

本發明應用實例提供了一種結合主從式對話標記的摘要訊息生成方法及相關裝置,旨在解決現有技術中根據對話訊息生成的摘要訊息品質和準確性及速度不足的問題,特別適用於主從式對話的情境。The application example of the present invention provides a summary message generation method and related device combined with master-slave dialogue markers, aiming to solve the problems of insufficient quality, accuracy and speed of summary messages generated based on dialogue messages in the prior art, and is particularly suitable for the scenario of master-slave dialogue.

在對話情境中,常常存在有主從式對話的情境,除前述之居服員或社工(主)與受照顧的個案(從)之間屬之,例如醫生(主)與病人(從)之間的對話,或會計師/律師(主)與其客戶(從)之間的對話。在大部分的主從式對話的情境下,主要由主方主導或支配對話的進行,從方順應或受主方引導進行對話。在大部分的主從式對話的情境下,主方較常以問句引導對話,從方較常為對應回答問句之一方。在大部分的主從式對話的情境下,主方通常為具有專業知識或屬資源提供之一方,從方通常為受主方協助或配合其作為之一方。In dialogue situations, there are often master-slave dialogues, in addition to the aforementioned dialogues between home attendants or social workers (master) and the cared-for clients (slave), such as the dialogues between doctors (master) and patients (slave), or the dialogues between accountants/lawyers (master) and their clients (slave). In most master-slave dialogue situations, the master mainly leads or controls the dialogue, and the slave follows or is guided by the master. In most master-slave dialogue situations, the master often guides the dialogue with questions, and the slave is often the one who answers the questions. In most master-slave dialogue situations, the master is usually the one who has professional knowledge or is the resource provider, and the slave is usually the one who assists or cooperates with the master.

請參閱圖1,為本發明之主從式對話資訊生成之裝置100,該主從式對話資訊生成之裝置100是一種電腦程式產品或電腦程式,該電腦程式產品或電腦程式包括電腦指令,該電腦指令儲存在電腦可讀取之儲存介質中,可運作於一電腦,廣義地說電腦包括電腦或行動裝置設備等。本發明之主從式對話資訊生成之裝置100包括:語句聲源轉換模組1,對話角色標記模組2,過濾模組3,特徵提取模組4,概率分布向量預測模組5,類別摘要語句確定模組6,類別摘要訊息生成模組7,以及資料庫8。其中,語句聲源轉換模組1以及資料庫8可選擇內設或者外掛連接,外掛連接指與他元件(模組)係在同一執行硬體中之不同程式,或不在同一硬體,或透過網路雲端而溝通連結。Please refer to FIG. 1, which is a device 100 for generating master-slave dialogue information of the present invention. The device 100 for generating master-slave dialogue information is a computer program product or a computer program. The computer program product or the computer program includes computer instructions. The computer instructions are stored in a computer-readable storage medium and can be operated on a computer. In a broad sense, the computer includes a computer or a mobile device. The device 100 for generating master-slave dialogue information of the present invention includes: a sentence sound source conversion module 1, a dialogue role labeling module 2, a filtering module 3, a feature extraction module 4, a probability distribution vector prediction module 5, a category summary sentence determination module 6, a category summary message generation module 7, and a database 8. The speech sound source conversion module 1 and the database 8 can be internally installed or externally connected. The external connection means that the other components (modules) are different programs in the same execution hardware, or are not in the same hardware, or are connected through a network cloud.

其中,對話角色標記模組2內更包括語音辨識比對器21及可選擇性地設置之角色判斷器22,過濾模組3內更包括內容比對器31,特徵提取模組4內更包括文本摘要層41、特徵嵌入層42及特徵融合層43,概率分布向量預測模組5內更包括多分支序列標注模型51,其中多分支序列標注模型51內更包括M(M≧2) 個類別訊息標注模組511,資料庫8中存有語音資料庫81及角色判斷器關鍵字庫82。Among them, the dialogue role labeling module 2 further includes a speech recognition matcher 21 and an optionally set role determiner 22, the filtering module 3 further includes a content matcher 31, the feature extraction module 4 further includes a text summary layer 41, a feature embedding layer 42 and a feature fusion layer 43, the probability distribution vector prediction module 5 further includes a multi-branch sequence annotation model 51, wherein the multi-branch sequence annotation model 51 further includes M (M≧2) category information annotation modules 511, and the database 8 stores a speech database 81 and a role determiner keyword library 82.

請參閱圖2,為本發明之主從式對話資訊生成方法之流程圖,該方法包括如以下說明之步驟,其中所涉裝置可一併參閱圖1。Please refer to FIG. 2 , which is a flow chart of the master-slave dialogue information generating method of the present invention. The method includes the steps described below, and the devices involved can be referred to in conjunction with FIG. 1 .

步驟S1:取得對話資訊:本步驟主要是由主從對話之雙方,取得其間對話內容,取得的來源可能是現場對話之錄音經由處理後轉換為文字檔,也可以是透過電腦或行動裝置電話等設備之網路線上對話,此情形又可能包括以語音對話之型式,或對話之進行本身即以文字進行。若來源為語音,轉換為文字檔時,轉換之方式可以是人工打字或利用電腦程式處理自動轉換之方式。其例示可參例如圖3所示為本發明之一居服員或社工(主)A與受照顧的個案(從)B之間的對話,如圖4所示為本發明之一醫生(主)A與病人(從)B之間的對話。兩者皆為(可能係已經轉換為)文字檔之結果。經由此步驟S1,可收集到包含N個對話語句的對話資訊,其中N為大於1之整數。在本發明中一實施例中,利用電腦程式處理自動轉換之方式係透過可選擇內設或者外掛連接一語句聲源轉換模組1,將語句聲源轉換為文字檔。Step S1: Obtaining dialogue information: This step is mainly for the two parties of the master-slave dialogue to obtain the content of the dialogue. The source of the acquisition may be the recording of the on-site dialogue converted into a text file after processing, or it may be an online dialogue through a computer or mobile device, phone, etc. This situation may also include the form of voice dialogue, or the dialogue itself is conducted in text. If the source is voice, when converted into a text file, the conversion method can be manual typing or automatic conversion using a computer program. For example, Figure 3 shows a dialogue between a home attendant or social worker (master) A and a cared case (slave) B in the present invention, and Figure 4 shows a dialogue between a doctor (master) A and a patient (slave) B in the present invention. Both are (may have been converted into) text files. Through this step S1, dialogue information including N dialogue sentences can be collected, where N is an integer greater than 1. In one embodiment of the present invention, the automatic conversion method using a computer program is to convert the sentence sound source into a text file by connecting a sentence sound source conversion module 1 that can be optionally built-in or externally connected.

步驟S2:對話角色標記:對於前述步驟S1收集到的N個對話語句,對於每一個個別對話語句標記對話所屬的角色,使每個對話語句都帶有角色標記,即標記每個語句是由對話中的主方還是從方發出。在取得的對話資訊來源為現場對話之錄音時,可經由處理轉換為文字檔時同時進行此標記之動作,例如可以是人工打字之同時對每一個個別對話語句進行對話角色標記,若為利用電腦程式處理自動轉換之方式,則可透過語音技術,例如語音之特徵(例如男女之音頻不同,或聲紋比對技術等),並在語句聲源轉換為文字檔時,透過本發明之對話角色標記模組2進行標記,以自動標記為來自A、B不同兩人,並再由人工定義(或更改)A、B何者為主方,何者從方。在取得的對話資訊來源為透過電腦或行動裝置等設備之網路線上對話,此情形可直接將源自主方特定電腦或行動裝置等設備來源(可能為特定電腦或行動裝置或同一設備下不同之麥克風)之語句歸屬標記為主方,將由從方特定設備來源之語句歸屬標記為從方。以此種實施例之特徵為例,也可以是雖為主從雙方現場對話,但主方先配戴特定之隨身麥克風並(有線或無線)連接到錄音設備,而從方則由現場錄音設備廣角式另行收音。在本發明中一實施例中,可選擇內設或者外掛連接一語句聲源轉換模組1,將語句聲源轉換為文字檔。Step S2: Dialogue role labeling: For the N dialogue sentences collected in the aforementioned step S1, label the role to which the dialogue belongs for each individual dialogue sentence, so that each dialogue sentence has a role label, that is, label whether each sentence is issued by the main party or the slave party in the dialogue. When the source of the acquired dialogue information is a recording of a live dialogue, the marking action can be performed while it is being processed and converted into a text file. For example, each individual dialogue sentence can be marked with dialogue roles while it is being typed manually. If it is a method of automatically converting using a computer program, it can be marked through voice technology, such as voice characteristics (such as different audio frequencies between men and women, or voiceprint matching technology, etc.), and when the sentence sound source is converted into a text file, it can be marked through the dialogue role marking module 2 of the present invention, so that it can be automatically marked as coming from two different people, A and B, and then manually defined (or changed) which of A and B is the main party and which is the follower. When the source of the acquired conversation information is an online conversation through a computer or mobile device, in this case, the sentences from the master's specific computer or mobile device (which may be a specific computer or mobile device or different microphones under the same device) can be directly attributed to the master, and the sentences from the slave's specific device can be attributed to the slave. Taking the characteristics of this embodiment as an example, although it is a live conversation between the master and the slave, the master first wears a specific portable microphone and connects it to the recording device (wired or wireless), while the slave uses the live recording device to collect the sound separately in a wide-angle manner. In one embodiment of the present invention, a sentence sound source conversion module 1 can be selected to be built-in or externally connected to convert the sentence sound source into a text file.

在本發明中一實施例中,對話角色標記之方法可由對話角色標記模組2進行,在語句聲源轉換為文字檔時自動標記為來自A、B不同兩人,並再由人工定義(或更改)A、B何者為主方,何者從方。或者在資料庫8中(可儲存在硬體設備之儲存器,例如硬碟等)存有語音資料庫81,語音資料庫81存有已知對話者(可以是主從雙方)的語音辨識資料(例如聲紋特徵資料),或特別是主方的語音辨識資料(例如居服員或社工),並在前述透過語句聲源轉換模組1將語句聲源轉換為文字檔時,由對話角色標記模組2的語音辨識比對器21自動抓取主方語音辨識資料,並比對辨識後符合者予以標記為主方,而對話中之另一方(或不符合者)則標記為從方。如此可透過對話角色標記模組2以進行自動標記,以形成對於N個對話語句中每一個個別對話語句都標記有對話角色標記之角色對話資訊。在本發明中另一實施例,對話角色標記模組2之語音辨識比對器21自動抓取主從雙方之語音辨識資料,並比對辨識後標記為主方或從方。In one embodiment of the present invention, the method of dialogue role labeling can be performed by the dialogue role labeling module 2, which automatically labels the speech source as coming from two different persons, A and B, when the speech source is converted into a text file, and then manually defines (or changes) which of A and B is the main party and which is the subordinate party. Alternatively, a voice database 81 is stored in the database 8 (which can be stored in a storage device of a hardware device, such as a hard disk, etc.), and the voice database 81 stores voice recognition data (such as voiceprint feature data) of known interlocutors (which can be both the master and the slave), or in particular voice recognition data of the master (such as a resident attendant or a social worker). When the sentence sound source conversion module 1 converts the sentence sound source into a text file, the voice recognition comparator 21 of the dialogue role marking module 2 automatically captures the master's voice recognition data, and after comparison and recognition, the one that meets the requirements is marked as the master, and the other party in the dialogue (or the one that does not meet the requirements) is marked as the slave. In this way, the dialogue role marking module 2 can be used to automatically mark the dialogue roles, so as to form role dialogue information in which each individual dialogue sentence in the N dialogue sentences is marked with the dialogue role mark. In another embodiment of the present invention, the voice recognition and matching device 21 of the dialogue role marking module 2 automatically captures the voice recognition data of the master and the slave, and marks them as the master or the slave after matching and recognition.

值得注意的是,雖然在大部分的主從式對話的情境下,對話者通常只有主方與從方兩人進行對話,但仍可能在主方或從方之一方,或者主方及從方之雙方都各自有其附屬角色參與或支持輔助該方之對話,或者只是在對話過程中偶然性地插入與主要對話不相關之語句。例如在居服員或社工(主)與受照顧的個案(從)之間的對話,居服員或社工(主)可能有其助理或督察,而受照顧的個案(從)可能有其陪同家屬。而在醫生(主)與病人(從)之間的對話,醫生(主)可能有協助之護士,而病人(從)可能有其陪同家屬。然而可理解的是,透過上述之方法,一樣可對附屬角色出現之語句予以標記。舉例而言,前述資料庫中語音資料庫除了存有主方居服員或社工的語音辨識資料外,亦存有主方常合作之助理或督察之語音辨識資料。在一實施例中,主方之語句被標記為A,從方之語句被標記為B;而在主方之附屬角色出現之語句被標記為A1,從方之附屬角色出現之語句被標記為B1。It is worth noting that although in most situations of master-slave dialogue, there are usually only two people, the master and the slave, in the dialogue, it is still possible that one of the master or the slave, or both the master and the slave, has a subordinate role to participate in or support the dialogue, or just occasionally insert sentences unrelated to the main dialogue during the dialogue. For example, in the dialogue between the resident attendant or social worker (master) and the cared case (slave), the resident attendant or social worker (master) may have his assistant or supervisor, and the cared case (slave) may have his accompanying family members. In the dialogue between the doctor (master) and the patient (slave), the doctor (master) may have an assisting nurse, and the patient (slave) may have his accompanying family members. However, it is understandable that through the above method, the sentences in which the subordinate role appears can also be marked. For example, the voice database in the aforementioned database not only stores the voice recognition data of the host's resident attendant or social worker, but also stores the voice recognition data of the host's assistant or supervisor. In one embodiment, the master's sentence is marked as A, and the slave's sentence is marked as B; and the sentence in which the master's subordinate role appears is marked as A1, and the sentence in which the subordinate role appears is marked as B1.

在一實施例中,經由上述方法分別辨識及標記主方之語句被為A,主方之附屬角色之語句標記為A1,從方之語句標記為B,對未存有語音辨識資料之其他人之語句聲源自動設定為從方之附屬角色,並予以標記為B1。In one embodiment, the above method is used to identify and mark the sentences of the master as A, the sentences of the subordinate character of the master as A1, and the sentences of the subordinate as B. The speech sources of other people for whom no voice recognition data exists are automatically set as the subordinate character of the subordinate and marked as B1.

在本發明中另一實施例中,對話角色標記之方法可由對話角色標記模組2中(可選擇性地)設置角色判斷器22進行角色判斷,角色判斷器22抓取對話開始主從雙方一預定數目之語句,其中該預定數目大於或等於2(例如各自前3句,通常是自我介紹之語句,或存在於同一錄音檔之前6句),並輔以儲存於資料庫8之角色判斷器關鍵字庫82中之關鍵字,例如”居服員”、”社工”、”助理”、”督察”、”醫生”、”護士”等,或”服務機構名稱(社福、長照、醫院、小兒科)”等,或已知主方及/或從方之人名(包括姓及/或名)等,如此可進行角色判斷並予以語句之角色標記。角色判斷器22可視情況獨立運作或輔助性地搭配前述之方法進行角色判斷及標記。例如在一獨立運作之實施例中,對話角色標記之方法先可由角色判斷器22進行角色判斷,在取得的對話資訊來源為前述之透過電腦或行動裝置等設備之網路線上對話之情形下,可直接如上述方法透過關鍵字將判斷出為主方之特定電腦或行動裝置等設備來源(可能為特定電腦或行動裝置或同一設備下不同之麥克風)之語句歸屬標記為主方,另一方之語句歸屬標記為從方。又在一輔助性運作之實施例中,對話角色標記之方法先可由角色判斷器22進行角色判斷,直接如上述方法透過關鍵字將判斷出為主方之語句聲源,並直接抓取主方語音辨識資料,並比對辨識後符合者予以標記為主方,如此可降低運算次數及資源。又在另一實施例中,可先利用角色判斷器22進行角色判斷,比對辨識出一包含主方關鍵字之該對話語句,並將該對話語句所對應之聲紋特徵資料之角色標記為主方(可同時將此對應之主方聲紋特徵資料存入資料庫8中的語音資料庫81),其餘該對話語句所對應之聲紋特徵資料之角色標記為從方(可同時將此對應之從方聲紋特徵資料存入資料庫8中的語音資料庫81),並將各該對話語句形成具有角色標記之角色對話資訊。上面提及之實施例的實際運用及判斷結果,可以先參閱圖3中對話過程之前2個語句,或圖4中對話過程之前1個語句。In another embodiment of the present invention, the method of dialogue role labeling can be performed by (optionally) setting a role determiner 22 in the dialogue role labeling module 2 to perform role determination. The role determiner 22 captures a predetermined number of sentences of the master and the slave at the beginning of the dialogue, wherein the predetermined number is greater than or equal to 2 (for example, the first 3 sentences of each, which are usually self-introduction sentences, or the first 6 sentences existing in the same recording file). The role determination device 22 can be supplemented by keywords stored in the role determination device keyword library 82 of the database 8, such as "residential attendant", "social worker", "assistant", "inspector", "doctor", "nurse", etc., or "service agency name (social welfare, long-term care, hospital, pediatrics)", etc., or the names of the principal and/or subordinate parties (including surname and/or given name), etc., so that the role determination can be performed and the role label of the sentence can be given. The role determination device 22 can operate independently or assistively with the aforementioned method to perform role determination and labeling according to the situation. For example, in an independently operated embodiment, the method of dialogue role labeling can first be performed by the role determiner 22 to perform role determination. In the case where the source of the dialogue information obtained is the aforementioned online dialogue through a computer or mobile device, the speech of a specific computer or mobile device source (which may be a specific computer or mobile device or different microphones under the same device) determined as the master party can be directly marked as the master party through keywords as described above, and the speech of the other party can be marked as the slave party. In another embodiment of auxiliary operation, the method of dialogue role labeling can first be performed by the role determiner 22 to perform role determination, and directly determine the sentence source of the main party through keywords as described above, and directly capture the main party voice recognition data, and mark the matching one as the main party after comparison and recognition, so as to reduce the number of calculations and resources. In another embodiment, the role determiner 22 may be used to perform role determination, compare and identify a dialogue sentence containing a master keyword, and mark the role of the voice print feature data corresponding to the dialogue sentence as the master (the corresponding master voice print feature data may be stored in the voice database 81 in the database 8 at the same time), and mark the role of the voice print feature data corresponding to the remaining dialogue sentences as the slave (the corresponding slave voice print feature data may be stored in the voice database 81 in the database 8 at the same time), and form role dialogue information with role marks for each dialogue sentence. The actual application and judgment results of the above-mentioned embodiments can be seen from the two sentences before the dialogue process in FIG. 3 , or the one sentence before the dialogue process in FIG. 4 .

步驟S3:將角色對話資訊過濾,對於附屬角色的對話決定刪除或保留:如上所述,雖然在大部分的主從式對話的情境下,對話者通常只有主方與從方兩人進行對話,但在仍可能在主方或從方之一方,或者主方及從方之雙方都各自有其他附屬角色參與支持該方之對話或者只是在對話過程中插入與主要對話不相關之語句。在本發明中,過濾方法可由過濾模組3進行以對於附屬角色的對話決定刪除或保留,達到辨別各該對話語句歸屬於主方或與從方。而過濾模組3過濾之方式,可由使用者設定為對附屬角色之對話予以一律刪除,或一律保留,或每次進行資訊摘要時再由使用者自行選擇刪除或保留。在另一實施方式,過濾模組3係以附屬角色出現語句之相對比例進行過濾,即在整個對話中,附屬角色出現的語句數與其所附屬之主(從)方出現的語句數之比例,透過一閥值決定是否刪除(小於或等於該閥值)或保留(大於或等於該閥值)。在另一實施方式,過濾模組3係以附屬角色出現語句數之數目,透過一閥值決定是否刪除(小於或等於該閥值)或保留(大於或等於該閥值)。上述實施例之方法特別有效可過濾附屬角色只是在對話過程中插入與主要對話不相關之語句或對整個對話之資訊不甚重要之情境。Step S3: Filtering the role dialogue information, and deciding to delete or retain the dialogue of the subordinate role: As mentioned above, although in most master-slave dialogue situations, the dialogue is usually conducted by only the master and the slave, it is still possible that the master or the slave, or both the master and the slave, have other subordinate roles participating in the dialogue to support the dialogue or simply inserting sentences unrelated to the main dialogue during the dialogue. In the present invention, the filtering method can be performed by the filtering module 3 to decide to delete or retain the dialogue of the subordinate role, so as to distinguish whether each dialogue sentence belongs to the master or the slave. The filtering method of the filtering module 3 can be set by the user to delete all the dialogues of the subordinate characters, or to keep all of them, or the user can choose to delete or keep them each time the information summary is performed. In another embodiment, the filtering module 3 filters based on the relative proportion of the sentences appearing in the subordinate characters, that is, in the entire dialogue, the ratio of the number of sentences appearing in the subordinate characters to the number of sentences appearing in the master (slave) party to which it is attached, and determines whether to delete (less than or equal to the valve value) or keep (greater than or equal to the valve value) through a valve value. In another embodiment, the filtering module 3 determines whether to delete (less than or equal to the valve value) or keep (greater than or equal to the valve value) based on the number of sentences appearing in the subordinate characters. The method of the above embodiment is particularly effective in filtering out situations where the auxiliary character merely inserts sentences irrelevant to the main dialogue or the information of the entire dialogue is not very important.

又在另一實施方式,過濾模組3係先透過內容比對器31將附屬角色出現之語句進行內容比對,即將該附屬角色出現之語句與在該語句之前方及後方出現的其所附屬之主(從)方語句之內容比對,決定內容相似度比例,並透過一閥值決定是否刪除(大於或等於該閥值)或保留(小於或等於該閥值)。此實施方式,特別在附屬角色是附屬從方,例如受照顧的個案(從)的陪同家屬或病人(從)的陪同家屬之情形特別有所助益。因為從方或其附屬角色可能只是覆述另一者說過之話語,特別是在長照情境下,受照顧的個案(從)為較年長者之情形。在此實施例中,一更細部實施例是過濾模組3可以經由內容比對器31回饋之結果,刪除從方之內容相似之語句,而保留附屬角色之相對應語句。此係反映附屬角色之語句內容較其附屬之從方之內容豐富充足(內容更多)或長度更長,特別是在長照情境下,受照顧的個案(從)為較年長者之情形下,附屬角色(例如其子女)反而是主要對話內容提供者,而較年長者之從方只是習慣性簡單附和。或者換方式說明,亦可以是過濾模組3係以附屬角色之語句內容取代其附屬之從方之語句內容;或者說,係將附屬角色之語句確定歸屬於從方。In another embodiment, the filtering module 3 first compares the content of the sentences in which the subordinate role appears through the content matcher 31, that is, the sentences in which the subordinate role appears are compared with the content of the sentences of the main (slave) party to which it is attached that appear before and after the sentences, determine the content similarity ratio, and determine whether to delete (greater than or equal to the threshold) or retain (less than or equal to the threshold) through a threshold. This embodiment is particularly helpful in the case where the subordinate role is a subordinate servant, such as the accompanying family member of the cared case (slave) or the accompanying family member of the patient (slave). Because the servant or its subordinate role may just repeat the words spoken by the other person, especially in the long-term care situation, when the cared case (slave) is an older person. In this embodiment, a more detailed embodiment is that the filtering module 3 can delete the sentences with similar contents of the subordinate party through the results of the feedback of the content matcher 31, and retain the corresponding sentences of the subordinate role. This reflects that the sentences of the subordinate role are richer and more sufficient (more content) or longer than the subordinate party to which it is subordinate. Especially in the long-term care situation, when the cared-for case (subject) is an older person, the subordinate role (such as his children) is the main provider of the dialogue content, and the older subordinate party is just a simple agreement out of habit. Or to explain it in another way, the filtering module 3 can also replace the sentence content of the subordinate party with the sentence content of the subordinate role; or in other words, the sentence of the subordinate role is determined to belong to the subordinate party.

在沒有附屬角色參與對話之情境下(也就是沒有附屬角色之語句之情境),在本步驟係直接以上述步驟S2完成對話之角色標記,確定各該對話語句分別歸屬於主方或與從方。In the case where there is no subordinate role participating in the dialogue (i.e., there is no subordinate role's statement), in this step, the role labeling of the dialogue is completed directly using the above step S2 to determine whether each dialogue statement belongs to the master or the slave.

可以理解的是,上述各實施例中之閥值可以透過使用經驗調整設定或經由訓練自行優化。另,上述決定刪除或保留時,上述「等於該閥值」當然只會被選擇設定在刪除或保留中之一。It is understood that the valve values in the above embodiments can be adjusted and set through experience or optimized through training. In addition, when the above decision is to delete or retain, the above "equal to the valve value" will of course only be selected to be set to one of deletion or retention.

步驟S4:對角色對話資訊進行特徵提取,生成角色對話的特徵向量:在本發明一實施例中,係透過特徵提取模組4對角色對話進行特徵提取,生成對話特徵向量。這些特徵向量包括N個(經前述過濾後未有刪除之情形;若經前述過濾後刪除了D個對話語句,則當然為所剩之(N-D)個。以下相同情形則不再特別贅述說明。)對話語句特徵值,並與相應的對話語句相對應。在特徵提取過程中,特別關注區分“主”和“從”的語句特徵。Step S4: Extracting features from character dialogue information and generating feature vectors of character dialogue: In one embodiment of the present invention, feature extraction module 4 is used to extract features from character dialogue and generate dialogue feature vectors. These feature vectors include N (no deletion after the aforementioned filtering; if D dialogue sentences are deleted after the aforementioned filtering, then of course the remaining (N-D). The same situation will not be specifically described below.) dialogue sentence feature values, and correspond to the corresponding dialogue sentences. In the feature extraction process, special attention is paid to distinguishing the sentence features of "master" and "slave".

在本發明一實施例中,特徵提取模組4包括:文本摘要層41、特徵嵌入層42及特徵融合層43。其中,文本摘要層41可以利用BERT模型或BERTSUM模型實現。 在發明一實施例中,特徵提取模組4以下列方式進行特徵提取:將角色對話訊息作爲特徵提取模組4中的文本摘要層41的輸入,通過文本摘要層41對角色對話訊息進行隱層語義特徵提取,生成隱層語義向量;將角色對話訊息作爲特徵提取模組4中的特徵嵌入層42的輸入,通過特徵嵌入層42對角色對話訊息進行特徵映射,生成角色嵌入特徵向量;將隱層語義向量與角色嵌入特徵向量作爲特徵融合層43的輸入,進行特徵融合,生成對話特徵向量。在文本摘要層41中,特徵提取模組4對角色對話訊息進行隱層語義特徵的提取,這一步驟旨在捕捉對話中的深層含義和細微差別,特別是在識別對話中的主導方和被引導方的語言特徵方面。而角色嵌入特徵向量不僅反映了對話中的每個角色的語言特點,還包括了對話中的主從關係動態。而所生成的最終的對話特徵向量,這些向量綜合了對話中的語言細節和主從關係的動態,為後續的對話分析和摘要生成提供了豐富的訊息基礎。 In an embodiment of the present invention, the feature extraction module 4 includes: a text summary layer 41, a feature embedding layer 42 and a feature fusion layer 43. Among them, the text summary layer 41 can be implemented using a BERT model or a BERTSUM model. In one embodiment of the invention, the feature extraction module 4 performs feature extraction in the following manner: taking the character dialogue message as the input of the text summary layer 41 in the feature extraction module 4, performing latent semantic feature extraction on the character dialogue message through the text summary layer 41, and generating a latent semantic vector; taking the character dialogue message as the input of the feature embedding layer 42 in the feature extraction module 4, performing feature mapping on the character dialogue message through the feature embedding layer 42, and generating a character embedding feature vector; taking the latent semantic vector and the character embedding feature vector as the input of the feature fusion layer 43, performing feature fusion, and generating a dialogue feature vector. In the text summary layer 41, the feature extraction module 4 extracts the latent semantic features of the role dialogue information. This step aims to capture the deep meaning and subtle differences in the dialogue, especially in identifying the language characteristics of the dominant and the guided in the dialogue. The role embedding feature vector not only reflects the language characteristics of each role in the dialogue, but also includes the dynamics of the master-slave relationship in the dialogue. The final dialogue feature vectors generated integrate the language details and the dynamics of the master-slave relationship in the dialogue, providing a rich information basis for subsequent dialogue analysis and summary generation.

通過這種方法,特徵提取模組4能夠有效地識別和提取主從式對話中的關鍵語義和角色動態,從而為生成高質量的對話摘要奠定了堅實的基礎。In this way, the feature extraction module 4 is able to effectively identify and extract key semantics and role dynamics in master-slave dialogues, thus laying a solid foundation for generating high-quality dialogue summaries.

在本發明應用實例的一種實現方式中,特徵提取模組4被進一步優化以處理主從式對話中的複雜動態。這一過程首先涉及將隱層語義向量與角色嵌入特徵向量進行拼接,從而生成特徵拼接向量。這一步驟結合了對話中深層的語義內容和角色特徵,特別是在識別對話中主導方和被引導方的特點方面。In one implementation of the present invention, the feature extraction module 4 is further optimized to handle the complex dynamics in the master-slave dialogue. This process first involves concatenating the latent semantic vector with the role embedding feature vector to generate a feature concatenation vector. This step combines the deep semantic content and role features in the dialogue, especially in identifying the characteristics of the dominant and the guided in the dialogue.

接著,特徵拼接向量被輸入到特徵提取模型4中的自注意力機制層。在這裡,通過自注意力機制的特徵融合,模組能夠更加精確地識別對話中的關鍵訊息和主從關係。這一過程生成了最終的對話特徵向量,這些向量綜合了對話的語言細節和主從關係的動態,為生成高質量的對話摘要提供了豐富的訊息基礎。Next, the feature concatenation vector is input into the self-attention mechanism layer in the feature extraction model 4. Here, through the feature fusion of the self-attention mechanism, the module is able to more accurately identify the key information and master-slave relationships in the conversation. This process generates the final conversation feature vectors, which integrate the linguistic details of the conversation and the dynamics of the master-slave relationship, providing a rich information basis for generating high-quality conversation summaries.

通過這些優化,特徵提取模組4和類別摘要訊息生成模組7能夠更有效地處理主從式對話,提供更加精確和全面的對話分析和摘要。Through these optimizations, the feature extraction module 4 and the category summary message generation module 7 are able to process the master-slave dialogue more effectively and provide more accurate and comprehensive dialogue analysis and summary.

步驟S5:通過多分支序列標注模型51處理,得到M個類別訊息預測概率分布向量:在本步驟中,將對話特徵向量作爲概率分布向量預測模組5中的多分支序列標注模型51的輸入,通過多分支序列標注模型51中的M(M≧2)個類別訊息標注模組511對對話特徵向量進行處理,得到M(M≧2)個類別訊息預測概率分布向量。這其中,每個類別訊息預測概率分布向量包括N個類別訊息預測概率值,每個類別訊息預測概率值用於表徵對話語句屬該類別之類別訊息的可能性。Step S5: Processing by the multi-branch sequence annotation model 51 to obtain M class message prediction probability distribution vectors: In this step, the dialogue feature vector is used as the input of the multi-branch sequence annotation model 51 in the probability distribution vector prediction module 5, and the dialogue feature vector is processed by the M (M≧2) class message annotation modules 511 in the multi-branch sequence annotation model 51 to obtain M (M≧2) class message prediction probability distribution vectors. Among them, each class message prediction probability distribution vector includes N class message prediction probability values, and each class message prediction probability value is used to represent the possibility that the dialogue sentence belongs to the class message of the class.

具體而言,如前所述,在大部分的主從式對話的情境下,主要由主方主導或支配對話的進行,從方順應或受主方引導進行對話。因此,M個類別可能主要是主方進行對話所欲得到的資訊。例如請同時參閱圖3,為本發明一主從式對話資訊生成方法之對話實例,及裝置判斷或摘要結果,此對話實例為長照場域。例示性地,在長照體系下,居服員或社工(主,對話中之角色A)與受照顧的個案(從,對話中之角色B)之間的對話,可能有3(即M=3)個類別,如圖中系統判斷或摘要欄位中所示,包括(主方)服務品質、(從方)健康狀況、及(從方)其他服務需求。又例如請同時參閱圖4,為本發明另一主從式對話資訊生成方法之對話實例,及裝置判斷或摘要結果,此對話實例為醫院場域,在醫生(主)與病人(從)之間的對話,例示性地,可能有4(即M=4)個類別,如系統判斷或摘要欄位中所示,包括(從方)症狀敘述、(主方)進行診斷、(主方)判斷病因、及(主方)醫囑。Specifically, as mentioned above, in most situations of master-slave dialogues, the master mainly leads or controls the conduct of the dialogue, and the slave follows or is guided by the master to conduct the dialogue. Therefore, the M categories may mainly be the information that the master wants to obtain in the dialogue. For example, please refer to Figure 3, which is a dialogue example of a master-slave dialogue information generation method of the present invention, and the device judgment or summary result. This dialogue example is a long-term care field. For example, in a long-term care system, the dialogue between a resident attendant or social worker (master, role A in the dialogue) and a cared-for case (slave, role B in the dialogue) may have 3 (i.e., M=3) categories, as shown in the system judgment or summary column in the figure, including (master) service quality, (slave) health status, and (slave) other service needs. For another example, please refer to FIG. 4 , which is a dialogue example of another master-slave dialogue information generation method of the present invention, and a device judgment or summary result. This dialogue example is a dialogue between a doctor (master) and a patient (slave) in a hospital setting. For example, there may be 4 (i.e., M=4) categories, as shown in the system judgment or summary field, including (slave) symptom description, (master) diagnosis, (master) cause of disease judgment, and (master) medical instructions.

在本發明的一實施例中,概率分布向量預測模組5中的多支序列標注模型中,由多個(即M個)並行的類別訊息標注模組511組成,他們具有相同的模型結構,均由一個全連接層和一個壓縮函數層組合而成。而概率分布向量預測模組5,進行以下運作:將對話特徵向量中輸入至M個類別訊息標注模組511中的每個類別訊息標注模組511的全連接層(Fully Connected Layer)中,通過M個類別訊息標注模組511的全連接層對對話特徵向量進行全連接處理,生成M個全連接特徵向量,其中,每個全連接特徵向量中包括N個全連接特徵值;將M個全連接特徵向量輸入至M個M個類別訊息標注模組511中的每個類別訊息標注模組511的壓縮函數層中,在這一步驟中,進一步強化對主從式對話特徵的識別和分析。再通過M個類別訊息標注模組511的壓縮函數層對M個全連接特徵向量進行壓縮處理,生成M個類別訊息預測概率分布向量。In one embodiment of the present invention, the multi-branch sequence annotation model in the probability distribution vector prediction module 5 is composed of multiple (i.e., M) parallel category information annotation modules 511, which have the same model structure and are composed of a fully connected layer and a compression function layer. The probability distribution vector prediction module 5 performs the following operations: inputting the conversation feature vector into the fully connected layer (Fully Connected Layer) of each of the M category message annotation modules 511, performing fully connected processing on the conversation feature vector through the fully connected layers of the M category message annotation modules 511, and generating M fully connected feature vectors, wherein each fully connected feature vector includes N fully connected feature values; inputting the M fully connected feature vectors into the compression function layer of each of the M category message annotation modules 511. In this step, the recognition and analysis of the master-slave conversation features are further enhanced. The M fully connected feature vectors are then compressed by the compression function layer of the M category information annotation module 511 to generate M category information prediction probability distribution vectors.

步驟S6:類別摘要語句確定:在本步驟中,透過類別摘要語句確定模組6,進行根據M個類別訊息預測概率分布向量中的每個類別訊息預測概率分布向量對應的N個類別訊息預測概率值,從N個對話語句中確定M組類別摘要語句,其中,M組類別摘要語句對應於M個類別訊息。這些類別摘要語句分別對應於M個類別訊息,包括對話中的主導和被引導動態。Step S6: Determine the category summary sentences: In this step, the category summary sentence determination module 6 determines M groups of category summary sentences from the N dialogue sentences according to the N category message prediction probability values corresponding to each category message prediction probability distribution vector in the M category message prediction probability distribution vectors, wherein the M groups of category summary sentences correspond to the M category messages. These category summary sentences correspond to the M category messages, respectively, including the leading and guided dynamics in the dialogue.

詳細而言,類別摘要語句確定模組6可進行如下運作:獲取第一類別訊息概率閥值;將N個對話語句對應的N個第一類別訊息預測概率值大於等於第一類別訊息概率閥值的對話語句作爲第一類別摘要句;以及,獲取第二類別訊息概率閥值;將N個對話語句對應的N個第二類別訊息預測概率值大於等於第二類別訊息概率閥值的對話語句作爲第二類別摘要句。例如在圖3中,根據每個對話語句相對於前述3個類別訊息,即(主方)服務品質、(從方)健康狀況、及(從方)其他服務需求3個類別訊息預測概率值,進而將在該類別的訊息預測概率值與該類別訊息概率閥值比較,若大於(或等於)該類別訊息概率閥值,則可以確定該對話語句屬於該類別訊息。例如對話中主方A的對話語句「沒關係,我來了解我們居服員服務的狀況,有沒有需要加強的地方?」對應於「(主方)服務品質」類別的類別訊息預測概率值0.85大於此類別訊息的概率閥值(0.8),故而可以確定此對話語句屬於(主方)服務品質的類別訊息。反之,對話中主方A的對話語句「奶奶現在行動的狀況好像沒改善?」對應於「(主方)服務品質」類別的類別訊息預測概率值(0.2)小於此類別訊息的概率閥值(0.8),故而可以判斷此對話語句並不屬於此(主方)服務品質的類別訊息;但此語句對應於「(從方)健康狀況」的類別的類別訊息預測概率值0.9大於此類別訊息的概率閥值(0.7),故而可以確定此對話語句屬於此(從方)健康狀況的類別訊息。依此類推,根據每個對話語句在各類別訊息中的類別訊息預測概率值,進而與該類別訊息概率閥值比較,可以確定該對話語句屬於何類別訊息,其結果各如圖3及圖4中系統判斷或摘要欄位中所示,不再贅述。可以理解的是,上述各實施例中之閥值可以透過使用經驗調整設定或經由訓練自行優化。另,上述判定一對話語句是否確定屬於某類別訊息時,上述「等於該某類別訊息概率閥值」之情況當然也可以設定為判定不屬於該某類別訊息概率閥值。在這一過程中,特別關注那些類別訊息預測概率值高於相應類別資訊對應概率閾值的語句。這包括對話中的主導方和被引導方的顯著表達,從而確保類別摘要語句能夠準確反映對話中的主從關係。In detail, the category summary sentence determination module 6 can perform the following operations: obtain a first category message probability threshold; use the N dialogue sentences corresponding to the N dialogue sentences whose predicted probability values of the first category messages are greater than or equal to the first category message probability threshold as first category summary sentences; and obtain a second category message probability threshold; use the N dialogue sentences corresponding to the N dialogue sentences whose predicted probability values of the second category messages are greater than or equal to the second category message probability threshold as second category summary sentences. For example, in Figure 3, according to the predicted probability value of each dialogue sentence relative to the above three categories of messages, namely, (master) service quality, (slave) health status, and (slave) other service requirements, the predicted probability value of the message in the category is compared with the probability threshold of the category message. If it is greater than (or equal to) the probability threshold of the category message, it can be determined that the dialogue sentence belongs to the category message. For example, the dialogue sentence of the master A in the dialogue "It's okay, I want to understand the status of our resident service staff. Is there anything that needs to be strengthened?" corresponds to the predicted probability value of the category message of "(master) service quality" category, which is 0.85, which is greater than the probability threshold of this category message (0.8), so it can be determined that this dialogue sentence belongs to the category message of (master) service quality. On the contrary, the conversation sentence of the master A in the dialogue "Grandma's current movement condition does not seem to have improved?" corresponds to the category message prediction probability value (0.2) of the "(master) service quality" category, which is less than the probability threshold value (0.8) of this category message, so it can be judged that this dialogue sentence does not belong to the category message of this (master) service quality; but the category message prediction probability value 0.9 of this sentence corresponding to the "(slave) health status" category is greater than the probability threshold value (0.7) of this category message, so it can be determined that this dialogue sentence belongs to the category message of this (slave) health status. By analogy, based on the predicted probability value of the category message of each dialogue sentence in each category message, and then compared with the probability threshold value of the category message, it can be determined to which category message the dialogue sentence belongs. The results are shown in the system judgment or summary column in Figures 3 and 4, and will not be repeated here. It can be understood that the valve values in the above-mentioned embodiments can be adjusted and set through experience or optimized by training. In addition, when determining whether a dialogue sentence is determined to belong to a certain category of information, the above-mentioned "equal to the probability threshold value of the certain category of information" can of course also be set to determine that it does not belong to the probability threshold value of the certain category of information. In this process, special attention is paid to sentences whose predicted probability values of category messages are higher than the corresponding probability threshold values of the corresponding category information. This includes salient expressions from both the leading and the led parties in the conversation, thus ensuring that the category summary sentences accurately reflect the leading and subordinate relationships in the conversation.

值得注意的是,在本發明中,由於標記並區分“主”和“從”關係的語句,而如前所述,在主從情境之對話下,在大部分的主從式對話的情境下,主要由主方主導或支配對話的進行,從方順應或受主方引導進行對話。因此,在本發明一實施例中,若某主方之語句確定屬於某類別之類別訊息,則其後立即出現之從方之語句可以直接歸屬於該類別之類別訊息,如此可節省運算資源。或者其後立即出現複數之從方語句,只選擇部分語句進行運算判別,若結果亦屬於該類別之類別訊息,則其餘未選擇之部分語句直接歸屬於該類別之類別訊息,不再進行運算判別,以節省運算資源。又或者其後立即出現複數之從方語句,當選擇部分語句進行運算判別,若結果卻屬於「另一類別」之類別訊息,則反過來檢查前述某主方之語句在此「另一類別」中的類別訊息預測概率值,若其值(例如0.68)與此「另一類別」概率閥值(例如0.7)相近(例如包括可以差值絕對值(0.7-0.68=0.02)或差值百分比(0.02/0.7=2.8%)經設定閥值比較後判斷),則反過來校正應歸屬此某主方之語句於「另一類別」中。It is worth noting that in the present invention, since the sentences of the "master" and "slave" relationship are marked and distinguished, as mentioned above, in the dialogue of the master-slave situation, in most of the master-slave dialogue situations, the master mainly leads or controls the dialogue, and the slave follows or is guided by the master to conduct the dialogue. Therefore, in an embodiment of the present invention, if a sentence of the master is determined to belong to a category message of a certain category, the sentence of the slave that appears immediately afterwards can be directly attributed to the category message of the category, which can save computing resources. Or if multiple sentences of the slave appear immediately afterwards, only some sentences are selected for computational judgment. If the result also belongs to the category message of the category, the remaining unselected sentences are directly attributed to the category message of the category, and no computational judgment is performed to save computing resources. Or if multiple slave statements appear immediately afterwards, and some of the statements are selected for calculation and judgment, if the result belongs to the category message of "another category", then the predicted probability value of the category message of the aforementioned master statement in this "another category" is checked. If its value (for example, 0.68) is close to the probability threshold value of this "another category" (for example, 0.7) (for example, the absolute value of the difference (0.7-0.68=0.02) or the percentage of the difference (0.02/0.7=2.8%) can be compared with the set valve value to judge), then the statement that should belong to this master is corrected to "another category".

步驟S7:生成類別摘要訊息:在本步驟中,透過類別摘要訊息生成模組7,用於對M組類別摘要語句中的每組類別摘要語句進行拼接,生成M個類別摘要訊息。這些摘要訊息將反映對話中的主從動態,提供對話的精簡且全面的概述。Step S7: Generate category summary message: In this step, the category summary message generation module 7 is used to splice each group of category summary sentences in the M groups of category summary sentences to generate M category summary messages. These summary messages will reflect the master-slave dynamics in the dialogue and provide a concise and comprehensive overview of the dialogue.

亦即,類別摘要訊息生成模組7,對第一類别摘要句進行拼接,生成第一類别摘要訊息,以及對第二類别摘要句進行拼接,生成第二類别摘要訊息。舉例而言,在圖3中,系統透過前兩句對話判斷對話方A是主方的長照督導,B是從方的個案之女兒,並對接續的四句對話,判斷確定為「(主方)服務品質」的類別,因此摘要之並將其歸屬於「(主方)服務品質」的類別。在一實施例中,於摘要結果上進一步增補對話摘要所屬類別之類別名稱(例如此處之「(主方)服務品質」),增加摘要結果之易讀性。這些摘要訊息將反映對話中的主從動態,提供對話的精簡易讀且全面的概述。這一過程確保了對話摘要不僅包含了對話的關鍵內容,還精確地捕捉了對話中的主從動態,從而為使用者提供了深入且全面的對話理解。這些摘要句反映了對話中主導方的主要表達和立場,也反映了對話中被引導方的重要回應和觀點。That is, the category summary message generation module 7 splices the first category summary sentences to generate the first category summary message, and splices the second category summary sentences to generate the second category summary message. For example, in FIG3, the system determines that the dialogue party A is the long-term care supervisor of the master party and B is the daughter of the client party through the first two sentences of dialogue, and determines that the following four sentences of dialogue are of the category of "(master party) service quality", so the summary is attributed to the category of "(master party) service quality". In one embodiment, the category name of the category to which the dialogue summary belongs (such as "(master party) service quality" here) is further added to the summary result to increase the readability of the summary result. These summary messages will reflect the dynamics of the conversation and provide a concise, easy-to-read and comprehensive overview of the conversation. This process ensures that the conversation summary not only contains the key content of the conversation, but also accurately captures the dynamics of the conversation, thereby providing users with a deep and comprehensive understanding of the conversation. These summary sentences reflect the main expressions and positions of the dominant party in the conversation, as well as the important responses and views of the guided party in the conversation.

通過這種方法,本發明實例不僅提高了對話摘要的品質,還能夠精確捕捉和反映對話中的主從關係,使得摘要訊息更具有針對性和實用性,亦適用於其他具有主從對話關係,需要分析對話動態的場景,如:主管與員工的溝通、教師與學生的對話等。Through this method, the example of the present invention not only improves the quality of the dialogue summary, but also can accurately capture and reflect the master-slave relationship in the dialogue, making the summary information more targeted and practical. It is also applicable to other scenarios with master-slave dialogue relationships that require analysis of dialogue dynamics, such as: communication between supervisors and employees, dialogues between teachers and students, etc.

本發明的另一方面提供了一種電腦設備,包括:記憶體、收發器、處理器以及匯流排系統;其中,記憶體用於儲存程式;處理器用於執行記憶體中的程式,包括執行上述各方面的方法;匯流排系統用於連接記憶體以及處理器,以使記憶體以及處理器進行通信。 本發明的另一方面提供了一種電腦可讀儲存介質,電腦可讀儲存介質中儲存有指令,當其在電腦上運行時,使得電腦執行上述各方面的方法。Another aspect of the present invention provides a computer device, including: a memory, a transceiver, a processor and a bus system; wherein the memory is used to store programs; the processor is used to execute the programs in the memory, including executing the methods of the above aspects; the bus system is used to connect the memory and the processor so that the memory and the processor communicate. Another aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when the instructions are run on the computer, the computer executes the methods of the above aspects.

本發明的另一方面提供了一種電腦程式產品或電腦程式,該電腦程式產品或電腦程式包括電腦指令,該電腦指令儲存在電腦可讀儲存介質中。電腦設備的處理器從電腦可讀儲存介質讀取該電腦指令,處理器執行該電腦指令,使得該電腦設備執行上述各方面所提供的方法。Another aspect of the present invention provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided by the above aspects.

在長照場域中,它能夠有效地從居服員或社工與個案之間的對話中提取出關鍵訊息,如護理需求、情感支持、個案反饋等,並生成結構化的摘要。這對於提高長照服務的溝通效率、記錄和追蹤個案狀況、以及提供個性化的護理建議至關重要。In the long-term care field, it can effectively extract key information from the conversation between the resident attendant or social worker and the case, such as care needs, emotional support, case feedback, etc., and generate a structured summary. This is crucial to improving the communication efficiency of long-term care services, recording and tracking case status, and providing personalized care recommendations.

總之,本發明應用實例有效地生成各類別的摘要訊息,特別適用於長照場域中居服員或社工與個案的對話摘要生成,從而提升了對話摘要的質量和實用性。In summary, the application example of the present invention effectively generates summary messages of various categories, and is particularly suitable for generating summaries of conversations between residents or social workers and cases in long-term care settings, thereby improving the quality and practicality of the conversation summaries.

以上內容是結合具體/優選的實施方式對本發明作出的進一步詳細說明,不能認定本發明的具體實施只限於這些說明。對本領域具通常知識者來說,在不脫離本發明構思的前提下,還可以做出變形和改進,而這些都屬本發明的保護範圍。The above contents are further detailed descriptions of the present invention in combination with specific/preferred implementations, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those with ordinary knowledge in this field, variations and improvements can be made without departing from the concept of the present invention, and these are all within the scope of protection of the present invention.

100:主從式對話資訊生成之裝置 1:語句聲源轉換模組 2:對話角色標記模組 3:過濾模組 4:特徵提取模組 5:概率分布向量預測模組 6:類別摘要語句確定模組 7:類別摘要訊息生成模組 8:資料庫 21:語音辨識比對器 22:角色判斷器 31:內容比對器 41:文本摘要層 42:特徵嵌入層 43:特徵融合層 51:多分支序列標注模型 511:類別訊息標注模組 81:語音資料庫 82:角色判斷器關鍵字庫 S1-S7:步驟100: Device for generating master-slave dialogue information 1: Sentence sound source conversion module 2: Dialogue role labeling module 3: Filtering module 4: Feature extraction module 5: Probability distribution vector prediction module 6: Category summary sentence determination module 7: Category summary message generation module 8: Database 21: Voice recognition matcher 22: Role determiner 31: Content matcher 41: Text summary layer 42: Feature embedding layer 43: Feature fusion layer 51: Multi-branch sequence annotation model 511: Category message annotation module 81: Voice database 82: Role determiner keyword library S1-S7: Steps

圖1係為本發明實施例之主從式對話資訊生成方法之裝置圖; 圖2 係為本發明實施例之主從式對話資訊生成方法之流程圖; 圖3係為本發明實施例之主從式對話資訊生成方法之對話實例,及裝置判斷或摘要結果; 圖4係為本發明實施例之主從式對話資訊生成方法之另一對話實例,及裝置判斷或摘要結果。 FIG. 1 is a device diagram of the master-slave dialogue information generation method of the embodiment of the present invention; FIG. 2 is a flow chart of the master-slave dialogue information generation method of the embodiment of the present invention; FIG. 3 is a dialogue example of the master-slave dialogue information generation method of the embodiment of the present invention, and the device judgment or summary result; FIG. 4 is another dialogue example of the master-slave dialogue information generation method of the embodiment of the present invention, and the device judgment or summary result.

S1-S7:步驟 S1-S7: Steps

Claims (12)

一種摘要主從式對話資訊生成方法,該方法包括: 取得對話資訊,該對話資訊包括複數個對話語句; 進行對話角色標記,比對辨識出一包含主方關鍵字之該對話語句,並將該對話語句所對應之聲紋特徵資料之角色標記為一主方,其餘該對話語句所對應之聲紋特徵資料之角色標記為一從方,使各該對話語句形成具有角色標記之角色對話語句,所有該角色對話語句構成角色對話資訊; 將該角色對話資訊過濾,以辨別該角色對話資訊內之各該角色對話語句歸屬於該主方或該從方; 對該過濾後之該角色對話資訊中每一該角色對話語句進行特徵提取,生成角色對話的特徵向量; 通過將該角色對話的特徵向量輸入多分支序列標注模型處理,得到對應複數個類別之類別訊息預測概率分布向量,每個該類別訊息預測概率分布向量包括對應各該角色對話語句的類別訊息預測概率值,各該類別訊息預測概率值用於表徵各該角色對話語句屬該類別的可能性; 確定類別摘要語句,透過將個別該角色對話語句在該複數個類別中各該類別的該類別訊息預測概率值與各該類別的類別訊息概率閥值比較,若大於(或等於)該類別訊息概率閥值,則確定個別該角色對話語句屬於該類別之類別訊息;以及 生成類別摘要訊息,將屬於各該類別之該角色對話語句進行拼接,以生成複數個類別摘要訊息。 A method for generating summary master-slave dialogue information, the method comprising: Acquiring dialogue information, the dialogue information comprising a plurality of dialogue sentences; Performing dialogue role tagging, comparing and identifying a dialogue sentence containing a master keyword, and tagging the role of the voiceprint feature data corresponding to the dialogue sentence as a master, and the role of the voiceprint feature data corresponding to the remaining dialogue sentences as a slave, so that each dialogue sentence forms a role dialogue sentence with a role tag, and all the role dialogue sentences constitute role dialogue information; Filtering the role dialogue information to identify each role dialogue sentence in the role dialogue information as belonging to the master or the slave; Extract features from each character dialogue sentence in the filtered character dialogue information to generate a feature vector of the character dialogue; Input the feature vector of the character dialogue into a multi-branch sequence annotation model for processing to obtain a category message prediction probability distribution vector corresponding to a plurality of categories, each category message prediction probability distribution vector includes a category message prediction probability value corresponding to each character dialogue sentence, and each category message prediction probability value is used to characterize the possibility that each character dialogue sentence belongs to the category; Determine the category summary sentence by comparing the category message prediction probability value of each category of the individual character dialogue sentence in the plurality of categories with the category message probability threshold value of each category, if it is greater than (or equal to) the category message probability threshold value, then determine that the individual character dialogue sentence belongs to the category message of the category; and Generate a category summary message, and concatenate the character dialogue sentences belonging to each category to generate multiple category summary messages. 如請求項1所述的摘要主從式對話資訊生成方法,其中,該進行對話角色標記之步驟,更包括: 將該主方或該從方其中之一的預先儲存聲紋特徵資料與該對話資訊中各該語句語音進行比對辨識,比對辨識後若與該主方相符合,標記為該主方,比對辨識後若與該主方不符合,標記為該從方;或比對辨識後若與該從方相符合,標記為該從方,比對辨識後若與該從方不符合,標記為該主方。 The method for generating summary master-slave dialogue information as described in claim 1, wherein the step of marking dialogue roles further includes: Comparing and identifying the pre-stored voiceprint feature data of one of the master or the slave with the speech voice in the dialogue information, and if the comparison and identification is consistent with the master, marking it as the master, and if the comparison and identification is inconsistent with the master, marking it as the slave; or if the comparison and identification is consistent with the slave, marking it as the slave, and if the comparison and identification is inconsistent with the slave, marking it as the master. 如請求項1所述的摘要主從式對話資訊生成方法,其中,更包含非該主方與非該從方之附屬角色之對話,而該將該角色對話資訊過濾之步驟,包括: 對於該非主方與非從方之附屬角色的該角色對話語句決定刪除或保留。 The method for generating summary master-slave dialogue information as described in claim 1 further includes dialogues between subordinate characters that are not the master and the slave, and the step of filtering the role dialogue information includes: Deciding to delete or retain the role dialogue sentences of the subordinate characters that are not the master and the slave. 如請求項3所述的摘要主從式對話資訊生成方法,其中,該將該角色對話資訊過濾之步驟,包括: 計算該附屬角色之該角色對話語句數與其所附屬之該主方或該從方的該角色對話語句數之比例,並透過一預定閥值相比較以決定是否刪除或保留。 The method for generating summary master-slave dialogue information as described in claim 3, wherein the step of filtering the role dialogue information includes: Calculating the ratio of the number of role dialogue sentences of the subordinate role to the number of role dialogue sentences of the master or the slave to which it is subordinate, and comparing them through a predetermined threshold to determine whether to delete or retain. 如請求項1所述的摘要主從式對話資訊生成方法,其中,該確定類別摘要語句之步驟,包括:當該主方之該角色對話語句確定屬於某一類別時,則其後立即出現之該從方之該角色對話語句不經該概率閥值比較運算而直接歸屬於同為該類別之該類別訊息,或者其後立即出現複數之該從方之該角色對話語句,只選擇其部分語句進行該概率閥值比較判別,且若結果亦屬於該類別之該類別訊息,則其餘未選擇之部分語句直接歸屬於同為該類別之該類別訊息,不再進行該概率閥值比較判別。A method for generating summary master-slave dialogue information as described in claim 1, wherein the step of determining the category summary sentence includes: when the role dialogue sentence of the master party is determined to belong to a certain category, the role dialogue sentence of the slave party that appears immediately thereafter is directly attributed to the category message of the same category without the probability valve comparison operation, or when multiple role dialogue sentences of the slave party appear immediately thereafter, only part of the sentences are selected for the probability valve comparison judgment, and if the result also belongs to the category message of the category, the remaining unselected part of the sentences are directly attributed to the category message of the same category, and the probability valve comparison judgment is no longer performed. 一種主從式對話資訊生成之裝置,可運作於一電腦或行動裝置設備,該裝置包括: 語句聲源轉換模組,將對話語句聲源轉換為文字檔; 對話角色標記模組,比對辨識出一包含主方關鍵字之該對話語句,並將該對話語句所對應之聲紋特徵資料之角色標記為一主方,其餘該對話語句所對應之聲紋特徵資料之角色標記為一從方,使各該對話語句形成具有角色標記之角色對話語句,所有該角色對話語句構成角色對話資訊; 過濾模組,將該角色對話資訊過濾,以辨別該角色對話資訊內之各該角色對話語句歸屬於該主方或該從方; 特徵提取模組,對該過濾後之該角色對話資訊中每一該角色對話語句進行特徵提取,生成角色對話的特徵向量; 概率分布向量預測模組,通過對該角色對話的特徵向量處理,得到對應複數個類別的類別訊息預測概率分布向量,每個該類別訊息預測概率分布向量包括對應各該角色對話語句的類別訊息預測概率值,各該類別訊息預測概率值用於表徵各該角色對話語句屬該類別的可能性; 類別摘要語句確定模組,透過將個別該角色對話語句在該複數個類別中各該類別的該類別訊息預測概率值與各該類別的類別訊息概率閥值比較,若大於(或等於)該類別訊息概率閥值,則確定個別該角色對話語句屬於該類別之類別訊息;以及 類別摘要訊息生成模組,將屬於各該類別之各該角色對話語句進行拼接,生成複數個類別摘要訊息。 A device for generating master-slave dialogue information can be operated on a computer or mobile device, and the device includes: A sentence sound source conversion module, which converts the dialogue sentence sound source into a text file; A dialogue role marking module, which compares and identifies a dialogue sentence containing a master keyword, and marks the role of the voiceprint feature data corresponding to the dialogue sentence as a master, and marks the role of the voiceprint feature data corresponding to the rest of the dialogue sentences as a slave, so that each dialogue sentence forms a role dialogue sentence with a role mark, and all the role dialogue sentences constitute role dialogue information; A filtering module, which filters the role dialogue information to identify whether each role dialogue sentence in the role dialogue information belongs to the master or the slave; The feature extraction module extracts features from each character dialogue sentence in the filtered character dialogue information to generate a feature vector of the character dialogue; The probability distribution vector prediction module processes the feature vector of the character dialogue to obtain a category message prediction probability distribution vector corresponding to a plurality of categories, each category message prediction probability distribution vector includes a category message prediction probability value corresponding to each character dialogue sentence, and each category message prediction probability value is used to characterize the possibility that each character dialogue sentence belongs to the category; The category summary statement determination module compares the predicted probability value of the category message of each of the multiple categories of the individual character dialogue statement with the category message probability threshold of each category. If the predicted probability value is greater than (or equal to) the category message probability threshold, the individual character dialogue statement is determined to belong to the category message of the category; and the category summary message generation module splices the character dialogue statements belonging to each category to generate multiple category summary messages. 如請求項6所述的摘要主從式對話資訊生成之裝置,其中,該對話角色標記模組更包括將該主方或該從方其中之一的預先儲存聲紋特徵資料與該對話資訊中各該語句語音進行比對辨識,比對辨識後若與該主方相符合,標記為該主方,比對辨識後若與該主方不符合,標記為該從方;或比對辨識後若與該從方相符合,標記為該從方,比對辨識後若與該從方不符合,標記為該主方。The device for generating summary master-slave dialogue information as described in claim 6, wherein the dialogue role labeling module further includes comparing and identifying the pre-stored voiceprint feature data of one of the master or the slave with the voice of each sentence in the dialogue information, and if it matches the master after the comparison and identification, it is marked as the master, and if it does not match the master after the comparison and identification, it is marked as the slave; or if it matches the slave after the comparison and identification, it is marked as the slave, and if it does not match the slave after the comparison and identification, it is marked as the master. 如請求項6所述的摘要主從式對話資訊生成之裝置,其中,更包含非該主方與非該從方之附屬角色之對話,而該過濾模組進行該將該角色對話資訊過濾之步驟包括: 對於該非主方與非從方之附屬角色的該角色對話語句決定刪除或保留。 The device for generating summary master-slave dialogue information as described in claim 6 further includes dialogues between subordinate characters that are not the master and the slave, and the filtering module performs the step of filtering the role dialogue information including: Deciding to delete or retain the role dialogue sentences of the subordinate characters that are not the master and the slave. 如請求項8所述的摘要主從式對話資訊生成之裝置,其中,該過濾模組計算該附屬角色之該角色對話語句數與其所附屬之該主方或該從方的該角色對話語句數之比例,並透過一預定閥值相比較以決定是否刪除或保留。A device for generating summary master-slave dialogue information as described in claim 8, wherein the filtering module calculates the ratio of the number of role dialogue sentences of the subordinate role to the number of role dialogue sentences of the master or the slave to which it is subordinate, and compares them through a predetermined threshold to decide whether to delete or retain. 如請求項6所述的摘要主從式對話資訊生成之裝置,其中,該類別摘要語句確定模組設定為於當該主方之該角色對話語句確定屬於某一類別時,則其後立即出現之該從方之該角色對話語句不經該概率閥值比較運算而直接歸屬於同為該類別之該類別訊息,或者其後立即出現複數之該從方之該角色對話語句,只選擇其部分語句進行該概率閥值比較判別,且若結果亦屬於該類別之該類別訊息,則其餘未選擇之部分語句直接歸屬於同為該類別之該類別訊息,不再進行該概率閥值比較判別。A device for generating summary master-slave dialogue information as described in claim 6, wherein the category summary sentence determination module is configured such that when the role dialogue sentence of the master party is determined to belong to a certain category, the role dialogue sentence of the slave party that appears immediately thereafter is directly attributed to the category message of the same category without undergoing the probability valve comparison operation, or if multiple role dialogue sentences of the slave party appear immediately thereafter, only some of the sentences are selected for the probability valve comparison judgment, and if the result also belongs to the category message of the category, the remaining unselected partial sentences are directly attributed to the category message of the same category without undergoing the probability valve comparison judgment. 如請求項6所述的摘要主從式對話資訊生成之裝置,更包括 資料庫,包括: 語音資料庫,儲存有或可用以儲存至少該主方與該從方之一的語音資料;以及 角色判斷器關鍵字庫,儲存有與該主方角色相關之關鍵字或該主方及/或該從方之人名為關鍵字。 The device for generating summary master-slave dialogue information as described in claim 6 further includes a database, including: a voice database storing or being used to store voice data of at least one of the master and the slave; and a role determiner keyword database storing keywords related to the role of the master or the names of the master and/or the slave as keywords. 如請求項6所述的摘要主從式對話資訊生成之裝置,其中,該對話角色標記模組更包括角色判斷器,進行該關鍵字之比對辨識。The device for generating summary master-slave dialogue information as described in claim 6, wherein the dialogue role labeling module further includes a role determiner to perform comparison and identification of the keyword.
TW113117933A 2024-05-15 2024-05-15 A method and device for generating summary master-slave dialogue information TWI866860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW113117933A TWI866860B (en) 2024-05-15 2024-05-15 A method and device for generating summary master-slave dialogue information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW113117933A TWI866860B (en) 2024-05-15 2024-05-15 A method and device for generating summary master-slave dialogue information

Publications (2)

Publication Number Publication Date
TWI866860B true TWI866860B (en) 2024-12-11
TW202546686A TW202546686A (en) 2025-12-01

Family

ID=94769462

Family Applications (1)

Application Number Title Priority Date Filing Date
TW113117933A TWI866860B (en) 2024-05-15 2024-05-15 A method and device for generating summary master-slave dialogue information

Country Status (1)

Country Link
TW (1) TWI866860B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009124151A2 (en) * 2008-04-01 2009-10-08 University Of Southern California Video feed target tracking
CN108710704A (en) * 2018-05-28 2018-10-26 出门问问信息科技有限公司 Determination method, apparatus, electronic equipment and the storage medium of dialogue state
TWI703504B (en) * 2019-04-17 2020-09-01 洽吧智能股份有限公司 Serial number detecting system
TWI732271B (en) * 2018-08-29 2021-07-01 大陸商騰訊科技(深圳)有限公司 Human-machine dialog method, device, electronic apparatus and computer readable medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009124151A2 (en) * 2008-04-01 2009-10-08 University Of Southern California Video feed target tracking
CN108710704A (en) * 2018-05-28 2018-10-26 出门问问信息科技有限公司 Determination method, apparatus, electronic equipment and the storage medium of dialogue state
TWI732271B (en) * 2018-08-29 2021-07-01 大陸商騰訊科技(深圳)有限公司 Human-machine dialog method, device, electronic apparatus and computer readable medium
TWI703504B (en) * 2019-04-17 2020-09-01 洽吧智能股份有限公司 Serial number detecting system

Similar Documents

Publication Publication Date Title
WO2021114841A1 (en) User report generating method and terminal device
CN114547274A (en) Multi-turn question and answer method, device and equipment
WO2021208444A1 (en) Method and apparatus for automatically generating electronic cases, a device, and a storage medium
CN117453895B (en) Intelligent customer service response method, device, equipment and readable storage medium
CN110543550B (en) Method and device for automatically generating test questions
CN117609477A (en) Large model question-answering method and device based on domain knowledge
CN114360678A (en) Information processing method, device, equipment and storage medium
CN118673093A (en) Dialogue information analysis method, device, equipment and storage medium
CN120032782A (en) Medical history recognition method and system based on large model and expert strategy
CN119578497A (en) A medical guidance model training method, system, terminal and medium
Ou et al. Automatic multimedia-based question-answer pairs generation in computer assisted healthy education system
CN118352097A (en) Follow-up data collection method and system based on large language model and knowledge distillation
CN120199392A (en) Method, device, electronic device and storage medium for generating electronic medical records
CN113903335B (en) User intention recognition method, user intention recognition device and storage medium
TWI866860B (en) A method and device for generating summary master-slave dialogue information
Yu et al. Incorporating multimodal sentiments into conversational bots for service requirement elicitation
CN115424618A (en) A voice interaction device for electronic medical records based on machine learning
CN119088952A (en) Meeting minutes generation method, electronic device and readable storage medium
CN118507087A (en) Medical industry information transfer method, device, equipment and medium based on large model
CN120218048A (en) Resume data parsing method, device, electronic device and storage medium
CN112733674A (en) Intelligent correction method and system for official application examination application documents
CN119106098A (en) A video plot question-answering method and device based on RAG
CN111723559A (en) A kind of real-time information extraction method and device
CN118520095A (en) Method and device for generating reply content based on language model
TW202546686A (en) A method and apparatus for generating summary master-slave dialogue information