News abstract generation method and device, equipment and storage medium
Through deep learning models, analyzing news content and filtering related topics to generate abstracts, solving the problems of cumbersome and low relevance in the existing technology, and achieving news summary generation with high accuracy and user needs.
Patent Information
- Application Number
- CN202411288920.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-27
AI Technical Summary
In the existing news digest generation method, the method of directly intercepting the news text leads to the cumbersome content of the summary and the relevant content are not high, and the accuracy is low.
By obtaining keywords provided by users, analyzing news content using deep learning models, determining the similarity between different topics and filtering out topics with high similarity, generating accurate news summary.
Improve the accuracy and relevance of news summary, reduce redundant information, ensure that the summary is more concentrated and valuable, meets user needs, and optimizes the information acquisition experience.
Smart Images

Figure CN119202235A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for generating a news summary, a device for generating a news summary, a computer device, and a computer-readable storage medium. Background Art
[0002] In the financial industry, tens of thousands of financial news are generated every day, and it is difficult for people to extract and digest these news data in a short time. Therefore, it is crucial to accurately generate news summaries for users to quickly obtain news information in a short time.
[0003] In the related art, a part of the news text is usually directly intercepted and displayed as a summary, for example, the first paragraph of the news text is displayed as a news summary to the user. It can be seen that in the existing news summary, only the first few hundred words of the news text are intercepted for display, resulting in the generated news summary being cumbersome and not highly relevant to the actual content of the news, so the accuracy of the generated news summary is low. Summary of the invention
[0004] The present application provides a news summary generation method, a news summary generation device, a computer device and a computer-readable storage medium, aiming to provide a news summary generation method so as to achieve more accurate generation of corresponding news summaries based on keywords provided by users.
[0005] To achieve the above purpose, the present application provides a method for generating a news summary, the method comprising:
[0006] Acquire target keywords, and match corresponding target news based on the target keywords;
[0007] Analyze each of the target news through the target deep learning model, and output the target topic corresponding to the target news;
[0008] Determine the similarity between different target topics, and filter out any target topic whose similarity is higher than a preset threshold to obtain filtered target topics;
[0009] The filtered target topic is analyzed by the target deep learning model to obtain a news summary corresponding to the target keyword.
[0010] To achieve the above purpose, the present application also provides a device for generating a claims news summary, including:
[0011] An acquisition module, the acquisition module is used to acquire a target keyword and match a number of corresponding target news based on the target keyword;
[0012] An analysis module, the analysis module is used to analyze each of the target news through a target deep learning model, and output a target topic corresponding to the target news;
[0013] A determination module, the determination module is used to determine the similarity between different target topics, and filter out any target topic whose similarity is higher than a preset threshold, to obtain the filtered target topic;
[0014] A summary generation module is used to analyze the screened target topic through the target deep learning model to obtain a news summary corresponding to the target keyword.
[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the steps of the news summary generation method provided in any one of the embodiments of the present application when executing the computer program.
[0016] In addition, to achieve the above-mentioned purpose, 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 processor implements the steps of the method for generating a news summary as described in any one of the embodiments of the present application.
[0017] The invention discloses a method for generating a news summary, a device for generating a news summary, a computer device and a computer-readable storage medium. Specifically, a target keyword can be obtained, and a number of target news corresponding to the target keyword can be matched. Further, each target news can be analyzed by a target deep learning model, and a target topic corresponding to the target news can be output, and the similarity between different target topics can be determined, and any target topic with a similarity higher than a preset threshold can be filtered out to obtain the filtered target topic. Thus, the filtered target topic can be analyzed by a target deep learning model to obtain a news summary corresponding to the target keyword. The invention analyzes the target keyword by a deep learning model, and can effectively identify and extract target topics that are highly relevant to the target keyword, thereby improving the accuracy of information extraction. Further, filtering out any target topic with a similarity higher than a preset threshold can avoid the interference of irrelevant or repeated information, reduce the amount of redundant information, and ensure that the obtained news summary is more concentrated and valuable. The above method can make the final output news summary more accurate and more in line with user needs, and can quickly provide users with the content most relevant to the target keyword, optimizing the user's information acquisition experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 This is a scenario diagram of a method for generating a news summary provided in an embodiment of the present application;
[0020] Figure 2 This is a schematic diagram of the steps of a method for generating a news summary provided in an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of a process for obtaining a target deep learning model provided in an embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of a process of obtaining an iterated target deep learning model provided in an embodiment of the present application;
[0023] Figure 5 is a schematic block diagram of a device for generating a news summary provided in an embodiment of the present application;
[0024] Figure 6 It is a schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions. In addition, although the functional modules are divided in the device schematic, in some cases, the module division can be different from that in the device schematic.
[0027] The term "and / or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0028] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0029] like Figure 1 As shown, the news summary generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The application environment includes a terminal device 110 and a server 120, wherein the terminal device 110 can obtain a target keyword, and match a number of corresponding target news based on the target keyword; analyze each of the target news through a target deep learning model, and output a target topic corresponding to the target news; determine the similarity between different target topics, and filter out any target topic whose similarity is higher than a preset threshold to obtain a filtered target topic; analyze the filtered target topic through the target deep learning model to obtain a news summary corresponding to the target keyword, and send the news summary corresponding to the target keyword to the server 120. Among them, the terminal device 110 and the server 120 can be independent servers, or they can be cloud servers that provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and basic cloud computing services such as big data and artificial intelligence platforms, and this application is not limited here.
[0030] See also Figure 2 , Figure 2 Schematic diagram of the steps of a method for generating a news summary provided by an embodiment of the present application. Figure 2 As shown, the news summary generation method includes steps S11 to S14.
[0031] Step S11: Obtain target keywords, and match corresponding target news based on the target keywords.
[0032] The target keyword is the keyword to be searched that is input by the user.
[0033] For example, the API interface of the DuckDuckGo search engine can be used to search for news based on the keywords entered by the user to obtain several target news that match the target keywords. For example, when the user enters the target keyword, the API interface of DuckDuckGo can be used to search for news around the world in real time. This process involves precise matching of keywords and extensive coverage of news sources to ensure the comprehensiveness and accuracy of the search results. Among them, the search results include but are not limited to: news titles, which provide users with the core information of the news; summaries, so that users can understand the main content of the news in a short period of time; content, which provides a detailed description of the news, allowing users to have an in-depth understanding of the full picture of the event; links, users can directly access the original source of the news through the link to obtain more detailed information. The above search content can be collected and organized into a news dataset N,
[0034] Where N = {n1, n2, ..., n m},n i Represents all relevant information of the i-th news.
[0035] It should be noted that DuckDuckGo is a search engine that provides search results mainly from a variety of sources, including its own crawlers, APIs provided by third parties (such as Bing, etc.), and user-generated content websites (such as Wikipedia). DuckDuckGo integrates information from these different sources to provide a comprehensive and private search experience.
[0036] Step S12: Analyze each target news through the target deep learning model, and output the target topic corresponding to the target news.
[0037] For example, the target deep learning model includes the Deepseek model, which can perform in-depth analysis of the target news. For example, the Deepseek model can provide a comprehensive and detailed interpretation of the text content of each target news, including vocabulary, sentence structure, paragraph logic, and overall chapter semantics. Through deep learning algorithms and large-scale training data, the Deepseek model can accurately capture key information and potential themes in the target news. Furthermore, the Deepseek model can accurately match the parsed news features with pre-set topic descriptions, and output the target topic corresponding to the target news by considering factors such as semantics, lexical ambiguity, the influence of context, and the abstract level of the topic.
[0038] It should be noted that the Deepseek model is a specific deep learning model designed to process large amounts of text data and extract topic information from it. The model is usually based on a neural network architecture, such as Transformer, combined with natural language processing (NLP) technology to achieve efficient text understanding and topic identification. The Deepseek model uses a multi-layer encoder and decoder structure to capture complex semantic relationships in news texts and perform high-level topic abstraction.
[0039] Step S13: Determine the similarity between different target topics, and filter out any target topic with a similarity higher than a preset threshold to obtain filtered target topics.
[0040] For example, different target topics extracted from multiple news items can be compared and their similarities can be evaluated. The similarity is usually determined by calculating the semantic similarity of the texts. Commonly used methods include cosine similarity, Euclidean distance, word embeddings, etc., which are not limited in this application.
[0041] For example, the target topic may be converted into a high-dimensional vector, and the similarity of the target topic may be evaluated by calculating the similarity between these vectors.
[0042] For example, the preset threshold may include 0.5, 0.6, etc., and this application takes the preset threshold of 0.5 as an example for explanation. That is to say, when the similarity between two target topics is higher than 0.5, it means that the similarity between the two target topics is high. Therefore, any target topic between the two target topics can be retained to remove redundant information and avoid mixing in other similar target topics, thereby improving the quality of subsequent summary generation.
[0043] The above method can ensure that the filtered target topic set will only contain content closely related to the target keyword, which provides a more accurate basis for the subsequent news summary generation.
[0044] Step S14: Analyze the filtered target topics through the target deep learning model to obtain a news summary corresponding to the target keyword.
[0045] For example, after obtaining the filtered target topic, the filtered target topic is analyzed through the target deep learning model to obtain the news summary corresponding to the target keyword.
[0046] For example, the target deep learning model can use its own deep semantic understanding and context perception capabilities to conduct in-depth analysis of each target topic to capture key information such as the subject, time, location, event background, etc. of the target topic, build a complete situational framework, and lay a solid foundation for the generation of news summaries. Furthermore, the target deep learning model can also automatically identify and extract key information such as core facts, important figures, key data, etc. from the text of each target topic to ensure the accuracy and information density of summary generation. Among them, for news with a high degree of structure, such as game results, financial report releases, etc., the target deep learning model can generate short and accurate summaries based on predefined summary templates; for news with a strong narrative, such as emergencies, in-depth reports, etc., the target deep learning model can adopt a more flexible generation method, combining context and context to generate fluent and natural summary text; if the news contains multimedia elements such as pictures and video clips, the target deep learning model can also integrate these non-text information to further enrich the content and expression of the summary, making the generated summary more vivid and intuitive.
[0047] For example, the target deep learning model can run a series of quality checks on each generated summary, including grammatical correctness, information completeness, semantic coherence, etc., and perform self-correction based on the evaluation results to optimize the summary generation strategy and ensure that the final output summary set is of high quality.
[0048] For example, the reading preferences and information needs of different users can also be taken into account, and the style and emphasis of the summary can be fine-tuned based on user portrait data to generate personalized news summaries that are more in line with user interests.
[0049] The above method can extract the most relevant topics from a large amount of news and generate concise and targeted news summaries. This method not only improves the efficiency of information processing, but also greatly improves the user experience, making it easier to obtain high-quality information.
[0050] The method for generating a news summary disclosed in the embodiment of the present application can specifically obtain a target keyword and match a number of corresponding target news based on the target keyword. Further, each target news can be analyzed by a target deep learning model, and the target topic corresponding to the target news can be output, and the similarity between different target topics can be determined, and any target topic with a similarity higher than a preset threshold can be filtered out to obtain the filtered target topic. Thus, the filtered target topic can be analyzed by a target deep learning model to obtain a news summary corresponding to the target keyword. The present application analyzes the target keyword through a deep learning model, and can effectively identify and extract target topics that are highly relevant to the target keyword, thereby improving the accuracy of information extraction. Further, filtering out any target topic with a similarity higher than a preset threshold can avoid the interference of irrelevant or repeated information, reduce the amount of redundant information, and ensure that the obtained news summary is more concentrated and valuable. The above method can make the final output news summary more accurate and more in line with user needs, and can quickly provide users with the most relevant content to the target keyword, optimizing the user's information acquisition experience.
[0051] Optionally, each target news is analyzed through a target deep learning model to output a target topic corresponding to the target news, including: determining text information in each target news, wherein the text information includes at least one of vocabulary information, sentence structure information, paragraph logic information and text semantic information; analyzing the text information in each target news through a target deep learning model to obtain an initial topic set corresponding to the target news, wherein the initial topic set includes several initial topics; determining the relevance of each initial topic with the target news, and determining the initial topic with the greatest relevance as the target topic corresponding to the target news.
[0052] For example, each target news item can be preprocessed to determine the text information in the news. Text information includes at least the following types: vocabulary information, specific words used in the news, such as nouns, verbs, adjectives, etc., which are the basis for understanding the content of the news; sentence structure information, including the grammatical structure of the sentence, such as the arrangement of the subject, predicate, and object, and the relationship between sentences (such as parallel, subordinate relationship, etc.); paragraph logic information, the logical relationship within the paragraph, including the development of the argument, the support of the argument, the transition between paragraphs, etc.; text semantic information, a higher level of understanding, including the overall meaning of the text, emotional tendency, implicit theme, etc. The above text information is the basis for the target deep learning model to understand and analyze the news content.
[0053] For example, the target deep learning model can conduct a comprehensive analysis of vocabulary, sentence structure, paragraph logic and semantic information to identify the core concepts, key arguments, and the relationship between these concepts and arguments in the text information. For example, based on the results of semantic analysis, the target deep learning model can generate an initial topic set, where each initial topic represents a major aspect or core argument of the news content. For example, the initial topic set about a news article may include "economic growth", "policy changes", "market reaction", etc. Furthermore, the target deep learning model can ensure that the extracted initial topics cover all important aspects of the news content through multi-level analysis. The initial topics may be abstract representations of different parts of the news or different viewpoints.
[0054] For example, after the initial topic set is generated, the relevance of each initial topic to the target news can be evaluated, and which initial topic best represents the core content of the news can be determined. For example, the target deep learning model can calculate the relevance of each initial topic to the news content, and compare the relevance of all initial topics, and select the topic with the greatest relevance, which is considered to be the most representative of the core content of the news, that is, the "target topic" of the news. Ultimately, the initial topic with the highest relevance is determined as the target topic of the target news. This topic represents the main direction of the news content and will be used in subsequent steps, such as generating news summaries or conducting further content analysis.
[0055] Through the above steps, the most representative topics can be extracted from the news content efficiently and accurately. This method uses the target deep learning model to conduct in-depth analysis of text information to ensure that the extracted target topics can fully and accurately reflect the core content of the news. As a result, the subsequent summary generation or information extraction process can be based on these precise topics, further improving the relevance and practicality of the results.
[0056] Optionally, determining the relevance of each initial topic to the target news includes: determining the occurrence frequency information, position weight information and semantic association information of the initial topic in the target news; and determining the relevance of the initial topic to the target news based on the occurrence frequency information, position weight information and semantic association information.
[0057] For example, the frequency of occurrence information refers to the number of times a certain initial topic appears in a news text. Generally, a topic with a higher frequency of occurrence may be more relevant to the core of the news content. Since high-frequency words or phrases often represent the main discussion point or focus of the news, the more times a certain initial topic appears in the news, the more important the topic is in the news.
[0058] Position weight information refers to the influence of the position of the initial topic in the news text on its importance. Usually, the information in the title, opening paragraph or closing paragraph of the news is more important because these positions often carry the core content or summary of the news. If an initial topic appears in the title or the first paragraph of the news, its importance is usually much greater than if it appears in a random position in the text. Therefore, position weight information can help us determine whether an initial topic is the core topic of the news.
[0059] Semantic relevance information refers to the degree of relevance between the initial topic and the news content at the semantic level. That is, the consistency between the meaning of the initial topic and the theme or emotional tendency of the overall news content. Initial topics with higher semantic relevance usually better reflect the core ideas or opinions of the news. Even if the frequency of occurrence is low, if the semantic relevance is high, it may be the core topic of the news.
[0060] For example, the overall relevance of the initial topic to the target news can be determined by assigning different weights to the above information and calculating their weighted average. Through the weighted average, the relevance of each initial topic can be determined and compared with other topics, and the topic with the highest relevance can be selected as the final topic of the target news.
[0061] The above method, through the combination of frequency information, position weight information and semantic relevance information, can more accurately evaluate the relevance of the initial topic to the news content. This multi-dimensional analysis method ensures that the final target topic not only has a high semantic relevance, but also has sufficient coverage at the key positions of the news text, thereby maximizing the reflection of the core content of the news.
[0062] Optionally, the similarity between different target topics is determined, and any target topic whose similarity is higher than a preset threshold is filtered out to obtain the filtered target topic, including: performing a feature extraction operation on each target topic to obtain a target topic feature vector corresponding to the target topic; using cosine similarity to calculate the similarity between different target topic feature vectors, and filtering out the target topic corresponding to any target topic feature vector whose similarity is higher than a preset threshold to obtain the filtered target topic.
[0063] The feature extraction operation refers to extracting vectors that can represent the characteristics of each target topic from each target topic. These feature vectors can express the content, semantics and other related information of the topic in a multidimensional space.
[0064] For example, natural language processing technologies such as Word2Vec, GloVe, and BERT can be used to convert each target topic into a vector form, namely a feature vector. These feature vectors capture the semantic information and content characteristics of the topic, which can include not only vocabulary information, but also more advanced semantic information, such as context, sentiment, and the importance of keywords. Through feature extraction operations, each target topic will eventually be represented as a high-dimensional feature vector, which will be used for similarity calculations.
[0065] For example, the cosine similarity between each pair of target topic feature vectors is calculated. The closer the cosine similarity is to 1, the more similar the two topics are in semantics and content; the closer the similarity is to 0, the lower their similarity is. For example, if the similarity between two target topics is higher than a threshold, one of the topics will be considered redundant or unnecessary. Usually, target topics with broader content or higher frequency of occurrence are retained, and the remaining similar target topics are removed to obtain the screened target topics, and ensure that the final target topics have high independence and information diversity.
[0066] In the above way, through feature extraction and cosine similarity calculation, target topics with high similarity can be effectively identified and screened. This method helps to reduce topic redundancy and retain those topics that truly have independent information value, thereby further improving the quality and accuracy of subsequent processing steps (such as topic summary generation or information extraction).
[0067] Optionally, the similarity between feature vectors of different target topics is calculated using cosine similarity, including:
[0068] The similarity between feature vectors of different target topics is calculated by the following formula:
[0069]
[0070] Among them, Cosine Similarity(A,B) represents the similarity between feature vectors of different target topics, and A and B represent different target topics respectively.
[0071] Please continue reading Figure 3 , Figure 3 Schematic diagram of a process for obtaining a target deep learning model provided in an embodiment of the present application. Figure 3 As shown, the target deep learning model can be obtained through steps S21 to S23.
[0072] Step S21: Obtain a training data set and an initial deep learning model, wherein the training data set includes several keywords.
[0073] Step S22: annotate the training data set to obtain an annotation result, wherein the annotation result includes a topic corresponding to each keyword.
[0074] Step S23: Train the initial deep learning model using the training data set and the annotation results to obtain a target deep learning model.
[0075] It should be noted that the present application does not limit the deep learning model, such as the Deepseek model. For a specific description, please refer to the above embodiment and will not be repeated here.
[0076] Specifically, a training data set containing several keywords may be collected for training. For example, the training data set may be obtained by manual collection, web crawlers, or public data sets, and the present application does not limit this.
[0077] Furthermore, each keyword can be labeled to obtain a topic corresponding to each keyword. Then, the topic corresponding to each keyword is used as the label of the group of input data, and then each group of training data sets with labels is input into the initial deep learning model for supervised learning. When the training end conditions are met, such as the number of training times reaches the number threshold or the output accuracy of the model reaches the accuracy threshold, the training ends and the target deep learning model with training is obtained.
[0078] In an embodiment of the present application, the training data set and the annotation results can be input into the initial deep learning model for supervised learning, and then the target deep learning model can be trained to obtain the target topic of the target keyword based on the target deep learning model.
[0079] Please continue reading Figure 4 , Figure 4 is a flow chart of obtaining a target deep learning model after iteration provided by an embodiment of the present application. Figure 4 As shown, the iterated target deep learning model can be obtained through steps S24 to S26.
[0080] Step S24: Iteratively train the target deep learning model based on the training data set and the annotation results to extract data features and calculate the loss function.
[0081] Step S25: Iteratively train the loss function using a preset method to reduce the value of the loss function until the expected threshold value is met.
[0082] Step S26: Based on the loss function after iterative training, obtain the target deep learning model after iteration.
[0083] It can be understood that in order to train a target deep learning model with higher accuracy, the target deep learning model can be repeatedly iterated to continuously reduce the loss function until the loss function meets the expected threshold requirement, and then a more accurate target topic corresponding to the target keyword can be obtained based on the iterated target deep learning model.
[0084] It should be noted that the present application does not limit the above-mentioned preset method and expected threshold. For example, the preset method may be a gradient descent algorithm, a batch gradient descent algorithm, a stochastic gradient descent algorithm, etc. The present application takes the gradient descent algorithm as an example for explanation.
[0085] The purpose of the gradient descent algorithm is to find the minimum value of the loss function by iteration, or to converge to the minimum value. In a geometric sense, the gradient descent algorithm means that the gradient decreases fastest in the direction opposite to the vector where the function changes the fastest, so it is easier to find the minimum value of the function. Based on this, in an embodiment of the present application, the target deep learning model can be repeatedly iterated and trained by the gradient descent algorithm so that the loss function is continuously reduced, thereby reducing the error of the calculation result.
[0086] In an embodiment of the present application, the target deep learning model is repeatedly iteratively trained using a gradient descent algorithm so that the loss function is continuously reduced to obtain an iterative target deep learning model, and then a more accurate topic corresponding to the target keyword can be obtained based on the iterative target deep learning model.
[0087] See also Figure 5 , Figure 5 It is a schematic block diagram of a news summary generation device provided in an embodiment of the present application. The news summary generation device can be configured in a server to execute the steps of the aforementioned news summary generation method.
[0088] like Figure 5 As shown, the news summary generating device 200 includes: an acquisition module 201 , an analysis module 202 , a determination module 203 and a summary generating module 204 .
[0089] The acquisition module 201 is used to acquire a target keyword and match a number of corresponding target news based on the target keyword;
[0090] An analysis module 202 is used to analyze each of the target news through a target deep learning model, and output a target topic corresponding to the target news;
[0091] The determination module 203 is used to determine the similarity between different target topics, and filter out any target topic whose similarity is higher than a preset threshold to obtain the filtered target topic;
[0092] The summary generation module 204 is used to analyze the screened target topic through the target deep learning model to obtain a news summary corresponding to the target keyword.
[0093] The analysis module 202 is also used to determine the text information in each of the target news, wherein the text information includes at least one of vocabulary information, sentence structure information, paragraph logic information and text semantic information; analyze the text information in each of the target news through the target deep learning model to obtain an initial topic set corresponding to the target news, wherein the initial topic set includes several initial topics; determine the correlation between each of the initial topics and the target news, and determine the initial topic with the greatest correlation as the target topic corresponding to the target news.
[0094] The analysis module 202 is also used to determine the occurrence frequency information, position weight information and semantic relevance information of the initial topic in the target news; and determine the relevance between the initial topic and the target news based on the occurrence frequency information, position weight information and semantic relevance information.
[0095] The determination module 203 is also used to perform a feature extraction operation on each of the target topics to obtain a target topic feature vector corresponding to the target topic; use cosine similarity to calculate the similarity between different target topic feature vectors, and filter out the target topic corresponding to any target topic feature vector whose similarity is higher than a preset threshold, to obtain the filtered target topic.
[0096] The determination module 203 is further configured to calculate the similarity between the feature vectors of different target topics using the following formula:
[0097]
[0098] Wherein, Cosine Similarity(A,B) represents the similarity between the feature vectors of different target topics, and A and B represent the different target topics respectively.
[0099] The acquisition module 201 is also used to obtain a training data set and an initial deep learning model, wherein the training data set includes several keywords; annotate the training data set to obtain an annotation result, wherein the annotation result includes a topic corresponding to each keyword; and train the initial deep learning model through the training data set and the annotation result to obtain the target deep learning model.
[0100] The acquisition module 201 is also used to iteratively train the target deep learning model based on the training data set and the annotation results to extract data features, and calculate the loss function; iteratively train the loss function using a preset method for the purpose of reducing the value of the loss function until the expected threshold requirement is met; based on the loss function after iterative training, obtain the iterative target deep learning model.
[0101] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0102] The method and apparatus of the present application can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer terminal devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices.
[0103] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in the form of a computer program. Figure 6 Runs on the computer device shown.
[0104] See also Figure 6 , Figure 6 1 is a schematic diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0105] like Figure 6 As shown, the computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a volatile storage medium, a non-volatile storage medium and an internal memory.
[0106] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute the steps of any one of the methods for generating news summaries.
[0107] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0108] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute the steps of any method for generating a news summary.
[0109] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that the structure of the computer device is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0110] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0111] Among them, in some embodiments, the processor is used to run a computer program stored in the memory to implement the following steps: obtain target keywords, and match a number of corresponding target news based on the target keywords; analyze each of the target news through a target deep learning model, and output a target topic corresponding to the target news; determine the similarity between different target topics, and filter out any target topic whose similarity is higher than a preset threshold to obtain the filtered target topic; analyze the filtered target topic through the target deep learning model to obtain a news summary corresponding to the target keyword.
[0112] In some embodiments, the processor is also used to determine the text information in each of the target news, wherein the text information includes at least one of vocabulary information, sentence structure information, paragraph logic information and text semantic information; analyze the text information in each of the target news through the target deep learning model to obtain an initial topic set corresponding to the target news, wherein the initial topic set includes several initial topics; determine the correlation between each of the initial topics and the target news, and determine the initial topic with the greatest correlation as the target topic corresponding to the target news.
[0113] In some embodiments, the processor is also used to determine the occurrence frequency information, position weight information and semantic association information of the initial topic in the target news; and determine the relevance of the initial topic to the target news based on the occurrence frequency information, position weight information and semantic association information.
[0114] In some embodiments, the processor is also used to perform a feature extraction operation on each of the target topics to obtain a target topic feature vector corresponding to the target topic; use cosine similarity to calculate the similarity between different target topic feature vectors, and filter out the target topic corresponding to any target topic feature vector whose similarity is higher than a preset threshold, to obtain the filtered target topic.
[0115] In some implementations, the processor is further configured to calculate the similarity between the different target topic feature vectors using the following formula:
[0116]
[0117] Wherein, Cosine Similarity(A,B) represents the similarity between the feature vectors of different target topics, and A and B represent the different target topics respectively.
[0118] In some embodiments, the processor is also used to obtain a training data set and an initial deep learning model, wherein the training data set includes several keywords; annotate the training data set to obtain an annotation result, wherein the annotation result includes a topic corresponding to each keyword; and train the initial deep learning model through the training data set and the annotation result to obtain the target deep learning model.
[0119] In some embodiments, the processor is also used to iteratively train the target deep learning model based on the training data set and the annotation results to extract data features, and calculate the loss function; use a preset method to iteratively train the loss function for the purpose of reducing the value of the loss function until the expected threshold requirement is met; based on the loss function after iterative training, obtain the iterative target deep learning model.
[0120] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed, the steps of any one of the news summary generation methods provided in the embodiments of the present application are implemented.
[0121] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0122] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like.
[0123] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for generating a news summary, characterized in that: The method comprises: Acquire target keywords, and match corresponding target news based on the target keywords; Analyze each of the target news through the target deep learning model, and output the target topic corresponding to the target news; Determine the similarity between different target topics, and filter out any target topic whose similarity is higher than a preset threshold to obtain filtered target topics; The filtered target topic is analyzed by the target deep learning model to obtain a news summary corresponding to the target keyword.
2. The method according to claim 1, characterized in that The target deep learning model is used to analyze each target news, and the target topic corresponding to the target news is outputted, including: Determining text information in each of the target news, wherein the text information includes at least one of vocabulary information, sentence structure information, paragraph logic information, and text semantic information; Analyzing the text information in each of the target news by the target deep learning model to obtain an initial topic set corresponding to the target news, wherein the initial topic set includes a plurality of initial topics; The correlation between each of the initial topics and the target news is determined, and the initial topic with the greatest correlation is determined as the target topic corresponding to the target news.
3. The method according to claim 2, characterized in that Determining the relevance of each of the initial topics to the target news includes: Determining the occurrence frequency information, position weight information and semantic relevance information of the initial topic in the target news; The relevance between the initial topic and the target news is determined based on the occurrence frequency information, the position weight information, and the semantic association information.
4. The method according to claim 1, characterized in that: The similarity between different target topics is determined, and any target topic whose similarity is higher than a preset threshold is filtered out, and the filtered target topics include: Performing a feature extraction operation on each of the target topics to obtain a target topic feature vector corresponding to the target topic; The similarity between different target topic feature vectors is calculated using cosine similarity, and the target topic corresponding to any target topic feature vector having a similarity higher than a preset threshold is filtered out to obtain the filtered target topic.
5. The method according to claim 1, characterized in that The method of calculating the similarity between feature vectors of different target topics by using cosine similarity includes: The similarity between the feature vectors of different target topics is calculated by the following formula: Wherein, Cosine Similarity(A,B) represents the similarity between the feature vectors of different target topics, and A and B represent the different target topics respectively.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining a training data set and an initial deep learning model, wherein the training data set includes a number of keywords; Annotating the training data set to obtain an annotation result, wherein the annotation result includes a topic corresponding to each keyword; The initial deep learning model is trained using the training data set and the annotation results to obtain the target deep learning model.
7. The method according to claim 6, characterized in that After the initial deep learning model is trained by the training data set and the annotation result to obtain the target deep learning model, the method includes: Iteratively train the target deep learning model based on the training data set and the annotation results to extract data features, and calculate the loss function; Iteratively training the loss function using a preset method for the purpose of reducing the value of the loss function until the expected threshold value is met; Based on the loss function after iterative training, the target deep learning model after iteration is obtained.
8. A device for generating a news summary, characterized in that: The news summary generating device comprises: An acquisition module, the acquisition module is used to acquire a target keyword and match a number of corresponding target news based on the target keyword; An analysis module, the analysis module is used to analyze each of the target news through a target deep learning model, and output a target topic corresponding to the target news; A determination module, the determination module is used to determine the similarity between different target topics, and filter out any target topic whose similarity is higher than a preset threshold, to obtain the filtered target topic; A summary generation module is used to analyze the screened target topic through the target deep learning model to obtain a news summary corresponding to the target keyword.
9. A computer device, characterized in that: include: A memory and a processor; wherein the memory is connected to the processor and is used to store a program; the processor is used to implement the steps of the method for generating a news summary as described in any one of claims 1 to 7 by running the program stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the steps of the method for generating a news summary according to any one of claims 1 to 7.
