Data processing method, device, equipment, storage medium and program product

By constructing an event context based on the summary of news text and the clustering technology of a large language model, the problem of slow and incomplete event context update in the existing technology is solved, and a more flexible and efficient event context construction is achieved.

CN118093856BActive Publication Date: 2024-09-06IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410512153.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-09-06
Estimated Expiration
2044-04-26

AI Technical Summary

Technical Problem

The existing event context construction relies on the operator's preset framework and keyword recall mechanism, resulting in slow updates and inflexibility. Important news content may be missed, affecting the integrity of the event context.

Method used

By determining news summaries based on news text, identifying and updating news clusters in the growing database, and searching for relevant clusters in closed databases, building event contexts, using large language models to generate word vectors for clustering, improving the update speed and flexibility of event contexts sex.

Benefits of technology

It significantly improves the update speed and flexibility of the event context, ensures the integrity of the event context, and avoids the omission of important content due to incomplete keyword settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118093856B
    Figure CN118093856B
Patent Text Reader

Abstract

The present application provides a data processing method, device, equipment, storage medium and program product, the method comprising: determining a corresponding news summary based on a news text; determining a corresponding news cluster in a growing database based on the news summary, adding the news summary to the news cluster and updating the news cluster to obtain a first news cluster; the growing database is used to store news clusters updated within a preset time period; when the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growing database, determining a second news cluster related to the first news cluster in a closed database based on the first news cluster; wherein the closed database is used to store news clusters that have not been updated within a preset time period; and constructing an event context based on the first news cluster and the second news cluster. According to the technical solution of the present application, the updating speed and flexibility of the event context can be improved, and the integrity of the event context is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, equipment, storage medium and program product. Background Art

[0002] With the popularization of digital media, news platforms and media channels continue to emerge, providing the public with rich and diverse news content, and many users hope to obtain follow-up reports on news. Therefore, news is currently reported through event context. However, the current event context construction relies on the framework and keyword recall mechanism preset by operators, which not only leads to slow and inflexible event context updates, but also may cause some important news content to be omitted due to incomplete keyword settings, affecting the integrity of the event context. Summary of the invention

[0003] In order to solve the above problems, the present application proposes a data processing method, device, equipment, storage medium and program product, which can significantly improve the updating speed and flexibility of event context and ensure the integrity of event context.

[0004] According to a first aspect of an embodiment of the present application, a data processing method is provided, including:

[0005] Determine a corresponding news summary based on the news text;

[0006] Determine a corresponding news cluster in a growth database based on the news summary, add the news summary to the news cluster and update the news cluster to obtain a first news cluster; the growth database is used to store news clusters updated within a preset time period;

[0007] In the case where the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growth database, a second news cluster related to the first news cluster is determined in a closed database according to the first news cluster; wherein the closed database is used to store news clusters that have not been updated within a preset time period;

[0008] An event context is constructed based on the first news cluster and the second news cluster.

[0009] Preferably, constructing an event context based on the first news cluster and the second news cluster includes:

[0010] In the case that the second news cluster belongs to the first event, the first news cluster is determined as the next event node of the first event, and an event context is generated.

[0011] In one implementation, constructing an event context based on the first news cluster and the second news cluster includes:

[0012] In the case that the second news cluster does not belong to any event, constructing a second event;

[0013] The first news cluster and the second news cluster are sorted according to the time sequence of the news clusters to generate an event context of the second event.

[0014] Preferably, the method further comprises:

[0015] In a case where a plurality of news clusters are determined in a growing database based on the news summary, the plurality of news clusters are replaced with the first news cluster in the growing database.

[0016] Preferably, the method further comprises:

[0017] The news clusters in the growth database are scanned at preset time intervals, and the news clusters that have not been updated are determined as the news clusters of the closed database.

[0018] Preferably, determining a corresponding news cluster in a growth database based on the news summary comprises:

[0019] Determining a word vector corresponding to the news summary according to an embedding layer in a large language model; wherein the large language model is used to generate a corresponding summary for each news text in the news cluster in the growth database;

[0020] The corresponding news cluster is determined in the growth database according to the word vector corresponding to the news summary.

[0021] Preferably, adding the news summary to the news cluster and updating the news cluster to obtain a first news cluster includes:

[0022] Calculating the center vector of each news cluster and the number of elements of each news cluster to obtain the vector sum of the news cluster;

[0023] A weighted calculation is performed on the vector of the news cluster and the embedding vector corresponding to the news summary to obtain a center vector of the first news cluster.

[0024] According to a second aspect of an embodiment of the present application, there is provided a data processing device, including:

