Event description generation method and device, database generation method and device and electronic equipment
By obtaining the title or summary of the news event, extracting entity words and retrieving multiple relationships from the relational database, sorting entity relationship description text according to time information, and generating event descriptions, it solves the problem that the existing news presentation method cannot quickly and effectively understand the details of news event. The problem of this achieves the in-depth consumption experience of news content.
Patent Information
- Application Number
- CN202411570763.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-05
AI Technical Summary
The existing news display methods cannot quickly and effectively allow users to understand the details of news events, and limit users' in-depth consumption of news content.
By obtaining the title or summary of the news event as the search text, extracting entity words and retrieving multiple relationships from the relational database, sorting the entity relationship description text according to time information, and generating event description.
It has achieved rapid sorting out the ins and outs of news events, improved users' comprehensive understanding and profound understanding of news events, and enhanced the in-depth consumption experience of news content.
Smart Images

Figure CN119397115A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of deep learning, natural language processing, large language models, and generative model technology. More specifically, the present disclosure provides an event description generation method, a database generation method, an apparatus, an electronic device, a storage medium, and a computer program product. Background Art
[0002] Currently, news is usually displayed by sorting media content in a list format, requiring users to click on them one by one to understand the details of the news event. If users want to conduct in-depth research on key information in the news, they are required to search for relevant information again in the search box. This obviously cannot allow users to quickly understand the details of the news event and limits the depth of users' consumption of news content. Summary of the invention
[0003] The present disclosure provides an event description generating method, a database generating method, an apparatus, an electronic device, a storage medium and a computer program product.
[0004] According to a first aspect, a method for generating an event description is provided, the method comprising: obtaining at least one of a title and a summary of an event to be processed as a retrieval text; using entity words extracted from the retrieval text to retrieve multiple relationships from a relational database, wherein the relationship comprises an event element set, the event element set comprises time information, entity words, associated entity words, and entity relationship description text for describing the relationship between the entity words and the associated entity words; and sorting multiple entity relationship description texts respectively from multiple relationships according to the time information to obtain an event description of the event to be processed.
[0005] According to the second aspect, a database generation method is provided, which includes: obtaining the news text and the time node of the news based on the news source web page information; extracting multiple entity words from the news text; generating an entity relationship description text for describing the relationship between the multiple entity words; and generating a database based on the time node, entity words, and entity relationship description text.
[0006] According to a third aspect, an event description generating device is provided, which includes: a retrieval text determination module, used to obtain at least one of the title and summary of the event to be processed as the retrieval text; a first retrieval module, used to use the entity words extracted from the retrieval text to retrieve multiple relationships from a relational database, wherein the relationship includes an event element set, and the event element set includes time information, entity words, associated entity words, and entity relationship description text for describing the relationship between the entity words and the associated entity words; and a first event description generating module, used to sort multiple entity relationship description texts respectively from multiple relationships according to the time information to obtain the event description of the event to be processed.
[0007] According to the fourth aspect, a database generation device is provided, which includes: a parsing module, used to obtain the news text and the time node of the news based on the news source web page information; an entity word determination module, used to extract multiple entity words from the news text; an entity relationship description text generation module, used to generate an entity relationship description text for describing the relationship between multiple entity words; and a database generation module, used to generate a database based on the time node, entity words, and entity relationship description text.
[0008] According to a fifth aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.
[0009] According to a sixth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
[0010] According to a seventh aspect, a computer program product is provided, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and wherein the computer program implements the method provided according to the present disclosure when executed by a processor.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0013] Figure 1is a schematic diagram of an exemplary system architecture to which an event description generating method and a database generating method can be applied according to an embodiment of the present disclosure;
[0014] Figure 2 is a flowchart of a method for generating event descriptions according to an embodiment of the present disclosure;
[0015] Figure 3 is a system schematic diagram of an event description generating method according to an embodiment of the present disclosure;
[0016] Figure 4 is a flowchart of an event description generating method according to another embodiment of the present disclosure;
[0017] Figure 5 is a flowchart of a database generation method according to an embodiment of the present disclosure;
[0018] Figure 6 is a flowchart of a database generation method according to another embodiment of the present disclosure;
[0019] Figure 7 is a block diagram of an event description generating device according to an embodiment of the present disclosure;
[0020] Figure 8 is a block diagram of a database generating device according to an embodiment of the present disclosure; and
[0021] Fig. 9 The present invention is a block diagram of an electronic device according to at least one of an event description generating method and a database generating method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0023] There are currently two main forms of news presentation. One form is that users click on news content and jump to a secondary page, where various media outlets list their interpretations of the news content. A typical example is the hot news content on various search platforms. In this mode, when users click on the news list with great expectations, they are immediately directed to a secondary page that seems to be rich in information. However, this news browsing experience hides significant inefficiency. If users want to delve into the essence of each piece of news, they have to click one by one and shuttle between various web pages. This process is not only cumbersome and time-consuming, but also exacerbates the inefficiency of information consumption, wasting users' precious time and failing to satisfy their desire for high-quality, in-depth news information.
[0024] Another form is to display news content in the form of video streaming, which provides users with a seamless information acquisition experience. In this mode, when the user finishes watching a news video, the system automatically and smoothly jumps to the next video content without manual operation, realizing continuous playback of news information. This automated flow method saves users time switching videos and manual operation time. However, it is also very easy to encounter repeated video content and unable to sort out news node information.
[0025] When users are immersed in consuming news content, both of the above solutions can be implemented, but neither can quickly sort out the ins and outs of the news, especially for news events that contain longer clues.
[0026] In the list-based display solution, users are very likely to encounter repeated exposure to news content as they scroll and click. Similar headlines and identical reporting angles make the already tight time slip away in browsing repeated information, greatly reducing the efficiency and value of news acquisition. The quality and depth of news content are difficult to guarantee in this fragmented browsing method. Each piece of news is compressed into a short summary, designed to attract clicks rather than fully present the facts, making it difficult for users to obtain a comprehensive and in-depth interpretation of the news, and ultimately only obtain superficial information fragments.
[0027] Although the video streaming solution has attracted a large number of viewers with its advantages of intuitiveness, vividness and instant transmission, it also has limitations that cannot be ignored. Among them, one of the most significant problems is the repetitiveness of content and the fragmentation of context information. In the fast-rolling video stream, in order to cater to the audience's habit of fast consumption, many news clips are cut short and sharp, often focusing only on a certain moment or a certain aspect of the event, lacking depth and breadth. This "fast food" presentation method can easily lead to the same or similar news content being repeatedly played at different times and on different platforms, causing information redundancy and fatigue for the audience. More importantly, the form of video streaming is difficult to effectively connect the complete context of news events. Each video is like an independent island. Although each is wonderful, it is difficult to form a coherent narrative line, making it difficult for the audience to grasp the cause, development, climax and result of the news event as a whole. This state of information fragmentation not only weakens the coherence and logic of the news, but also may make the audience lose their way in the massive information, making it difficult to form a comprehensive understanding and deep understanding of the news event. If you want to produce a sophisticated video stream that contains the context of events, you need to manually organize the news content first, which greatly increases the time cost of production.
[0028] It can be seen that although both solutions allow users to consume news content, neither can quickly and effectively obtain news information, especially news information containing long clues, which needs to be manually sorted and then output.
[0029] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0030] In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0031] Figure 1 is a schematic diagram of an exemplary system architecture to which the event description generation method and database generation method can be applied according to an embodiment of the present disclosure. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0032] like Figure 1As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0033] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices, including but not limited to smart phones, tablet computers, laptops, etc.
[0034] The event description generation method provided in the embodiment of the present disclosure can generally be executed by the terminal devices 101, 102, and 103. Accordingly, the database generation device provided in the embodiment of the present disclosure can generally be set in the terminal devices 101, 102, and 103.
[0035] The database generation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the database generation device provided in the embodiment of the present disclosure can generally be set in the server 105.
[0036] Figure 2 is a flowchart of a method for generating event description according to an embodiment of the present disclosure.
[0037] like Figure 2 As shown, the event description generating method 200 includes operations S210 to S230.
[0038] In operation S210, at least one of a title and a summary of an event to be processed is acquired as a search text.
[0039] For example, in response to a user's clicking operation on a news title in a news list or an input operation in a news search box, the title of the news event that the user wants to query can be determined. The news event that the user wants to query is the event to be processed.
[0040] The pending event may be a sequence of events with continuous progress, and the news title clicked by the user may be the title of an event in the sequence of events. The keywords in the user's input information may match the title of an event in the sequence of events.
[0041] A news summary can be generated based on the news content under the title currently clicked by the user. For example, a large language model can be used to summarize the news content under the current title to obtain a news summary.
[0042] The news title and the news summary can be combined together to form a text as a search text. The search text is used to retrieve event descriptions of multiple time nodes of the event to be processed, and the event descriptions of multiple time nodes constitute the event context.
[0043] In operation S220, a plurality of relations are retrieved from a relational database using the entity words extracted from the search text.
[0044] For example, a trained deep learning model can be used to extract entity words from the retrieved text, which may include person entity words, location entity words, etc.
[0045] The trained deep learning model can be a fine-tuned large language model. For example, the large language model is fine-tuned using training sample texts labeled with entity words, so that the large language model has the ability to recognize text entity words. Thus, the entity words can be extracted from the search text using the large language model.
[0046] The relational database can store multiple relations, each of which can be an event element set, which includes time information, entity words, associated entity words associated with the entity words, and entity relationship description text used to describe the relationship between the entity words and the associated entity words. The event element set can be extracted from a single news event, and the single news event can be an event in the sequence of events to be processed.
[0047] For example, the time information in the event element set may be the release time of the above single news event, which may be referred to as a time node. The entity words and associated entity words may be associated entity words extracted from the above single news event. The entity relationship description text may be the entity relationship description text between the entity words and associated entity words summarized using a trained deep learning model.
[0048] For example, a relationship stored in a relational database includes the entity word "person A", the associated entity word "person B", and the entity relationship description text "person A bravely rescues person B". Correspondingly, another relationship may be stored in the relational database, which includes the entity word "person B", the associated entity word "person A", and the entity relationship description text "person A bravely rescues person B". Therefore, there may be multiple sets of event elements (i.e., relationships) for a single event. The time nodes in multiple relationships extracted from a single event may be the same or consistent, and consistency may refer to the same period, such as the same day.
[0049] In addition, as events progress, the relational database can also incrementally store the event element set of the latest progress event, which may include new time nodes, entity words, associated entity words, and entity relationship description text extracted from the latest progress event.
[0050] Thus, for each entity word extracted from the search text, the entity word can be used to search the relational database. Each entity word can retrieve at least one relationship. For example, the same entity word can retrieve multiple relationships corresponding to multiple time nodes, and the entity relationship description texts in the relationships of the same time node retrieved by different entity words may be the same.
[0051] In operation S230, a plurality of entity relationship description texts respectively from a plurality of relationships are sorted according to time information to obtain an event description of the event to be processed.
[0052] For example, multiple entity relationship description texts in the retrieved multiple event element sets can be sorted according to time nodes, wherein the same entity relationship description texts at the same time node can be merged, and different entity relationship description texts at the same time node can be combined together.
[0053] The embodiments of the present disclosure extract entity words from news events, generate entity relationship description texts and store them in a database. When searching for events, the entity relationship description texts are retrieved from the database and sorted according to time nodes to obtain event descriptions containing time clues. This can effectively sort out the context of events and improve users' comprehensive knowledge and deep understanding of news events.
[0054] Figure 3 is a system diagram of a method for generating event description according to an embodiment of the present disclosure.
[0055] like Figure 3As shown, this embodiment includes an entity extraction module 310, a relational database 320 and a feature database 330. The entity extraction module 310 is used to perform entity extraction on at least one of the title and the abstract of the event to be processed, and obtain entity words and entity description texts. The relational database 320 stores multiple relationships, each of which can be a set of event elements extracted from a single news event, including a time node, an entity word, an associated entity word associated with the entity word, and an entity relationship description text for describing the relationship between the entity word and the associated entity word. The feature database 330 stores the feature vectors and time nodes of the above-mentioned entity relationship description texts. That is to say, after extracting the event element set from a single news event, in addition to storing the event element composition relationship in the event element set in the relational database 320, the entity relationship description text in the event element set is also encoded to obtain entity relationship description features, and the entity relationship description features and time nodes are stored in the feature database 330.
[0056] According to an embodiment of the present disclosure, in response to at least one of a click operation on a news title and an input operation in a news search box, a title of an event to be processed is determined; and a summary is generated according to the news content under the title.
[0057] For example, a user clicks on a title on a news list or enters information in a news search box to determine the news title that the user wants to obtain, and summarizes the news content under the news title to obtain a summary. The entity extraction module 310 can be a fine-tuned large language model that can extract entity words from the search text and further generate description text of the entity words, namely, entity description text.
[0058] For example, the entity extraction module 310 extracts the entity word "Character A" and generates an entity description text "Progress of Character A's Heroic Act".
[0059] Next, the entity words can be used to search the relational database 320, and the search process can be an exact matching process. That is, the entity words completely hit the content of the entity word field in the relational database, and at least one relationship of the hit entity word can be recalled. Then, by sorting the entity relationship description text in at least one relationship in chronological order, an event description containing time clues, that is, event context, is obtained.
[0060] According to an embodiment of the present disclosure, an entity description text of an entity word is generated; a plurality of entity relationship description features are retrieved from a feature database using the entity description text, wherein the feature database includes the entity relationship description features of the entity relationship description text and time information; and a plurality of entity relationship description texts corresponding to each of the plurality of entity relationship description features are sorted according to the time information to obtain an event description of the event to be processed.
[0061] For example, the entity relationship description text can be used to search the feature database 330, and the search process can be a fuzzy matching process. For example, a feature vector of the entity description text, i.e., the entity description feature, can be generated, the similarity between the entity description feature and the entity relationship description feature in the feature database 330 can be calculated, a plurality of entity relationship description features with the highest similarity can be selected, a plurality of entity relationship description texts corresponding to the selected plurality of entity relationship description features can be determined, and the plurality of entity relationship description texts can be sorted in chronological order to obtain an event description containing a time clue, i.e., an event context.
[0062] The embodiments of the present disclosure provide two matching modes for retrieval: exact matching and fuzzy matching, which can improve the comprehensiveness of the retrieval for the events to be processed.
[0063] In one example, when multiple relations are retrieved from the relational database 320, since the retrieval of the relational database 320 is an exact match, the multiple relations retrieved can accurately describe the ins and outs of the event, and therefore, fuzzy matching of the feature database 330 is no longer required.
[0064] Figure 4 is a flowchart of a method for generating event description according to another embodiment of the present disclosure.
[0065] like Figure 4 As shown, this embodiment includes operations S401 to S410.
[0066] In operation S401, at least one of a title and a summary of an event to be processed is obtained as a search text.
[0067] In operation S402, entity words are extracted from the search text.
[0068] In operation S403, the relational database is searched using the entity words.
[0069] The implementation steps of operation S401 to operation S403 are similar to the implementation steps of operation S210 to operation S220, and will not be repeated here. It should be noted that the step of searching the relational database using entity words in operation S403 is an exact match.
[0070] In operation S404, it is determined whether a relationship that meets the preset condition is retrieved from the relationship database. If yes, operation S405 is executed, otherwise operation S406 is executed.
[0071] According to an embodiment of the present disclosure, entity words are used to retrieve multiple relationships that meet preset conditions from a relational database, wherein the preset conditions include at least one of a time condition and a source condition.
[0072] For example, each relationship in the relational database can be a set of event elements extracted from a single news event, and the event element set can also include the source information of the news event. For example, the source information of the news event can be determined based on the source webpage URL (Uniform Resource Locator) of the single news event, and the source information is also added to the relationship.
[0073] When using entity words to search a relational database, you can also set search conditions. The search conditions can limit the time range and source range. For example, the time range can be within the past year, and the source range can be several designated authoritative news websites.
[0074] If multiple relationships meeting the above search conditions are retrieved, operation S405 may be performed, otherwise operation S406 is performed.
[0075] In operation S405, the entity relationship description texts in the retrieved multiple relationships are sorted according to time information to obtain an event context.
[0076] For example, the event element set includes time information. By sorting multiple entity relationship description texts in the multiple relationships retrieved according to the time information in the multiple relationships, an event description containing time clues, namely, event context, can be obtained.
[0077] In operation S406, entity description text is generated.
[0078] The entity description text may be a description text of the extracted entity word. For example, if the entity word is "character A", the entity description text may be "Progress of the event of character A's courageous act".
[0079] In operation S407, the entity description text is used to search the feature database.
[0080] For example, the entity description text is encoded to obtain entity description features, and the similarity between the entity description features and the entity relationship description features in the feature database is calculated. This process is a fuzzy matching process.
[0081] In operation S408, it is determined whether entity relationship description features that meet the preset conditions are retrieved from the feature database. If yes, operation S409 is executed, otherwise it means that there is no retrieval result and the process ends.
[0082] For example, the source information of the event (such as the source webpage URL) may also be added to the feature database, that is, the feature database includes the entity relationship description feature and the time information and source information corresponding to the entity relationship description feature.
[0083] According to an embodiment of the present disclosure, entity description features are used to retrieve multiple entity relationship description features that meet preset conditions from a feature database, wherein the preset conditions include at least one of a time condition and a source condition.
[0084] For example, search conditions may be set for fuzzy matching of the feature database, and the search conditions may limit the time range and source range. For example, the time range may be within the past year, and the source range may be several designated authoritative news websites.
[0085] If multiple entity relationship description features that meet the search criteria are retrieved, operation S409 may be performed.
[0086] In operation S409, the multiple entity relationship description texts corresponding to the retrieved multiple entity relationship description features are sorted according to time information to obtain an event context.
[0087] For example, each entity relationship description feature corresponds to time information, and multiple entity relationship description texts corresponding to multiple entity relationship description features can be sorted according to the time information to obtain an event description containing time clues, that is, an event context.
[0088] In operation S410 , an event context is displayed.
[0089] For example, by displaying multiple entity relationship description texts in order, users can quickly obtain the ins and outs of a news event and conduct in-depth consumption of the news event.
[0090] According to an embodiment of the present disclosure, the present disclosure also provides a database generation method.
[0091] Figure 5 is a flowchart of a database generation method according to an embodiment of the present disclosure.
[0092] like Figure 5 As shown, the database generation method 500 includes operations S510 to S540.
[0093] In operation S510, the news text and the time node of the news are obtained according to the news source web page information.
[0094] For example, for news titles in the hot search list, we can obtain the news source web page information, and then extract the text and release time from the news source web page. The release time can be used as the time node of the news.
[0095] In operation S520, a plurality of entity words are extracted from the news text.
[0096] In operation S530, an entity relationship description text for describing a relationship between a plurality of entity words is generated.
[0097] For example, a fine-tuned large language model can be used to extract entities from a news article to obtain multiple entity words. The large language model can also generate entity relationship description text that describes the relationship between multiple entity words.
[0098] For example, the large language model can be prompted to summarize the news text in the same way as that used to describe entity relationships, thereby obtaining entity relationship description text.
[0099] For example, the large language model extracts the entity words "person A", "person B", and "address C" from the main text of the news, and generates the entity relationship description text "person A is a delivery man at address C, and person A bravely rescues person B."
[0100] In operation S540, a database is generated according to the time nodes, entity words, and entity relationship description texts.
[0101] For example, a time node, entity word, entity relationship description text, and associated entity word may be combined into a relationship and stored in a relational database. The entity relationship description text may also be encoded to obtain an entity relationship description vector and stored in a feature database.
[0102] The embodiments of the present disclosure extract time nodes and entity words from the news text to generate entity relationship description text for describing entity relationships, and store the time nodes, entity words, and entity relationship description text in a database, which can be used for event retrieval, so as to retrieve the event context containing time clues, enable users to quickly obtain the ins and outs of news events, and improve users' comprehensive knowledge and deep understanding of news events.
[0103] Figure 6 is a flowchart of a database generation method according to another embodiment of the present disclosure.
[0104] like Figure 6 As shown, this embodiment includes operations S610 to S670.
[0105] In operation S610, news source web page information is acquired according to the news title.
[0106] In operation S620, the news text, time node and source information are determined from the news source web page information.
[0107] According to an embodiment of the present disclosure, source information is determined based on news source web page information, news content at multiple time nodes in the news source web page information with intervals not exceeding a preset time length is determined as the news text; and the time node of the news is determined from the multiple time nodes.
[0108] For example, the source information may be the URL of the source webpage. The time node may be the time of news release. There may be one or more source webpages obtained according to the news title. If there are multiple source webpages, the contents of the multiple original webpages may be merged together, and in the merged source webpage contents, the news contents of multiple time nodes whose time intervals do not exceed a preset time length (e.g., 24 hours) are combined together as the news body. The earliest time node among the multiple time nodes may be used as the time node of the news.
[0109] In operation S630, the news text is segmented into blocks to obtain text block contents.
[0110] In operation S640, entity words are extracted from each text block, and the extracted multiple text blocks are summarized to obtain text relationship description text.
[0111] The purpose of cutting the news text into blocks is to make the length of the text blocks obtained by cutting meet the model requirements. For example, the news text can be cut into blocks of 2,000 words in length to obtain text blocks. The text blocks are input into the fine-tuned large language model, which can extract multiple entity words.
[0112] The large language model can also be prompted to summarize the news text in the summary method of describing entity relationships to obtain entity relationship description text.
[0113] In operation S650, the time node, entity words, related entity words, entity relationship description text, and source information are combined into a relationship and stored in a relational database.
[0114] For example, the time node is "X year X month X day", the source information is the original web page URL identifier, the extracted entity words include "person A", "person B", and "address C", and the generated entity relationship description text is "person A is a delivery man in place C, and person A bravely rescues person B."
[0115] For the entity word "Person A", a relationship can be formed {"Time": "X year X month X day", "Entity word": "Person A", related entity words: "Person B", "Address C", "Entity relationship description text": "Person A is a delivery man in C, and Person A bravely rescues Person B"}.
[0116] For the entity word "Person B", a relationship can be formed {"Time": "X year X month X day", "Entity word": "Person B", related entity words: "Person A", "Address C", "Entity relationship description text": Person A is a delivery man in place C, and Person A bravely rescues Person B"}.
[0117] For the entity word "Address C", a relationship can be formed {"Time": "X year X month X day", "Entity word": "Address C", related entity words: "Person A", "Person B", "Entity relationship description text": Person A is a delivery man in C, and Person A bravely rescues Person B"}.
[0118] Therefore, the entity relationship description texts in the relationships of different entity words at the same time node can be the same.
[0119] In addition, as events progress, relational databases can also incrementally store new relationships. For example, a set of event elements is extracted from the latest news of an event. The new time nodes, entity words, associated entity words, and entity relationship description text in the event element set can form a new relationship. Therefore, the same entity word can be associated with multiple relationships with multiple time nodes.
[0120] In operation S660, a feature vector of the entity relationship description text is generated to obtain entity relationship description features.
[0121] In operation S670, entity relationship description features, time nodes, and source information are stored in a feature database.
[0122] In another example, the entity relationship description text may be encoded to obtain entity relationship description features, and the entity relationship description features, time nodes, and source information may be stored in a feature database.
[0123] The above-mentioned relational database can use entity words for precise matching in the retrieval stage to obtain entity relationship description texts at multiple time points, and then sort them according to time nodes to obtain the event context.
[0124] The feature database can use entity description texts for fuzzy matching in the retrieval phase to obtain multiple entity relationship description features, and sort multiple entity relationship description texts corresponding to the multiple entity relationship description features according to time nodes to obtain event context.
[0125] The embodiments of the present disclosure can perform precise matching and fuzzy matching in the retrieval stage by constructing a relational database and a feature database, thereby improving the comprehensiveness of the retrieval of the events to be processed.
[0126] According to an embodiment of the present disclosure, the present disclosure also provides an event description generating device and a database generating device.
[0127] Figure 7 It is a block diagram of an event description generating device according to an embodiment of the present disclosure.
[0128] like Figure 7As shown, the event description generating device 700 includes a search text determining module 710 , a first search module 720 and a first event description generating module 730 .
[0129] The search text determination module 710 is used to obtain at least one of the title and the summary of the event to be processed as the search text.
[0130] The first retrieval module 720 is used to retrieve multiple relationships from a relational database using entity words extracted from a retrieval text, wherein the relationship includes a set of event elements, the event element set includes time information, entity words, associated entity words, and entity relationship description text used to describe the relationship between entity words and associated entity words.
[0131] The first event description generating module 730 is used to sort a plurality of entity relationship description texts respectively from a plurality of relationships according to time information to obtain an event description of the event to be processed.
[0132] The event description generating device 700 further includes an entity description text generating module, a second retrieval module and a second event description generating module.
[0133] The entity description text generation module is used to generate entity description text for entity words.
[0134] The second retrieval module is used to retrieve multiple entity relationship description features from a feature database using the entity description text, wherein the feature database includes the entity relationship description features of the entity relationship description text and time information.
[0135] The second event description generating module is used to sort the multiple entity relationship description texts corresponding to the multiple entity relationship description features according to time information to obtain the event description of the event to be processed.
[0136] According to an embodiment of the present disclosure, the feature database also includes source information. The second retrieval module includes an entity description feature generation unit and a retrieval unit.
[0137] The entity description feature generation unit is used to generate entity description features of the entity description text.
[0138] The retrieval unit is used to retrieve a plurality of entity relationship description features that meet preset conditions from a feature database using the entity description features, wherein the preset conditions include at least one of a time condition and a source condition.
[0139] The search text determination module 710 includes a title determination unit and an abstract generation unit.
[0140] The title determination unit is used to determine the title of the event to be processed in response to at least one of a click operation on the news title and an input operation in the news search box.
[0141] The summary generation unit is used to generate a summary according to the news content under the title.
[0142] The first retrieval module 720 is further configured to use entity words to retrieve a plurality of relations that meet preset conditions from the relational database, wherein the preset conditions include at least one of a time condition and a source condition.
[0143] The event description generating device 700 further includes a display module.
[0144] The display module is used to display event descriptions according to the arrangement order of multiple entity relationship description texts.
[0145] Figure 8 is a block diagram of a database generating device according to an embodiment of the present disclosure.
[0146] like Figure 8 As shown, the database generating device 800 includes a parsing module 810 , an entity word determining module 820 , an entity relationship description text generating module 830 and a database generating module 840 .
[0147] The parsing module 810 is used to obtain the news text and the time node of the news according to the news source web page information.
[0148] The entity word determination module 820 is used to extract multiple entity words from the news text.
[0149] The entity relationship description text generation module 830 is used to generate entity relationship description text for describing the relationship between multiple entity words.
[0150] The database generation module 840 is used to generate a database according to time nodes, entity words, and entity relationship description texts.
[0151] The database generation module 840 includes an associated entity word determination unit, an entity relationship description subtext determination unit, and a first storage unit.
[0152] The associated entity word determining unit is used to determine, for each entity word, an associated entity word having an associated relationship with the entity word from a plurality of entity words.
[0153] The entity relationship description subtext determining unit is used to determine the entity relationship description subtext used to describe the relationship between the entity word and the associated entity word from the entity relationship description text.
[0154] The first storage unit is used to store a relationship composed of a time node, an entity word, an associated entity word, and an entity relationship description subtext into a relational database.
[0155] The database generation module 840 also includes an entity relationship description feature generation unit and a second storage unit.
[0156] The entity relationship description feature generation unit is used to generate entity relationship description features of entity relationship description text.
[0157] The second storage unit is used to store the time nodes and entity relationship description features in the feature database.
[0158] The database generating device 800 further includes a source information determining module and an adding module.
[0159] The source information determination module is used to determine the source information according to the news source web page information.
[0160] The adding module is used to add the provenance information to the relational database and the feature database.
[0161] The parsing module includes 810 a source web page acquisition unit, a text determination unit, and a time node determination unit.
[0162] The source web page acquisition unit is used to acquire news source web page information according to news titles.
[0163] The text determination unit is used to determine the news contents of multiple time nodes in the news source web page information whose intervals do not exceed a preset time length as the news text.
[0164] The time node determination unit is used to determine the time node of the news from multiple time nodes.
[0165] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0166] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0167] like Fig. 9As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0168] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0169] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as at least one of the event description generation method and the database generation method. For example, in some embodiments, at least one of the event description generation method and the database generation method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of at least one of the event description generation method and the database generation method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute at least one of the event description generating method and the database generating method in any other appropriate manner (eg, by means of firmware).
[0170] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0171] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0172] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0173] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0174] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0175] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0176] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0177] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for generating an event description, comprising: Obtain at least one of a title and a summary of the event to be processed as a search text; Using the entity words extracted from the search text, multiple relations are retrieved from a relational database, wherein the relations include an event element set, the event element set includes time information, entity words, associated entity words, and entity relationship description text for describing the relationship between the entity words and the associated entity words; as well as According to the time information, a plurality of entity relationship description texts respectively from the plurality of relationships are sorted to obtain an event description of the event to be processed.
2. The method according to claim 1, further comprising: Generate entity description text of the entity word; Retrieving a plurality of entity relationship description features from a feature database using the entity description text, wherein the feature database includes the entity relationship description features of the entity relationship description text and the time information; and According to the time information, a plurality of entity relationship description texts corresponding to the plurality of entity relationship description features are sorted to obtain an event description of the event to be processed.
3. The method according to claim 2, wherein: The feature database also includes source information; the step of retrieving multiple entity relationship description features from the feature database using the entity description text includes: Generating entity description features of the entity description text; The entity description feature is used to retrieve a plurality of entity relationship description features that meet preset conditions from the feature database, wherein the preset conditions include at least one of a time condition and a source condition.
4. The method according to claim 1, wherein: The obtaining of at least one of the title and the summary of the event to be processed as the search text comprises: In response to at least one of a click operation on a news title and an input operation in a news search box, determining a title of the event to be processed; The summary is generated according to the news content under the title.
5. The method according to claim 1, wherein: The event element set also includes source information; the using entity words extracted from the search text to retrieve multiple relations from a relational database includes: The entity words are used to retrieve multiple relations that meet preset conditions from the relational database, wherein the preset conditions include at least one of a time condition and a source condition.
6. The method according to any one of claims 1 to 5, further comprising: The event description is displayed according to the arrangement order of the multiple entity relationship description texts.
7. A method for generating a database, comprising: According to the news source webpage information, obtain the news text and the time node of the news; Extracting multiple entity words from the news text; Generate entity relationship description text for describing the relationship between the multiple entity words; as well as A database is generated according to the time node, the entity words, and the entity relationship description text.
8. The method according to claim 7, wherein: The database includes a relational database; generating the database according to the time node, the entity word, and the entity relationship description text includes: for each entity word, Determining, from the plurality of entity words, an associated entity word that has an associated relationship with the entity word; Determining an entity relationship description subtext for describing the relationship between the entity word and the associated entity word from the entity relationship description text; and The time node, the entity word, the associated entity word, and the entity relationship description subtext are combined into a relationship and stored in the relationship database.
9. The method according to claim 8, wherein: The database also includes a feature database; The step of generating a database according to the time node, the entity word, and the entity relationship description text further comprises: Generating entity relationship description features of the entity relationship description text; as well as The time node and the entity relationship description features are stored in the feature database.
10. The method according to claim 9, further comprising: Determine source information according to the news source webpage information; as well as The provenance information is added to the relational database and the feature database.
11. The method according to claim 7, wherein: The method of obtaining the news text and the time node of the news according to the news title and the news source webpage information includes: Get news source web page information based on news titles; Determining the news content of multiple time nodes in the news source webpage information at intervals not exceeding a preset time as the news body; and A time node of the news is determined from the multiple time nodes.
12. An event description generating device, comprising: A search text determination module, used to obtain at least one of the title and summary of the event to be processed as the search text; A first retrieval module is used to retrieve multiple relations from a relational database using entity words extracted from the retrieval text, wherein the relations include an event element set, the event element set includes time information, entity words, associated entity words, and entity relationship description text for describing the relationship between the entity words and the associated entity words; as well as The first event description generating module is used to sort the multiple entity relationship description texts respectively from the multiple relationships according to the time information to obtain the event description of the event to be processed.
13. The apparatus according to claim 12, further comprising: An entity description text generation module, used to generate entity description text of the entity word; A second retrieval module is used to retrieve a plurality of entity relationship description features from a feature database using the entity description text, wherein the feature database includes the entity relationship description features of the entity relationship description text and the time information; as well as The second event description generating module is used to sort the multiple entity relationship description texts corresponding to the multiple entity relationship description features according to the time information to obtain the event description of the event to be processed.
14. The device according to claim 13, wherein: The feature database also includes source information; the second search module includes: An entity description feature generating unit, used for generating entity description features of the entity description text; The retrieval unit is used to retrieve a plurality of entity relationship description features that meet preset conditions from the feature database using the entity description features, wherein the preset conditions include at least one of a time condition and a source condition.
15. The device according to claim 12, wherein: The search text determination module comprises: A title determination unit, configured to determine the title of the event to be processed in response to at least one of a click operation on a news title and an input operation in a news search box; The summary generating unit is used to generate the summary according to the news content under the title.
16. The device according to claim 12, wherein: The event element set also includes source information; the first retrieval module is used to use the entity words to retrieve multiple relationships that meet preset conditions from the relational database, wherein the preset conditions include at least one of a time condition and a source condition.
17. The device according to any one of claims 12 to 16, further comprising: A display module is used to display the event description according to the arrangement order of the multiple entity relationship description texts.
18. A database generating device, comprising: The parsing module is used to obtain the news text and the time node of the news according to the news source web page information; An entity word determination module, used for extracting a plurality of entity words from the news text; An entity relationship description text generation module, used to generate an entity relationship description text for describing the relationship between the plurality of entity words; as well as The database generation module is used to generate a database according to the time node, the entity word, and the entity relationship description text.
19. The device according to claim 18, wherein: The database comprises a relational database; The database generation module comprises: An associated entity word determining unit, configured to determine, for each entity word, an associated entity word having an associated relationship with the entity word from the multiple entity words; An entity relationship description subtext determining unit, used to determine an entity relationship description subtext for describing the relationship between the entity word and the associated entity word from the entity relationship description text; The first storage unit is used to store the time node, the entity word, the associated entity word, and the entity relationship description subtext into a relationship in the relationship database.
20. The device according to claim 19, wherein The database also includes a feature database; The database generation module also includes: An entity relationship description feature generating unit, used for generating entity relationship description features of the entity relationship description text; as well as The second storage unit is used to store the time node and the entity relationship description feature in the feature database.
21. The apparatus according to claim 20, further comprising: A source information determination module, used to determine the source information according to the news source web page information; as well as An adding module is used to add the source information to the relational database and the feature database.
22. The device according to claim 18, wherein The parsing module comprises: A source web page acquisition unit, used to acquire news source web page information according to news titles; A text determination unit, configured to determine the news contents of a plurality of time nodes in the news source web page information at intervals not exceeding a preset time length as the news text; and A time node determination unit is used to determine the time node of the news from the multiple time nodes.
23. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 11.
25. A computer program product, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and when the computer program is executed by a processor, implements the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Event context generation method, device and equipment and storage medium
CN110555108A
Event context generation method and system integrated with deep semantic relationship classification
CN114265932A
News data knowledge graph construction method based on artificial intelligence
CN118396092A
Pipe connection device using fusion bonding method
KR102380394B1
Building a knowledgebase of associated time-based events
US20090287630A1