Text abstract generation method and device, electronic equipment and storage medium
By using preset knowledge graphs and text theme classification models in the insurance sales scenario of financial technology, combined with entity relationship detection and feature extraction, the problem of lack of coherence and accuracy in text summary generation is solved, and more accurate text is achieved Abstract generation, suitable for financial technology insurance sales scenarios, improves the accuracy and efficiency of sales strategies.
Patent Information
- Application Number
- CN202411267371.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-07
AI Technical Summary
In the insurance sales scenario of financial technology, the text summary generation lacks coherence and redundant information, and the generated summary is low in accuracy, making it difficult to accurately reflect the original text content.
Using a method based on preset knowledge graphs and text topic classification model, the original text is obtained and subject classification is performed, candidate abstract text is generated based on text topic categories, and the most accurate target summary text is selected through entity relationship detection and feature extraction.
It improves the accuracy of text summary generation, ensures summary consistency and retention of important information, is suitable for insurance sales scenarios in financial technology, reduces the work pressure of sales personnel, and improves the accuracy and efficiency of sales strategies.
Smart Images

Figure CN119271821A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a text summary generation method and device, an electronic device and a storage medium. Background Art
[0002] Text summarization refers to the process of extracting key information from the original text and generating a brief, coherent summary text that accurately reflects the content of the original text. In the insurance sales scenario of FinTech, telephone sales staff usually need to extract key information from the collated call records after communicating with customers by phone to generate a call summary text, and then they can formulate accurate sales strategies and recommend sales techniques to customers based on the call summary text.
[0003] Related technologies can usually adopt the method of extractive summary generation, that is, by finding sentences containing important content from the original text, and scoring and arranging the selected sentences to generate summary text. However, this method easily leads to the lack of coherence in the generated summary and the presence of redundant information. Based on this, related technologies can also generate new sentences as summary text by understanding the text semantics of the original text and reorganizing it according to the understood text semantics. However, this method easily leads to the repeated generation of the same summary that lacks important information, thereby reducing the generation accuracy of the summary text. Therefore, how to improve the generation accuracy of text summaries has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a text summary generation method and device, an electronic device and a storage medium, aiming to improve the accuracy of text summary generation.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a text summary generation method, the method comprising:
[0006] Obtaining an original text and a preset knowledge graph, wherein the preset knowledge graph is constructed based on scene history data corresponding to the original text, and the preset knowledge graph includes preset entity relationships;
[0007] Based on a preset text topic classification model, the original text is subject-classified to obtain a text topic category;
[0008] Generate a summary of the original text and the text subject category based on a preset summary generation model to obtain a candidate summary text;
[0009] Performing entity relationship detection on the candidate summary text based on the preset knowledge graph to obtain an entity relationship matching degree, wherein the entity relationship matching degree is used to represent the matching degree between the entity relationship in the candidate summary text and the preset entity relationship;
[0010] Extracting text features from the candidate summary text to obtain candidate text features;
[0011] Performing text feature extraction on the original text to obtain original text features;
[0012] The candidate summary text is selected according to the entity relationship matching degree, the candidate text features and the original text features to obtain a target summary text.
[0013] In some embodiments, the step of selecting the candidate summary text according to the entity relationship matching degree, the candidate text features, and the original text features to obtain the target summary text includes:
[0014] Calculating similarity between the candidate text features and the original text features to obtain text similarity;
[0015] Determining a similarity weight based on the entity relationship matching degree;
[0016] Performing weighted calculation on the similarity weight and the text similarity to obtain a target similarity of the candidate summary text;
[0017] The target summary text is determined from the candidate summary texts based on the target similarity.
[0018] In some embodiments, the entity relationship detection is performed on the candidate summary text based on the preset knowledge graph to obtain the entity relationship matching degree, including:
[0019] Extracting entity relationships from the candidate summary text to obtain predicted entity relationships;
[0020] Performing entity relationship matching on the preset entity relationship and the predicted entity relationship to obtain entity relationship matching data;
[0021] The entity relationship matching degree is determined based on the entity relationship matching data.
[0022] In some embodiments, the text topic classification model includes a text encoding sub-model, a sequence extraction sub-model and a topic classification sub-model; the topic classification of the original text based on the preset text topic classification model to obtain the text topic category includes:
[0023] Performing text encoding on the original text based on the text encoding sub-model to obtain a text encoding vector;
[0024] Perform sequence extraction on the text encoding vector based on the sequence extraction sub-model to obtain a text sequence vector;
[0025] The text sequence vector is subjected to topic classification based on the topic classification sub-model to obtain the text topic category.
[0026] In some embodiments, encoding the original text based on the text encoding sub-model to obtain a text encoding vector includes:
[0027] Performing text preprocessing on the original text to obtain a segmented text;
[0028] Performing text word encoding on the segmented text to obtain a word embedding vector;
[0029] The word embedding vectors are concatenated based on the original text to obtain the text encoding vector.
[0030] In some embodiments, the subject classification of the text sequence vector based on the subject classification sub-model to obtain the text subject category includes:
[0031] Extract keywords from the original text based on the text sequence vector to obtain text keywords;
[0032] Determining a text sub-topic category from preset sub-topic categories based on the text keywords;
[0033] Clustering the text keywords based on the subject categories of the text to obtain candidate cluster groups;
[0034] Determining a target cluster group based on the number of the text keywords included in the candidate cluster group;
[0035] Determine the overall topic category of the text based on the target cluster group and the sub-topic categories of the text;
[0036] The text subject category is obtained based on the text sub-subject category and the text overall subject category.
[0037] In some embodiments, the summarizing the original text and the text subject category based on a preset summary generation model to obtain a candidate summary text includes:
[0038] Generate summaries of the original text and the text sub-topic categories based on the summary generation model to obtain candidate sub-topic summary texts;
[0039] Generate a summary of the original text and the general topic category of the text based on the summary generation model to obtain a candidate general topic summary text;
[0040] The candidate sub-topic abstract texts and the candidate overall topic abstract texts are text-integrated to obtain the candidate abstract texts.
[0041] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a text summary generating device, the device comprising:
[0042] An acquisition module, used to acquire original text and a preset knowledge graph, wherein the preset knowledge graph is constructed based on scene history data corresponding to the original text, and the preset knowledge graph includes preset entity relationships;
[0043] A classification module, used to classify the original text into topics based on a preset text topic classification model to obtain text topic categories;
[0044] A generation module, used to generate a summary of the original text and the text subject category based on a preset summary generation model to obtain a candidate summary text;
[0045] A detection module, configured to perform entity relationship detection on the candidate summary text based on the preset knowledge graph to obtain an entity relationship matching degree, wherein the entity relationship matching degree is used to characterize the matching degree between the entity relationship in the candidate summary text and the preset entity relationship;
[0046] A first feature extraction module is used to extract text features from the candidate summary text to obtain candidate text features;
[0047] A second feature extraction module is used to extract text features from the original text to obtain original text features;
[0048] The selection module is used to select the candidate summary text according to the entity relationship matching degree, the candidate text features and the original text features to obtain the target summary text.
[0049] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0050] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0051] The present application proposes a text summary generation method and device, an electronic device and a storage medium and device, an electronic device and a storage medium, which obtains an original text and a preset knowledge graph, wherein the preset knowledge graph is constructed based on the scene history data corresponding to the original text, and the preset knowledge graph includes a preset entity relationship; further, the original text is subject-classified based on a preset text topic classification model to obtain a text topic category; further, the original text and the text topic category are subject-generated based on a preset summary generation model to obtain a candidate summary text; further, entity relationship detection is performed on the candidate summary text based on the preset knowledge graph to obtain an entity relationship matching degree, and the entity relationship matching degree is used to characterize the matching degree between the entity relationship in the candidate summary text and the preset entity relationship; further, text feature extraction is performed on the candidate summary text to obtain candidate text features; text feature extraction is performed on the original text to obtain original text features; finally, text selection is performed on the candidate summary text according to the entity relationship matching degree, the candidate text features and the original text features to obtain a target summary text. The embodiment of the present application can first subject-classify the original text, and generate a summary in combination with the original text and the text subject category, so as to more accurately locate and generate candidate summary texts associated with the category of the original text. Furthermore, the candidate summary texts can be further screened based on the preset knowledge graph, the candidate text features and the original text features to obtain a more accurate target summary text. Therefore, the present application can effectively improve the accuracy of text summary generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a flow chart of the text summary generation method provided in the embodiment of the present application;
[0053] Figure 2 It is a process diagram of the text summary generation method provided in the embodiment of the present application;
[0054] Figure 3 yes Figure 1 A flowchart of step S120 in FIG.
[0055] Figure 4 yes Figure 3 A flowchart of step S310 in FIG.
[0056] Figure 5 yes Figure 3 A flowchart of step S330 in FIG.
[0057] Figure 6 yes Figure 1 A flowchart of step S130 in FIG.
[0058] Figure 7 yes Figure 1A flowchart of step S140 in FIG.
[0059] Figure 8 yes Figure 1 A flowchart of step S170 in FIG.
[0060] Fig. 9 It is a structural schematic diagram of a text summary generating device provided in an embodiment of the present application;
[0061] Fig.10 It is a hardware structure diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0065] First, some nouns involved in this application are analyzed:
[0066] Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0067] Natural Language Processing (NLP): NLP uses computers to process, understand, and apply human languages (such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis, and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.
[0068] Information Extraction: A text processing technology that extracts specified types of entity, relationship, event and other factual information from natural language text and forms structured data output. Information extraction is a technology that extracts specific information from text data. Text data is composed of some specific units, such as sentences, paragraphs, and chapters. Text information is composed of some small specific units, such as characters, words, phrases, sentences, paragraphs, or a combination of these specific units. Extracting noun phrases, names, place names, etc. from text data are all text information extraction. Of course, the information extracted by text information extraction technology can be various types of information.
[0069] Clustering: It is a technique in statistics, which refers to the process of dividing a collection of physical or abstract objects into multiple classes or clusters composed of similar objects. Clustering can discover the intrinsic structure in the data set, making the similarity of data points in the same cluster as high as possible, while the similarity of data points between different clusters as low as possible, and clustering algorithms can include K-means Clustering Algorithm, DBSCAN clustering method, hierarchical clustering, spectral clustering, etc.
[0070] Knowledge Graph: An information system for storing and representing knowledge that can organize entities and their relationships in the form of a graph. Knowledge graphs are usually composed of nodes (representing entities, such as people, places, things, etc.) and edges (representing relationships between entities). This structure enables knowledge to be represented and queried in an intuitive way.
[0071] Robustly Optimized BERT Pre-training Approach (RoBERTa): is a large-scale language pre-training model based on a variant of BERT. RoBERTa aims to provide an efficient and optimized BERT model by improving the pre-training strategy to improve performance on a variety of natural language processing tasks.
[0072] Bi-directional Long Short-Term Memory (BiLSTM): is a deep learning model that combines the characteristics of LSTM and bidirectional processing, and can simultaneously consider the contextual information of the input sequence, thereby better capturing the characteristics of sequence data. The Bi LSTM model mainly consists of two independent LSTM layers, one that processes the input sequence from the beginning to the end, and the other that processes the sequence in the opposite direction, and then merges the outputs of the two directions to produce a richer contextual representation. This structure makes Bi LSTM perform well in tasks that require understanding contextual information, such as sentiment analysis, machine translation, named entity recognition, etc. in NLP.
[0073] Telesales have always played a core role in the historical development of the insurance industry. However, faced with massive calls day after day, relatively low conversion rates, and frequent customer rejection complaints, telephone sales staff face a huge psychological burden. They need to manually organize call records and capture key information. This process is time-consuming and easily leads to information clutter, thus affecting the formulation of accurate sales strategies. At the same time, the training cycle for new employees is very long, and communication skills need time to be honed, and their ability to speak is relatively weak, which further exacerbates the urgency of improving sales strategies.
[0074] As digital transformation advances, consumers expect more personalized and instant service experiences, and traditional telephone sales models are beginning to seem inadequate. Therefore, AI intelligent sales assistance has emerged to solve these problems. By analyzing the conversation content between customers and agents in real time, identifying the topic of the conversation, refining key summary information, and recommending excellent words, it helps reduce the work pressure of agents, improves conversion rates, and accelerates the skills improvement of new employees, ensuring flexible adaptation and effective execution of sales strategies.
[0075] Text summarization refers to the process of extracting key information from the original text and generating a brief, coherent summary text that accurately reflects the content of the original text. In the insurance sales scenario of FinTech, telephone sales staff usually need to extract key information from the sorted call records after communicating with customers by phone to generate a call summary text, so that they can formulate accurate sales strategies and recommend sales talk to customers based on the call summary text. However, faced with massive calls day after day, relatively low conversion rates, and frequent customer rejection complaints, telephone sales staff face a huge psychological burden. Manually sorting call records to capture key information is time-consuming and prone to information clutter, thus affecting the formulation of accurate sales strategies. At the same time, the training cycle for new employees is long, and communication skills require time to hone, and their sales talk skills are weak, which further exacerbates the urgency of improving sales strategies. With the advancement of digital transformation, consumers expect a more personalized and instant service experience, and the traditional telephone sales model begins to seem incapable of doing so. Therefore, AI intelligent sales assistance came into being to solve these problems. By analyzing the conversation content between customers and agents in real time, identifying conversation topics, extracting key summary information, and recommending excellent speech, it helps reduce the work pressure of agents, improves conversion rates, and accelerates the skill improvement of new employees, ensuring flexible adaptation and effective execution of sales strategies.
[0076] Related technologies can usually adopt the method of extractive summary generation, that is, by finding sentences containing important content from the original text, and scoring and arranging the selected sentences to generate summary text. However, this method easily leads to the lack of coherence in the generated summary and the presence of redundant information. Based on this, related technologies can also adopt the generative summary generation method, that is, by understanding the text semantics of the original text, and reorganizing and generating new sentences as summary text according to the understood text semantics. However, this method has a serious exposure bias problem, and the generated sequence depends on the previous content. If a step is wrong, it will easily lead to the repeated generation of the same summary that lacks important information, thereby reducing the generation accuracy of the summary text. Therefore, how to improve the generation accuracy of text summaries has become a technical problem that needs to be solved urgently.
[0077] Based on this, the embodiments of the present application provide a text summary generation method and device, an electronic device and a storage medium, aiming to improve the accuracy of text summary generation.
[0078] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0079] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0080] The text summary generation method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The text summary generation method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content De l ivery Network, CDN) and cloud servers that provide basic cloud computing services such as big data and artificial intelligence platforms; the software can be an application that implements the text summary generation method, etc., but is not limited to the above forms.
[0081] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0082] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to the identity or characteristics of the object, such as object information, object historical call data, and object location information, the permission or consent of the object will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain sensitive personal information of the object, the separate permission or consent of the object will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the separate permission or consent of the object, the necessary object-related data for the normal operation of the embodiment of the present application will be obtained.
[0083] See also Figure 1 , Figure 1 is an optional flowchart of the text summary generation method provided in the embodiment of the present application. In some embodiments of the present application, Figure 1 The method may include but is not limited to steps S110 to S170. Figure 1 These seven steps are introduced in detail.
[0084] Step S110, obtaining original text and a preset knowledge graph;
[0085] Step S120, subject-classifying the original text based on a preset text subject classification model to obtain a text subject category;
[0086] Step S130, generating a summary of the original text and the text subject category based on a preset summary generation model to obtain a candidate summary text;
[0087] Step S140, performing entity relationship detection on the candidate summary text based on the preset knowledge graph to obtain the entity relationship matching degree;
[0088] Step S150, extracting text features from the candidate summary text to obtain candidate text features;
[0089] Step S160, extracting text features from the original text to obtain original text features;
[0090] Step S170 , selecting candidate summary texts according to the entity relationship matching degree, candidate text features and original text features to obtain target summary texts.
[0091] In steps S110 to S170 of some embodiments, the embodiments of the present application may first subject-classify the original text, and generate a summary in combination with the original text and the text subject category, so as to more accurately locate and generate candidate summary texts associated with the category of the original text. Furthermore, the candidate summary texts may be further screened based on the preset knowledge graph, the candidate text features, and the original text features to obtain a more accurate target summary text. Therefore, the present application can effectively improve the accuracy of text summary generation.
[0092] In step S110 of some embodiments, the original text refers to the text for which text summary generation is required. The original text may be a conversation text between at least two objects, an expression text of an object, etc. In the insurance sales scenario of FinTech, the original text may be a recorded text formed after a conversation between a salesperson and a customer. The preset knowledge graph is constructed based on the scene historical data corresponding to the original text. For example, in the insurance sales scenario, the corresponding preset knowledge graph is constructed based on the scene historical data such as specific entities (which may be insurance business keywords) and entity explanations in the insurance sales scenario.
[0093] It should be noted that the knowledge graph is a structured semantic knowledge base used to describe concepts and their relationships in the physical world. The knowledge graph represents knowledge through entities (the basic units in the knowledge graph, representing objects in the real world, such as people, places, organizations, etc.), relationships (the ties that connect different entities, representing the interactions and connections between entities), and attributes (descriptions and supplements to entities, providing detailed information about entities), forming a huge semantic network graph. The preset knowledge graph includes preset entity relationships, which means that when constructing the knowledge graph, the types of relationships that may exist between entities in the scenario have been pre-defined. These relationships can be diverse, such as "located in", "belongs to", "created by", etc., describing the interactions and connections between entities.
[0094] It should be noted that in specific downstream tasks such as sentiment analysis, question answering, and reading comprehension, the original text can be input into a terminal including a text summary generation method for the target object; or the target voice can be input through a language input port for the target object. Further, after the terminal collects the voice of the target object, the target voice can be converted into original text according to a preset voice-to-text conversion model, and then a text summary generation device in the terminal is used to generate a text summary of the original text to obtain a target summary text. The specific method of obtaining the original text is not limited in the embodiment of the present application, and will not be repeated here.
[0095] It should be noted that when the present application generates a text summary for the original text, it is equivalent to identifying the intention of the text content. At this time, after obtaining the original text, the original text can be first audited for security (real-time quality inspection) to avoid the occurrence of illegal content. Specifically, a sensitive word library can be constructed based on an open source sensitive word library and customized sensitive words in the financial industry, and dynamic changes of sensitive words can be supported to ensure the accuracy and timeliness of the sensitive word library. Furthermore, since the same word may have different meanings in different contexts, relying solely on keyword matching may easily lead to misjudgment. Therefore, the present application can propose a text content violation detection model, which uses deep learning technology to perform secondary judgment on the matching keywords in the original text, thereby reducing the probability of misjudgment. If the text content violation detection model indicates that the original text has no illegal content, the original text can be directly input into the text topic classification model. If the text content violation detection model indicates that there is illegal content in the original text, the illegal content can be updated and the updated text can be re-entered into the text content violation detection model. That is to say, when new text is input, the sensitive word library matching technology can be used to perform preliminary screening of the text, and then the text content violation detection model can be used to perform in-depth secondary judgment on the screened text.
[0096] It should be noted that for the text content violation detection model, the present application can collect a large amount of text data, including illegal and compliant texts, and can mark the illegal text as 1 and the compliant text as 0. Further, the Bert model can be used to embed the input text into text words and convert the text into a vector; further, a multi-layer neural network model for text content violation detection is built, including multiple dense layers (Dense Layer) and activation layers (such as Leaky Rel u, a modified linear unit function), and finally the text is classified through the softmax layer, and the output result is 1 (indicating text violation) or 0 (indicating text compliance). Further, the present application can input the word embedding vector of the data set into the text content violation detection model for training and parameter tuning, and regularly update the model to adapt to new illegal texts.
[0097] In step S120 of some embodiments, in order to quickly locate the key information of the present application and generate a more accurate text summary, the present application may first classify the original text based on a preset text topic classification model to obtain a text topic category. The text topic category refers to the text category to which the original text belongs. For example, in the insurance sales scenario of financial technology, the original text may be a call record between a salesperson and a customer. If the call is a consultation from customer A on business T1, the text topic category may be business consultation-business T1. In other words, the text topic category may be a multi-level category corresponding to the original text to clarify the core theme of the original text, thereby improving the efficiency of information processing in the subsequent recognition process.
[0098] Please refer to Figure 2 , Figure 2 It is an optional process diagram of the text summary generation method provided in the embodiment of the present application. In some embodiments of the present application, after obtaining the original text, the original text can be input into the text topic classification model for topic classification to obtain the text topic category. And further, the text topic category and the original text are input into the summary generation model for summary generation to obtain multiple candidate summary texts, such as candidate summary S1 to candidate summary Sn, where n represents the total number of generated candidate summary texts.
[0099] It should be noted that since the agents need to make a lot of phone calls every day, they can only quickly record a small amount of service results after each call, which makes it easy to forget key information and makes it difficult to review subsequent call recordings. Figure 2 As shown, based on this, the text topic categories identified by the present application can be associated with the objects in the original text from which they come. In this way, in the next call with the object, that is, in the after-sales stage, by understanding the text topic categories of the object's history, the conversation topics and speech corresponding to the category can be quickly matched from the speech knowledge base, which is convenient for sales personnel (i.e., seats) to understand the needs and key information of the object, and can get to the topic faster and avoid invalid inquiries. In addition, in the sales stage, by identifying the text topic categories, the conversation topics between customers and agents can be identified in real time, and appropriate speech can be recommended to the agents.
[0100] See also Figure 3 , Figure 3 It is an optional flowchart of step S120 provided in an embodiment of the present application. In some embodiments of the present application, the text topic classification model of the present application includes a text encoding sub-model, a sequence extraction sub-model and a topic classification sub-model, then step S120 may specifically include but is not limited to steps S310 to S330. Figure 3 These three steps are introduced in detail.
[0101] Step S310: Perform text encoding on the original text based on the text encoding sub-model to obtain a text encoding vector;
[0102] Step S320: Perform sequence extraction on the text encoding vector based on the sequence extraction sub-model to obtain a text sequence vector;
[0103] Step S330: Perform topic classification on the text sequence vector based on the topic classification sub-model to obtain a text topic category.
[0104] In step S310 of some embodiments, the text encoding sub-model is used to perform encoding processing on the input original text, and the text encoding sub-model of the present application can adopt models such as RoBERTa model and BERT model. The sequence extraction sub-model is used to perform sequence modeling on the result output by the text encoding sub-model.
[0105] Please refer to Figure 4 , Figure 4 which is an optional flowchart of step S310 provided by the embodiments of the present application. In some embodiments of the present application, step S310 may specifically include but is not limited to steps S410 to S430. The following will introduce these three steps in detail in combination with Figure 4 this.
[0106] Step S410: Perform text preprocessing on the original text to obtain a segmented text;
[0107] Step S420: Perform text word encoding on the segmented text to obtain word embedding vectors;
[0108] Step S430: Perform vector splicing on the word embedding vectors based on the original text to obtain a text encoding vector.
[0109] In step S410 of some embodiments, when the text encoding sub-model processes the original text, it can first perform text preprocessing on the original text, including removing special characters (i.e., cleaning punctuation marks, numbers, or other irrelevant characters in the text), lowercasing (i.e., converting all characters to lowercase to ensure consistency), stop word removal (i.e., removing some words that appear frequently but contribute little to understanding the meaning of the text (such as "of", "is", "in", etc.)), word segmentation (i.e., splitting the text into words or tokens using natural language processing tools or algorithms, such as Jieba (jieba tool), NLTK, etc.) and other at least one operation to obtain multiple segmented texts.
[0110] In step S420 of some embodiments, further, each segmented text may be encoded based on the text encoding sub-model to obtain a word embedding vector. For example, if the text encoding sub-model adopts the RoBERTa model, the Transformer encoder contained therein may be used to encode each segmented text to obtain a word embedding vector corresponding to each segmented text. In addition, the present application may also use Word2Vec, G loVe, FastText, BERT, etc. to convert each segmented text into a corresponding word embedding vector, which is not specifically limited here.
[0111] In step S430 of some embodiments, further, the word embedding vectors corresponding to multiple word segmentation texts can be concatenated based on the positions of the word segmentation texts in the original text to obtain a text encoding vector.
[0112] In step S320 of some embodiments, after obtaining the text encoding vector, the text encoding vector can be input into the sequence extraction submodel for sequence extraction to obtain a text sequence vector. Compared with the convolutional neural network model (Text Convolutional Naura lNetworks, TextCNN) used for text classification in the related art, it requires fixed-length input, and too long or too short text may need to be padded or truncated, affecting model performance. At the same time, due to its use of a fixed-size sliding window, it may not be able to fully capture the contextual information of the word, which is easy to cause deviations for understanding the meaning of words in different contexts. The sequence extraction submodel of the present application can adopt the BiLSTM model, which has stronger sequence modeling capabilities, can capture long-distance dependencies and contextual information in the text, can process variable-length input sequences, does not need to be padded or truncated, has a more powerful model expression capability, and is very helpful for processing complex semantics and structural text classification tasks.
[0113] In step S330 of some embodiments, the topic classification submodel is used to perform topic classification based on the output result of the sequence extraction submodel. The topic classification submodel of the present application may include a fully connected layer and a normalization layer, and the output result is a probability distribution, indicating the probability of each topic category, and finally returning the category with the highest probability as the final text topic category.
[0114] Among them, the fully connected layer maps the output vector of the previous layer into a vector of a specified dimension, and outputs the corresponding prediction probability through the normalization function of the connected normalization layer. The first fully connected layer predicts the topic category of the text sequence vector to obtain the predicted category probability of each topic category, which is used to represent the probability value of the original text conforming to the corresponding topic category. Among them, the normalization function can adopt the Softmax activation function, the sigmoid activation function, etc., which is not specifically limited here and can be flexibly adjusted according to actual needs.
[0115] See also Figure 5 , Figure 5 is an optional flow chart of step S330 provided in an embodiment of the present application. In some embodiments of the present application, step S330 may specifically include but is not limited to steps S510 to S560. Figure 5 These six steps are introduced in detail.
[0116] Step S510, extracting keywords from the original text based on the text sequence vector to obtain text keywords;
[0117] Step S520, determining the text sub-topic category from preset sub-topic categories based on the text keywords;
[0118] Step S530, clustering the text keywords based on the text subject categories to obtain candidate cluster groups;
[0119] Step S540, determining a target cluster group based on the number of text keywords included in the candidate cluster groups;
[0120] Step S550, determining the overall topic category of the text based on the target cluster group and the sub-topic categories of the text;
[0121] Step S560, obtaining the text subject category based on the text sub-subject category and the text overall subject category.
[0122] In step S510 and step S520 of some embodiments, keywords are first extracted from the original text based on the text sequence vector to obtain text keywords. Further, category matching is performed based on the text keywords and preset sub-theme categories to determine the text sub-theme categories corresponding to the text keywords. Since the original text may include multiple keywords, multiple text sub-theme categories can be obtained.
[0123] In steps S530 to S550 of some embodiments, the text keywords are clustered based on the text sub-theme categories to obtain a candidate cluster group, which includes text sub-theme categories corresponding to multiple text sub-theme categories belonging to the same large category. Further, the present application can select the cluster group that best represents the overall category of the original text from the candidate cluster group, that is, the candidate cluster group containing the largest number of text keywords can be used as the target cluster group, and the text sub-theme category corresponding to the target cluster group is used as the overall text category.
[0124] In step S560 of some embodiments, after determining the overall text category and the sub-text category, the final text category can be determined. That is, since directly generating an overall summary may lose important details of certain topics, the present application will identify the overall text category and the sub-text category when determining the text category, ensuring that the key information of each topic is accurately captured, and finally summarize and integrate to provide a structured overview for the agent, helping the agent to quickly understand the main content and key information of the call, and facilitate subsequent analysis, archiving and retrieval.
[0125] In step S130 of some embodiments, after determining the text topic category, the text topic category and the original text may be input into a summary generation model to generate a summary, thereby obtaining a plurality of candidate summary texts.
[0126] It should be noted that the summary generation model of the present application can adopt a pre-trained large model, such as the open source Tongyi Qianwen large model, by fine-tuning parameters such as epoch, lora, lr_decay, batch_size, etc. to generate multiple candidate summary texts for subsequent text comparison.
[0127] It should be noted that the sequence model used in the relevant technology supports a limited text length, and the generated summary is relatively simple. For the special call content in the insurance field, which has jumpy content, it is difficult to understand the context association, resulting in the generated summary being "nonsense", affecting the readability of the summary. However, this application uses the Tongyi Qianwen large model, which can increase the maximum processable text length, generate a variety of answers, and generate text summaries by combining the overall text topic category and the text sub-topic category, which can be better applied to the insurance field, which is a professional and mixed content scenario.
[0128] See also Figure 6 , Figure 6 is an optional flowchart of step S130 provided in an embodiment of the present application. In some embodiments of the present application, step S130 may specifically include but is not limited to steps S610 to S630. Figure 6These three steps are introduced in detail.
[0129] Step S610, generating summaries of the original text and the text sub-topic categories based on the summary generation model to obtain candidate sub-topic summary texts;
[0130] Step S620, generating a summary of the original text and the general topic category of the text based on the summary generation model to obtain a candidate general topic summary text;
[0131] Step S630: text integration is performed on the candidate sub-topic summary texts and the candidate overall topic summary texts to obtain candidate summary texts.
[0132] In steps S610 to S630 of some embodiments, since the text topic category includes the text sub-topic category and the text overall topic category, the present application can input the original text and the text sub-topic category into the summary generation model for summary generation to obtain candidate sub-topic summary texts. In addition, the original text and the text overall topic category can be input into the summary generation model for summary generation to obtain candidate overall topic summary texts. Furthermore, the candidate sub-topic summary texts and the candidate overall topic summary texts can be text-integrated to obtain candidate summary texts.
[0133] It should be noted that the present application integrates the candidate sub-topic summary texts and the candidate general topic summary texts, which may specifically include: selecting the most representative and relevant sentences or paragraphs from the candidate sub-topic summary texts and the candidate general topic summary texts, respectively, and further, reordering and arranging the selected texts according to the logical relationship and the coherence of the content to form a natural and fluent text, but because there is diversity in the arrangement method, that is, the present application can obtain multiple candidate summary texts. In addition, during the integration process, the selected texts can also be appropriately expanded or optimized to ensure that the final generated candidate summary text is both comprehensive and readable. In this way, the generated candidate summary text is a comprehensive information fragment that not only contains the core content of each sub-topic, but also reflects the intention and important viewpoints of the overall theme. Therefore, the present application can effectively improve the generation accuracy of the text summary.
[0134] In step S140 of some embodiments, after obtaining multiple candidate summary texts, a preset knowledge graph can be used for post-processing to check the integrity and consistency of the generated summary texts to ensure that the entities and relationships mentioned in the summary texts have corresponding links and explanations in the knowledge graph. Specifically, the present application can perform entity relationship detection on each candidate summary text based on the preset knowledge graph to obtain the corresponding entity relationship matching degree, which is used to characterize the matching degree between the entity relationship in the candidate summary text and the preset entity relationship. That is, the entity relationship matching degree can be a numerical value in [0,1]. The closer the entity relationship matching degree is to 1 or equal to 1, the higher the matching degree between the entity relationship in the candidate summary text and the preset entity relationship, that is, the entities and relationships mentioned in the candidate summary text have corresponding links and explanations in the knowledge graph; the closer the entity relationship matching degree is to 0 or equal to 0, the lower the matching degree between the entity relationship in the candidate summary text and the preset entity relationship, that is, the entities and relationships mentioned in the candidate summary text may not have corresponding links and explanations in the knowledge graph.
[0135] See also Figure 7 , Figure 7 is an optional flowchart of step S140 provided in an embodiment of the present application. In some embodiments of the present application, step S140 may specifically include but is not limited to steps S710 to S730. Figure 7 These three steps are introduced in detail.
[0136] Step S710, extracting entity relationships from the candidate summary text to obtain predicted entity relationships;
[0137] Step S720, performing entity relationship matching on the preset entity relationship and the predicted entity relationship to obtain entity relationship matching data;
[0138] Step S730: determining the entity relationship matching degree based on the entity relationship matching data.
[0139] In step S710 of some embodiments, the predicted entity relationship refers to the result obtained after extracting entity relationships from the candidate summary text using NLP technology and algorithms. The method of entity relationship extraction can be based on named entity recognition (NER), relationship extraction model, etc., and the predicted entity relationship identified from the text can include entities (such as names, places, organizations, events, etc.), and the relationship between these entities (such as "belongs to", "is located in", "is related to...", etc.).
[0140] In step S720 and step S730 of some embodiments, the extracted predicted entity relationship is further compared with the preset entity relationship that has been defined in the preset knowledge graph to understand the similarity and consistency between the two. Entity relationship matching can compare the predicted entity relationship with the preset entity relationship through an algorithm or model (such as based on similarity calculation, machine learning and other methods) to find matching relationship pairs. In addition, the specific matching criteria can use multiple criteria such as text similarity, semantic similarity, context relevance, etc. to evaluate the degree of matching between entity relationships, and finally generate a data set containing matching results, i.e., entity relationship matching data, which may include information such as whether the match is successful or not and the type of matching relationship. Furthermore, the corresponding entity relationship matching degree is determined based on the probability of matching success and failure in the entity relationship matching data.
[0141] In step S150 of some embodiments, Figure 2 As shown, after the candidate summary text is generated, in addition to using the knowledge graph for post-processing, this application will further check the semantics of the generated summary text through similarity analysis and summary scoring to avoid noise and randomness problems that may exist in the model output process. Based on this, text feature extraction can be performed on each candidate summary text to obtain candidate text features, that is, word embedding mapping will be performed on each candidate summary text to obtain the corresponding embedding vector.
[0142] It should be noted that the model structure for extracting text features from candidate summary texts in the present application can be constructed based on the RoBERTa model, other neural network models, machine learning models, etc., and is not specifically limited here.
[0143] In step S160 of some embodiments, referring to step S150, the present application also performs text feature extraction on the original text to obtain original text features.
[0144] In step S170 of some embodiments, after obtaining the entity relationship matching degree, candidate text features and original text features, the present application may perform text selection on the candidate summary text according to the entity relationship matching degree, candidate text features and original text features to obtain the target summary text.
[0145] See also Figure 8 , Figure 8 is an optional flow chart of step S170 provided in an embodiment of the present application. In some embodiments of the present application, step S170 may specifically include but is not limited to steps S810 to S840. Figure 8 These four steps are introduced in detail.
[0146] Step S810, calculating the similarity between the candidate text features and the original text features to obtain text similarity;
[0147] Step S820, determining a similarity weight based on the entity relationship matching degree;
[0148] Step S830, performing weighted calculation on the similarity weight and the text similarity to obtain the target similarity of the candidate summary text;
[0149] Step S840: determining a target summary text from the candidate summary texts based on the target similarity.
[0150] In step S810 of some embodiments, the candidate text features refer to key features extracted from the candidate summary text, and the original text features refer to features extracted from the original text, which usually contain summary information and subject-related content. The present application can perform similarity calculation on the candidate text features and the original text features to obtain text similarity, and the method used for similarity calculation can be cosine similarity, Euclidean distance, Jaccard similarity, etc., to quantify the similarity between the candidate text features and the original text features, and can also be performed using machine learning or deep learning models, which are not specifically limited here.
[0151] In step S820 of some embodiments, weight matching is performed in a pre-set similarity weight table according to the entity relationship matching result to determine the similarity weight. For example, if the entity relationship matching result indicates that the higher the degree of match between the entity relationship in the candidate summary text and the preset entity relationship, the weight of the similarity of the candidate summary text in the overall similarity calculation may be increased, and vice versa. In addition, the similarity weight table can be constructed using a numerical model or a rule definition mechanism (such as expert assignment or algorithm learning) to assign weights to different features, and these weights can be dynamic and adjusted according to the matching situation.
[0152] In step S830 and step S840 of some embodiments, further, the similarity weight and the text similarity may be weightedly calculated to obtain the target similarity of the candidate summary texts, and the candidate summary text with the largest target similarity is determined as the target summary text.
[0153] The text summary generation method provided in the embodiment of the present application can use RoBERTa combined with BiLSTM to build a text topic classification model, wherein RoBERTa can better handle input sequences of different lengths, and adopt a dynamic Masking mechanism to train long sentence sequences, effectively capturing the rich semantic information in the call text. In addition, the use of the BiLSTM model can further extract the contextual key features in the original text, making up for the defect of the RoBERTa pre-training model forgetting contextual information, and can more accurately classify the call text. Furthermore, the present application considers the similarity between different candidate summary texts and the original text, and returns the summary with the highest similarity as the final result, which helps to improve the consistency of the generated target summary text and the original text, and contains more key information in terms of semantics. In the insurance sales scenario of financial technology, the text summary generation method provided by the present application can provide agents with dialogue topic classification in real time, so as to better understand the needs and expectations of customers, and provide excellent speech references, so that agents can convey information and persuade customers more effectively. After the call, a detailed communication summary summary, that is, the target summary text, can also be generated, so that the agent can fully review and understand the content of the call and be fully prepared for the next contact. Therefore, this application can effectively improve the accuracy of text summary generation and can effectively improve the work efficiency of agents.
[0154] See also Fig. 9 , Fig. 9 It is a module block diagram of a text summary generation device provided in some embodiments of the present application. In some embodiments, the text summary generation device can implement the above-mentioned text summary generation method, and the text summary generation device can specifically include:
[0155] An acquisition module 910 is used to acquire the original text and a preset knowledge graph, where the preset knowledge graph is constructed based on the scene history data corresponding to the original text, and the preset knowledge graph includes preset entity relationships;
[0156] The classification module 920 is used to classify the original text based on a preset text topic classification model to obtain a text topic category;
[0157] A generation module 930 is used to generate a summary of the original text and the text subject category based on a preset summary generation model to obtain a candidate summary text;
[0158] A detection module 940 is used to perform entity relationship detection on the candidate summary text based on a preset knowledge graph to obtain an entity relationship matching degree, where the entity relationship matching degree is used to represent the matching degree between the entity relationship in the candidate summary text and the preset entity relationship;
[0159] The first feature extraction module 950 is used to extract text features from the candidate summary text to obtain candidate text features;
[0160] The second feature extraction module 960 is used to extract text features from the original text to obtain original text features;
[0161] The selection module 970 is used to select the candidate summary text according to the entity relationship matching degree, the candidate text features and the original text features to obtain the target summary text.
[0162] The specific implementation of the text summary generation device is basically the same as the specific implementation of the above-mentioned text summary generation method, and will not be repeated here.
[0163] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned text summary generation method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0164] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0165] The processor 1010 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0166] The memory 1020 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1020 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1020, and the processor 1010 calls and executes the text summary generation method of the embodiment of this application;
[0167] Input / output interface 1030, used to implement information input and output;
[0168] The communication interface 1040 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WI FI, Bluetooth, etc.);
[0169] Bus 1050 , which transmits information between various components of the device (e.g., processor 1010 , memory 1020 , input / output interface 1030 , and communication interface 1040 );
[0170] The processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 are connected to each other in communication within the device via the bus 1050 .
[0171] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned text summary generation method is implemented.
[0172] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0173] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0174] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0175] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0176] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0177] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0178] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0179] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0180] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0181] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0182] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0183] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A text summary generation method, characterized in that: The method comprises: Obtaining an original text and a preset knowledge graph, wherein the preset knowledge graph is constructed based on scene history data corresponding to the original text, and the preset knowledge graph includes preset entity relationships; Based on a preset text topic classification model, the original text is subject-classified to obtain a text topic category; Generate a summary of the original text and the text subject category based on a preset summary generation model to obtain a candidate summary text; Performing entity relationship detection on the candidate summary text based on the preset knowledge graph to obtain an entity relationship matching degree, wherein the entity relationship matching degree is used to represent the matching degree between the entity relationship in the candidate summary text and the preset entity relationship; Extracting text features from the candidate summary text to obtain candidate text features; Performing text feature extraction on the original text to obtain original text features; The candidate summary text is selected according to the entity relationship matching degree, the candidate text features and the original text features to obtain a target summary text.
2. The method according to claim 1, characterized in that: The step of selecting the candidate summary text according to the entity relationship matching degree, the candidate text features and the original text features to obtain the target summary text includes: Calculating similarity between the candidate text features and the original text features to obtain text similarity; Determining a similarity weight based on the entity relationship matching degree; Performing weighted calculation on the similarity weight and the text similarity to obtain a target similarity of the candidate summary text; The target summary text is determined from the candidate summary texts based on the target similarity.
3. The method according to claim 2, characterized in that The performing entity relationship detection on the candidate summary text based on the preset knowledge graph to obtain the entity relationship matching degree includes: Extracting entity relationships from the candidate summary text to obtain predicted entity relationships; Performing entity relationship matching on the preset entity relationship and the predicted entity relationship to obtain entity relationship matching data; The entity relationship matching degree is determined based on the entity relationship matching data.
4. The method according to claim 1, characterized in that: The text topic classification model includes a text encoding sub-model, a sequence extraction sub-model and a topic classification sub-model; the text topic classification model based on the preset text topic classification model performs topic classification on the original text to obtain text topic categories, including: Performing text encoding on the original text based on the text encoding sub-model to obtain a text encoding vector; Perform sequence extraction on the text encoding vector based on the sequence extraction sub-model to obtain a text sequence vector; The text sequence vector is subjected to topic classification based on the topic classification sub-model to obtain the text topic category.
5. The method according to claim 4, characterized in that The step of performing text encoding on the original text based on the text encoding sub-model to obtain a text encoding vector includes: Performing text preprocessing on the original text to obtain a segmented text; Performing text word encoding on the segmented text to obtain a word embedding vector; The word embedding vectors are concatenated based on the original text to obtain the text encoding vector.
6. The method according to claim 4, characterized in that The subject classification of the text sequence vector based on the subject classification sub-model to obtain the text subject category includes: Extract keywords from the original text based on the text sequence vector to obtain text keywords; Determining a text sub-topic category from preset sub-topic categories based on the text keywords; Clustering the text keywords based on the subject categories of the text to obtain candidate cluster groups; Determining a target cluster group based on the number of the text keywords included in the candidate cluster group; Determine the overall topic category of the text based on the target cluster group and the sub-topic categories of the text; The text subject category is obtained based on the text sub-subject category and the text overall subject category.
7. The method according to claim 6, characterized in that The summarization of the original text and the text subject category is performed based on a preset summary generation model to obtain a candidate summary text, including: Generate summaries of the original text and the text sub-topic categories based on the summary generation model to obtain candidate sub-topic summary texts; Generate a summary of the original text and the general topic category of the text based on the summary generation model to obtain a candidate general topic summary text; The candidate sub-topic abstract texts and the candidate overall topic abstract texts are text-integrated to obtain the candidate abstract texts.
8. A text summary generation device, characterized in that: The device comprises: An acquisition module, used to acquire original text and a preset knowledge graph, wherein the preset knowledge graph is constructed based on scene history data corresponding to the original text, and the preset knowledge graph includes preset entity relationships; A classification module, used to classify the original text into topics based on a preset text topic classification model to obtain text topic categories; A generation module, used to generate a summary of the original text and the text subject category based on a preset summary generation model to obtain a candidate summary text; A detection module, configured to perform entity relationship detection on the candidate summary text based on the preset knowledge graph to obtain an entity relationship matching degree, wherein the entity relationship matching degree is used to characterize the matching degree between the entity relationship in the candidate summary text and the preset entity relationship; A first feature extraction module is used to extract text features from the candidate summary text to obtain candidate text features; A second feature extraction module is used to extract text features from the original text to obtain original text features; The selection module is used to select the candidate summary text according to the entity relationship matching degree, the candidate text features and the original text features to obtain the target summary text.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