[0025] A summary extraction module, used to determine a corresponding news summary based on the news text;

[0026] A first processing module is used to determine a corresponding news cluster in a growth database based on the news summary, add the news summary to the news cluster and update the news cluster to obtain a first news cluster; the growth database is used to store news clusters updated within a preset time period;

[0027] A second processing module is used to determine, in a closed database according to the first news cluster, a second news cluster related to the first news cluster when the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growth database; wherein the closed database is used to store news clusters that have not been updated within a preset time period;

[0028] A construction module is used to construct an event context based on the first news cluster and the second news cluster.

[0029] A third aspect of the present application provides an electronic device, including:

[0030] Memory and processor;

[0031] The memory is connected to the processor and is used to store programs;

[0032] The processor implements the above-mentioned data processing method by running the program in the memory.

[0033] A fourth aspect of the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned data processing method is implemented.

[0034] A fifth aspect of the present application provides a computer program product, including a computer program, which implements the above-mentioned data processing method when executed by a processor.

[0035] One embodiment of the above application has the following advantages or beneficial effects:

[0036] Determine the corresponding news summary based on the news text; determine the corresponding news cluster in the growth database based on the news summary, add the news summary to the news cluster and update the news cluster to obtain the first news cluster; the growth database is used to store the news clusters updated within a preset time period; when the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growth database, determine the second news cluster related to the first news cluster in the closed database according to the first news cluster; wherein the closed database is used to store the news clusters that have not been updated within the preset time period; construct the event context based on the first news cluster and the second news cluster. In this way, the acquired news text is actively assigned to the corresponding event context, which improves the updating speed and flexibility of the event context, thereby ensuring the integrity of the event context. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0038] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application.

[0039] Figure 2 A schematic diagram of a specific process of a data processing method provided in an embodiment of the present application.

[0040] Figure 3 A schematic diagram of a specific process of data clustering provided in an embodiment of the present application.

[0041] Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application.

[0042] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The technical solution of the embodiment of the present application is applicable to various text processing scenarios, such as various news scenarios, etc. The technical solution of the embodiment of the present application can ensure the integrity of the event context.

[0044] At present, cluster analysis is generally performed on news content first. The specific implementation process is as follows: first summarize the data into "micro-clusters". Micro-clusters are based on a small part of the data stream and can accurately and efficiently summarize the statistical information of the data stream. This information is sufficient to restore sufficient details of the data distribution for subsequent clustering needs. It is divided into an online layer and an offline layer. The online layer is responsible for processing the data stream in real time through a time window and maintaining "micro-clusters", in which only the most recent data is considered to form micro-clusters; the offline layer can be used to generate the final clustering results based on the maintained micro-clusters when the user queries. Although the online stage can effectively process real-time data, the final clustering analysis needs to be completed in the offline stage. This means that it cannot provide completely real-time clustering results, which may be a bottleneck in the current news scenario that requires instant response.

[0045] The existing methods for identifying event context are mostly: operators pre-build an event context framework, and then recall news content related to the event into the framework through keyword recall. News content cannot be updated in a timely manner, and keyword settings are not comprehensive, resulting in the omission of some important news content, affecting the integrity of the event context.

[0046] In response to the above technical problems, the present application proposes a new data processing solution, which determines the corresponding news summary based on the news text; determines the corresponding news cluster in the growing database based on the news summary, adds the news summary to the news cluster and updates the news cluster to obtain a first news cluster; the growing database is used to store news clusters updated within a preset time period; when the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growing database, a second news cluster related to the first news cluster is determined in a closed database based on the first news cluster; wherein the closed database is used to store news clusters that have not been updated within a preset time period; an event context is constructed based on the first news cluster and the second news cluster, and by dividing the growing database and the closed database, the news clusters in the growing database are updated in real time to ensure the timeliness of the news, and then the acquired news text is actively assigned to the corresponding event context to ensure the integrity of the event context.

[0047] The technical solution of the embodiment of the present application can be exemplarily applied to hardware devices such as processors, electronic devices, servers (including cloud servers), or packaged into software programs to be run. When the hardware device executes the processing of the technical solution of the embodiment of the present application, or the above-mentioned software program is run, the purpose of actively assigning the acquired news text to the corresponding event context can be achieved. The embodiment of the present application only exemplarily introduces the specific processing of the technical solution of the present application, and does not limit the specific implementation form of the technical solution of the present application. Any technical implementation form that can execute the processing of the technical solution of the present application can be adopted by the embodiment of the present application.

[0048] 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 only 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.

[0049] Exemplary Methods

[0050] Figure 1 is a flow chart of a data processing method according to an embodiment of the present application. In an exemplary embodiment, a data processing method is provided, comprising:

[0051] S110, determining a corresponding news summary based on the news text;

[0052] S120, determining a corresponding news cluster in a growth database based on the news summary, adding the news text to the news cluster and updating the news cluster to obtain a first news cluster; the growth database is used to store news clusters updated within a preset time period;

[0053] S130, when the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growth database, determining a second news cluster related to the first news cluster in a closed database according to the first news cluster; wherein the closed database is used to store news clusters that have not been updated within a preset time period;

[0054] S140: Construct an event context based on the first news cluster and the second news cluster.

[0055] It should be noted that a complete database is composed of a growing database and a closed database. Before using the database, the latest news text needs to be clustered offline in advance. Since many embedding layers have restrictions on the length of the input text, this means that longer news articles may be forced to be truncated. This truncation may cause the key parts or important information of the article to be omitted, thereby affecting the quality of the generated vector. This incompleteness of the text may cause the clustering results to be inaccurate or unreliable. At the same time, the full text often contains a lot of non-core or redundant information, such as background introduction, minor details or repeated statements. This information may cover up or dilute the expression of key content when generating vectors, reducing the ability to identify key content during the clustering process. Therefore, the summary of the news text is used for offline clustering. That is, the news text of the recent period is extracted and clustered to obtain news clusters. Among them, the clustering process can be to represent the extracted summary as a vector, and then compare the similarity of the summary after the vector representation to obtain a similarity matrix, and then set the news that reaches the preset threshold to convert the similarity matrix into an adjacency matrix, construct a graph structure, and obtain the pre-aggregation result (i.e., news cluster) by solving the connected body.

[0056] The growth database and the closed database can be databases in physical concepts, or data with specific identifiers can be used as data in the growth database. In this embodiment, the growth database and the closed database are databases in non-physical concepts. For example, a scalar field of update time is added to the cluster information of the news cluster, and the field is reset every time the cluster is updated, so as to determine whether the news cluster belongs to the growth database or the closed database based on the field. In this way, the news life cycle is managed through the closed database and the growth database to improve the performance of the entire database.

[0057] In step S110, illustratively, the news text may be news obtained from various media such as websites and television. It may also be a news text obtained by converting voice-broadcasted news into text. The news text may be news in any field, such as biology, medicine, education, etc. The news summary represents the core information and main viewpoints of the news. Specifically, since the news summary belongs to the main content and key information of the news text, the news summary is used to classify the news text, thereby avoiding misclassification caused by text truncation, redundancy and secondary information.

[0058] Optionally, a neural network model may be trained in advance based on text samples and their corresponding summary samples to perform summary extraction training, so that the trained model can extract news summaries from news texts.

[0059] Optionally, a large language model can also be used in conjunction with a specific prompt to generate a news summary. Prompt is the text used to prompt the generation of a text summary. It should be noted that large language models (LLMs) are deep learning models trained on massive text data. Large language models have three important capabilities: contextual learning, instruction following, and chain of thought reasoning. Contextual learning: LLMs are able to understand and utilize contextual information by learning from a large amount of text data. This means that the model can interpret the following content based on the previous content, thereby better understanding and generating coherent language. For example, in a dialogue system, LLMs can generate more accurate responses based on previous dialogue history, taking into account the context and user intent in the context. Instruction following: LLMs can follow instructions provided by humans to perform specific tasks or generate specific types of output. By providing explicit instructions as prompts to the model, it can generate results that are consistent with the instructions. For example, in a question-answering system, by explicitly specifying the type of question and the required answer format, LLMs can generate accurate answers that meet the requirements. Thinking chain reasoning: LLMs have certain logical reasoning capabilities and can infer new conclusions by linking multiple concepts and information. By triggering the memory and semantic connections within the model, LLMs can reason, summarize, and synthesize information to generate more organized and creative outputs. This makes them excellent in generating stories, articles, and creative content. These three capabilities enable LLMs to not only generate natural language text, but also to deeply understand the meaning of the text and handle various natural language tasks. Prompt is to drive the large model to express text description. Prompt can be a phrase, a sentence, a paragraph, or even a complete question. It is usually created by staff to clarify and convey specific intentions or task requirements. The purpose of prompt is to guide the large language model to perform specific operations or generate specific types of output. This can include answering questions, completing tasks, writing articles, generating code, etc. Prompt needs to clearly guide the expected behavior of the large language model to ensure that the generated results meet expectations. Prompt can contain contextual information so that the model understands and generates content related to it. The context can be previous dialogue history, background knowledge, or constraints in a specific field. By providing relevant context, Prompt helps the model better understand the input and generate the output.

[0060] In this embodiment, a large language model is generally used to extract news summaries. The trained summary model is often limited to specific algorithms and rules, and may not be able to effectively capture the full picture of complex news content, thus affecting the accuracy and efficiency of clustering. Large language models usually have deeper semantic understanding capabilities and a broader knowledge base, so that the generated summary is not only accurate, but also covers richer background information and contextual relationships. At the same time, the use of prompts makes the summary process more flexible and controllable, and the style and focus of the summary can be customized according to specific needs, so that summary content that better meets the needs of news clustering can be generated.

[0061] In step S120, illustratively, a news cluster represents a collection of news with semantic similarity within a preset time period, and the preset time period is set according to actual needs and is not limited here. The news cluster includes multiple news texts, and the news cluster is represented by a vector generated by clustering multiple news texts. Optionally, the pre-acquired news text is extracted through a large language model to obtain its corresponding summary, and then the summaries corresponding to the multiple news texts are clustered to obtain a vector. Since the summary is smaller in size and easier to process than the complete news text, it can improve the processing speed of clustering. At the same time, it makes news aggregation more accurate and efficient, which helps users quickly obtain the main content and trends of the news.

[0062] Furthermore, determining the corresponding news cluster in the growing database based on the news summary includes: determining the word vector corresponding to the news summary according to the embedding layer in the large language model; wherein the large language model is used to generate a corresponding summary for each news text of the news cluster in the growing database; and determining the corresponding news cluster in the growing database according to the word vector corresponding to the news summary.

[0063] Specifically, since each news text in the news cluster in the growth database is a summary generated by the large language model, the embedding layer (i.e., embedding layer) in the large language model is still used when processing the news summary of the subsequent news text to output the vector (embedding) corresponding to the news summary. The similarity is calculated for the word vector corresponding to the news summary and the vector corresponding to each news cluster in the growth database to determine the news cluster corresponding to the news summary. Since the summary in the news cluster and the news summary of the obtained news text are both processed by the large language model, the consistency of the two in semantic understanding and information expression can be guaranteed, so that the news cluster in the growth database can be found more accurately.

[0064] Then, the news summary corresponding to the news text and the found news cluster are clustered to obtain the first news cluster, and the first news cluster is used to replace the original news cluster in the growth database to update the entire database. It can be seen that since the summary in the news cluster and the news summary of the obtained news text are both processed by the large language model, the relevance and accuracy of the clustering results can be improved.

[0065] In step S130, illustratively, it is determined simultaneously whether the news cluster has a corresponding event and whether the news cluster is the only news cluster determined in the growth database. The execution of the above two judgment conditions can be performed in parallel or successively, and the specific execution order is not limited.

[0066] Specifically, if it is determined that the news cluster is the only news cluster determined in the growth database, it means that the news cluster is relatively stable and will not cause changes in multiple events. And if it is determined that the news cluster does not belong to any event, since there is no corresponding event for the news cluster, it is necessary to search in the closed database whether there is a news cluster related to the first news cluster. If there is a second news cluster related to the first news cluster, since the above two news clusters are related, it means that the first news cluster is the latest development of the second news cluster, and the event context can be constructed.

[0067] Furthermore, if the news cluster has an event to which it belongs, the first news cluster is determined as the next event node of the event, and an event context is generated. There is no need to search for similar news clusters in a closed database, and the corresponding event context is directly updated. In this way, searching for the event to which the news belongs according to the life cycle of the news can further improve the updating speed of the event context.

[0068] In step S140, exemplarily, the event context is used to represent the development trajectory of the event, which belongs to a sequence relationship and includes multiple event nodes. Since the first news cluster is the latest development of the second news cluster. The first news cluster is associated with the second news cluster according to the time relationship to obtain the corresponding event context, that is, the first news cluster is used as the event node after the second news cluster is combined. The first news cluster and the second news cluster are combined and displayed, and the second news cluster is displayed before the first news cluster to form a news cluster sequence. Furthermore, the news cluster sequence (i.e., event context) can be saved separately, and corresponding identifiers (such as ID, Identity document) can be set for the news cluster and the event respectively. The relationship between the identifiers is saved in Redis (Remote Dictionary Server).

[0069] Optionally, step S140 includes: when the second news cluster belongs to the first event, determining the first news cluster as the next event node of the first event, and generating an event context.

[0070] Specifically, if the second news cluster belongs to the first event, and the first news cluster is related to the second news cluster, then the first news cluster also belongs to the first event. If the second news cluster is the i-th event node in the first event, then the first news cluster is the i+1-th event node in the first event, and the first news cluster is appended to the second news cluster to update the event context of the first event. Here, i is a positive integer. In this way, when using the database for news retrieval, not only the queried news results can be provided, but also the event context of the news can be provided, which helps to have a more comprehensive understanding of the news.

[0071] Optionally, step S140 includes: constructing a second event when the second news cluster does not belong to any event;

[0072] The first news cluster and the second news cluster are sorted according to the time sequence of the news clusters to generate an event context of the second event.

[0073] Specifically, if the second news cluster does not belong to any event, a new event (i.e., the second event) is constructed, and an identifier corresponding to the second event is constructed. Since the second news cluster is the news before the first news cluster, the second news cluster is used as the first event node in the second event, and the first news cluster is used as the second event node in the second event, thereby generating the event context of the second event. In this way, when using the database for news retrieval, not only the queried news results can be provided, but also the event context of the news can be provided, which helps to have a more comprehensive understanding of the news.

[0074] In the technical solution of the present application, the corresponding news summary is determined based on the news text; the corresponding news cluster is determined in the growth database based on the news summary, the news summary is added to the news cluster and the news cluster is updated to obtain the first news cluster; the growth database is used to store the news clusters updated within a preset time period; when the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growth database, the second news cluster related to the first news cluster is determined in the closed database according to the first news cluster; wherein the closed database is used to store the news clusters that have not been updated within the preset time period; and the event context is constructed based on the first news cluster and the second news cluster. In this way, the acquired news text is actively assigned to the corresponding event context, which improves the update speed and flexibility of the event context, thereby ensuring the integrity of the event context.

[0075] In one embodiment, the method further comprises:

[0076] The news clusters in the growth database are scanned at preset time intervals, and the news clusters that have not been updated are determined as the news clusters of the closed database.

[0077] Exemplarily, the preset time interval is set according to actual needs and may be the same value as the preset time period.

[0078] Specifically, if the growing database and the closed database are databases in physical concepts, then after each preset time interval, the field corresponding to the update time of the cluster information of the news cluster in the growing database is scanned. If the field corresponding to the update time is not updated, the news cluster is added to the closed database and deleted from the growing database. If the field corresponding to the update time is updated, the position of the news cluster is not changed.

[0079] If the growing database and the closed database are databases in non-physical concepts, then after each preset time interval, the fields corresponding to the update time of the cluster information of the news clusters in the growing database are scanned to classify the news clusters, and the news clusters whose fields corresponding to the update time have not been updated are regarded as data in the closed database, and the news clusters whose fields corresponding to the update time have been updated are regarded as data in the growing database.

[0080] In one embodiment, the method further comprises:

[0081] In a case where a plurality of news clusters are determined in a growing database based on the news summary, the plurality of news clusters are replaced with the first news cluster in the growing database.

[0082] Specifically, Figure 2 As shown, if the news summary determines multiple news clusters in the growing database, it means that the news will cause changes in multiple news clusters, and therefore cannot constitute an event. And multiple news clusters are similar to the news, so it is necessary to merge multiple news clusters, that is, cluster multiple news clusters and the news summary together to obtain the first news cluster. If the growing database and the closed database are databases in physical concepts, then the first news cluster is added to the growing database, and multiple news clusters are deleted from the growing database. If the growing database and the closed database are databases in non-physical concepts, then multiple news clusters are deleted, the first news cluster is added and the field corresponding to its update time is updated. In this way, the updated news clusters can be effectively managed, thereby improving the performance of the entire database.

[0083] If it is determined that the news cluster is the only one determined in the growth database, it means that the news cluster is relatively stable and will not cause changes in multiple events. And it is determined that the news cluster does not belong to any event. Since there is no corresponding event for the news cluster, it is necessary to find out whether there is a news cluster related to the first news cluster in the closed database. If there is a second news cluster related to the first news cluster, since the above two news clusters are related, it means that the first news cluster is the latest development of the second news cluster, and the event context can be constructed.

[0084] In one implementation, adding the news summary to the news cluster and updating the news cluster to obtain a first news cluster includes:

[0085] Calculating the center vector of each news cluster and the number of elements of each news cluster to obtain the vector sum of the news cluster;

[0086] A weighted calculation is performed on the vector of the news cluster and the embedding vector corresponding to the news summary to obtain a center vector of the first news cluster.

[0087] Alternatively, if Figure 3 As shown in the figure, if a news cluster is determined in the growing database based on the news summary, the center vector vn of the news cluster is determined, and the number of elements n in the news cluster is obtained. For the current query, the embedding vector is recorded as v. The cluster center vector of the first news cluster is calculated by (vn + v) / (n + 1). Subsequently, the system will update the relevant information in the database and the retrieval engine.

[0088] Optionally, if multiple news clusters are determined in the growing database based on the news summary, the center vector (v1, v2, v3, ...) of each news cluster and the number of elements (n1, n2, n3, ...) corresponding to each news cluster are determined. For the current query, the embedding vector is recorded as v. The cluster center vector of the first news cluster is calculated by (Σ(vi * ni) + v) / (Σni + 1). The system then updates the relevant information in the database and the retrieval engine to facilitate subsequent retrieval.

[0089] Optionally, if the news summary cannot determine the corresponding news cluster in the growth database, a new news cluster is added for the news summary. Specifically, a new cluster is created, and new data including the cluster ID, the normalized vector, and the number of elements in the cluster is inserted into the search engine. At the same time, the original vector information of the relevant cluster will be added to the database.

[0090] Furthermore, when a news cluster is determined in the growth database according to the news summary, if the news cluster is in a locked state, the state of the news cluster is re-determined after a preset waiting time. If the news cluster is not in a locked state, the determined news cluster is locked and clustering is performed on the determined news cluster and the news summary.

[0091] Specifically, the preset waiting time is set according to the actual situation, for example, 3 seconds. A corresponding identifier (cluster ID) can be set for each news cluster, and locking the identifier means that the news cluster is in a locked state. The cluster ID is locked when the news cluster is updated, and the lock is released after the update is completed, and it is not in a locked state. In this way, data conflicts can be prevented by setting locks.

[0092] In this embodiment, the database updated according to the above data processing method is used to retrieve various news. A vector retrieval system is constructed, which mainly evaluates the similarity between texts by calculating the similarity between vectors. That is, using clustering technology, the data space can be divided into multiple regions, each of which represents a subset of the data space. In the query stage, the system first calculates the distance between the query vector and the center of each region to determine the nearest regions. In these selected regions, the system further compares the distance between all vectors and the query vector to obtain the final query result.

[0093] When constructing the database used by the vector retrieval system, a pre-aggregation mechanism is used, that is, the latest news text is clustered offline in advance to obtain multiple news clusters, the multiple news clusters are stored in the database, and the central vector of each news cluster is calculated to represent the news cluster according to the central vector. A cluster expiration mechanism is also set, that is, news clusters that have not been updated for a long time (closed database) and frequently updated news clusters (growing database) are marked according to cluster information. When news is updated, retrieval is performed in the frequently updated news clusters. The input news text is extracted according to the large language model to obtain a news summary, and the vector corresponding to the news summary is output according to the embedding layer. The similarity is calculated based on the corresponding vector of the news summary and the central vector of the frequently updated news cluster, where the similarity can be calculated by cosine similarity.

[0094] If a news cluster cannot be determined based on the news summary, a new cluster will be created. Subsequently, new data containing the cluster ID, the normalized vector, and the number of elements in the cluster will be inserted into the vector retrieval system. At the same time, the original vector information of the relevant cluster will be added to the in-memory database.

[0095] If multiple news clusters are screened out according to the news summary, it means that multiple news clusters are related to the news summary. The news summary causes multiple news clusters to change. Therefore, the news summary is unstable. If the event context corresponding to the news summary is not found, it is not suitable to construct a fixed event context. First, multiple news clusters are merged, and then the merged vector and the vector of the news summary are clustered to obtain the center vector of the first news cluster, and the center vector of the first news cluster is used to replace the above multiple news clusters.

[0096] If a news cluster is selected according to the news summary, cluster the center vector of the news cluster and the vector of the news summary to obtain the center vector of the first news cluster. The original news cluster is replaced by the center vector of the first news cluster. If the news cluster has an event, the first news cluster is used as the next node of the event to which the news cluster belongs. If the news cluster does not belong to any event, determine whether there is a news cluster related to the first news cluster in the closed database. Specifically, the center vector of the first news cluster can be used to perform similarity calculations with the center vectors of each news cluster in the closed database to determine the related news cluster of the first news cluster (i.e., the second news cluster).

[0097] It is determined whether the second news cluster has an event. If so, the first news cluster is used as the next event node of the event to which the second news cluster belongs, thereby updating the event context of the event to which the second news cluster belongs. If the event does not exist, a new event is added, and the second news cluster is used as the first event node of the event, and the first news cluster is used as the second event node of the event. In this way, a new event context is constructed based on the first news cluster and the second news cluster. In this way, the update of the vector retrieval system is realized.

[0098] In the process of using the vector retrieval system to perform news retrieval, the user inputs the retrieval text, the retrieval text is converted into a vector for representation, and multiple relevant texts related to the retrieval text are retrieved from the database based on the converted vector. Specifically, the similarity between the converted vector and the central vector of each news cluster can be calculated, and the news clusters with the top n similarities are taken as relevant texts, where n can be any positive integer.

[0099] Then, multiple related texts are rewritten based on the combination of the large language model and prompts to output a target news. The large model has a strong language understanding ability and a broad knowledge base, which can effectively integrate and rewrite information from different news, maintain the accuracy and depth of the information, and the target news will contain the key information and perspectives of each original news, while avoiding duplication and redundancy, providing users with a more comprehensive and in-depth understanding of the news. While outputting the target news, the event context related to the target news is displayed.

[0100] Exemplary Devices

[0101] Accordingly, Figure 4 1 is a schematic diagram of a data processing device according to an embodiment of the present application. In an exemplary embodiment, a data processing device is provided, comprising:

[0102] A summary extraction module 410 is used to determine a corresponding news summary based on the news text;

[0103] A first processing module 420 is used to determine a corresponding news cluster in a growth database based on the news summary, add the news summary to the news cluster and update the news cluster to obtain a first news cluster; the growth database is used to store news clusters updated within a preset time period;

[0104] A second processing module 430 is configured to determine, in a closed database according to the first news cluster, a second news cluster related to the first news cluster when the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growth database; wherein the closed database is used to store news clusters that have not been updated within a preset time period;

[0105] The construction module 440 is used to construct an event context based on the first news cluster and the second news cluster.

[0106] In one embodiment, the building block is further used for:

[0107] In the case that the second news cluster belongs to the first event, the first news cluster is determined as the next event node of the first event, and an event context is generated.

[0108] In one embodiment, the building block is further used for:

[0109] In the case that the second news cluster does not belong to any event, constructing a second event;

[0110] The first news cluster and the second news cluster are sorted according to the time sequence of the news clusters to generate an event context of the second event.

[0111] In one embodiment, the device further comprises:

[0112] A growing database updating module is used to replace the multiple news clusters with the first news cluster in the growing database when multiple news clusters are determined in the growing database based on the news summary.

[0113] In one embodiment, the device further comprises:

[0114] The updating module is used to scan the news clusters in the growth database at a preset time interval, and determine the news clusters that have not been updated as the news clusters of the closed database.

[0115] In one implementation, determining a corresponding news cluster in a growth database based on the news summary includes:

[0116] Determining a word vector corresponding to the news summary according to an embedding layer in a large language model; wherein the large language model is used to generate a corresponding summary for each news text in the news cluster in the growth database;

[0117] The corresponding news cluster is determined in the growth database according to the word vector corresponding to the news summary.

[0118] In one implementation, generating the first news cluster according to the news cluster and the news summary includes:

[0119] Calculating the center vector of each news cluster and the number of elements of each news cluster to obtain the vector sum of the news cluster;

[0120] A weighted calculation is performed on the vector of the news cluster and the embedding vector corresponding to the news summary to obtain a center vector of the first news cluster.

[0121] The data processing device provided in this embodiment belongs to the same application concept as the data processing method provided in the above embodiments of this application, can execute the data processing method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the data processing method. For the technical details not fully described in this embodiment, please refer to the specific processing content of the data processing method provided in the above embodiments of this application, which will not be repeated here.

[0122] The functions implemented by the above summary extraction module 410 , the first processing module 420 , the second processing module 430 and the construction module 440 may be implemented by the same or different processors, respectively, and the embodiment of the present application is not limited thereto.

[0123] It should be understood that the modules in the above devices can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of each unit of the device, wherein the processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory in the device or a memory outside the device. Alternatively, the unit in the device can be implemented in the form of a hardware circuit, and the functions of some or all units can be realized by designing the hardware circuit. The hardware circuit can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are realized by designing the logical relationship of the components in the circuit; for another example, in another implementation, the hardware circuit can be implemented by PLD, taking FPGA as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by a configuration file, so as to realize the functions of some or all of the above units. All units of the above devices can be implemented in the form of a processor calling software, or in the form of a hardware circuit, or in part by a processor calling software, and the remaining part is implemented in the form of a hardware circuit.

[0124] In an embodiment of the present application, a processor is a circuit with the ability to process signals. In one implementation, the processor may be a circuit with the ability to read and run instructions, such as a CPU, a microprocessor, a GPU, or a DSP; in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, DPU, etc.

[0125] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0126] In addition, all or part of the units in the above device can be integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a SOC. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The type of the at least one processor may be different, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0127] Exemplary Electronic Devices

[0128] Another embodiment of the present application also provides an electronic device, see Figure 5 As shown, the device includes:

[0129] Memory 500 and processor 510;

[0130] The memory 500 is connected to the processor 510 and is used to store programs;

[0131] The processor 510 is configured to implement the dialog response processing method disclosed in any of the above embodiments by running the program stored in the memory 500 .

[0132] Specifically, the electronic device may further include: a bus, a communication interface 520 , an input device 530 and an output device 540 .

[0133] The processor 510, the memory 500, the communication interface 520, the input device 530 and the output device 540 are connected to each other via a bus.

[0134] A bus may include a pathway that transfers information between components of a computer system.

[0135] The processor 510 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0136] The processor 510 may include a main processor, and may also include a baseband chip, a modem, and the like.

[0137] The memory 500 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 500 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.

[0138] The input device 530 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0139] Output device 540 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.

[0140] The communication interface 520 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.

[0141] The processor 510 executes the program stored in the memory 500 and calls other devices, and can be used to implement each step of any data processing method provided in the above embodiments of the present application.

[0142] Exemplary computer program products and storage media

[0143] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the data processing method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.

[0144] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0145] In addition, an embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the data processing method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification. The specific working content of the above-mentioned electronic device, as well as the specific working content of the above-mentioned computer program product and the computer program on the storage medium when being executed by the processor, can all be referred to the contents of the above-mentioned method embodiment, and will not be repeated here.

[0146] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0147] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0148] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0149] The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be combined, divided and deleted according to actual needs.

[0150] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, 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 an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0151] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0152] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0153] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0154] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0155] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0156] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized in that: include: Determine a corresponding news summary based on the news text; Determine a corresponding news cluster in a growth database based on the news summary, add the news summary to the news cluster and update the news cluster to obtain a first news cluster; the growth database is used to store news clusters updated within a preset time period; In the case where the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growth database, a second news cluster related to the first news cluster is determined in a closed database according to the first news cluster; wherein the closed database is used to store news clusters that have not been updated within a preset time period; constructing an event context based on the first news cluster and the second news cluster; The constructing an event context based on the first news cluster and the second news cluster includes: In the case where the second news cluster belongs to the first event, determining the first news cluster as the next event node of the first event, and generating an event context; In the case that the second news cluster does not belong to any event, a second event is constructed; the first news cluster and the second news cluster are sorted according to the time sequence of the news clusters to generate an event context of the second event.

2. The method according to claim 1, characterized in that The method further comprises: In a case where a plurality of news clusters are determined in a growing database based on the news summary, the plurality of news clusters are replaced with the first news cluster in the growing database.

3. The method according to claim 1, characterized in that The method further comprises: The news clusters in the growth database are scanned at preset time intervals, and the news clusters that have not been updated are determined as the news clusters of the closed database.

4. The method according to claim 1, characterized in that: The determining a corresponding news cluster in the growth database based on the news summary includes: Determining a word vector corresponding to the news summary according to an embedding layer in a large language model; wherein the large language model is used to generate a corresponding summary for each news text in the news cluster in the growth database; The corresponding news cluster is determined in the growth database according to the word vector corresponding to the news summary.

5. The method according to any one of claims 1 to 4, characterized in that Adding the news summary to the news cluster and updating the news cluster to obtain a first news cluster includes: Calculating the center vector of each news cluster and the number of elements of each news cluster to obtain the vector sum of the news cluster; A weighted calculation is performed on the vector of the news cluster and the embedding vector corresponding to the news summary to obtain a center vector of the first news cluster.

6. A data processing device, characterized in that: include: A summary extraction module, used to determine a corresponding news summary based on the news text; A first processing module is used to determine a corresponding news cluster in a growth database based on the news summary, add the news summary to the news cluster and update the news cluster to obtain a first news cluster; the growth database is used to store news clusters updated within a preset time period; A second processing module is used to determine, in a closed database according to the first news cluster, a second news cluster related to the first news cluster when the news cluster does not belong to any event and the news cluster is the only news cluster determined in the growth database; wherein the closed database is used to store news clusters that have not been updated within a preset time period; A construction module, used for constructing an event context based on the first news cluster and the second news cluster; The construction module is also used to, when the second news cluster belongs to the first event, determine the first news cluster as the next event node of the first event and generate an event context; when the second news cluster does not belong to any event, construct the second event; and sort the first news cluster and the second news cluster according to the time sequence of the news clusters to generate an event context of the second event.

7. An electronic device, characterized in that: include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor implements the data processing method according to any one of claims 1 to 5 by running the program in the memory.

8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the data processing method according to any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the data processing method according to any one of claims 1 to 5.